I have a segmented image like the one below where each object has a different pixel value (i.e. instance segmentation. This has been achieved using skimage.measure.label. How can I select specific objects from this image. I would for instance like all objects labelled 11, 12, and 13 to retain their label or be labelled as 1 and everything else to be assigned a pixel value of 0.



