n class="n">segment_image</span> <span class="o">=</span><span class="n">custom_segmentation</span><span class="p">()</span>
<span class="n">segment_image</span><span class="o">.</span><span class="n">inferConfig</span><span class="p">(</span><span class="n">num_classes</span><span class="o">=</span> <span class="mi">2</span><span class="p">,</span> <span class="n">class_names</span><span class="o">=</span> <span class="p">[</span><span class="s2">&quot;BG&quot;</span><span class="p">,</span> <span class="s