_to_mask</span><span class="p">(</span><span class="n">segms</span><span class="p">[</span><span class="n">i</span><span class="p">],</span> <span class="n">image</span><span class="p">)</span>
            <span class="n">e</span> <span class="o">=</span> <span class="n">e</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">uint8</span><span class="p">)</span>

            <span class="n">_</span><span class="p">