FPCRasmus:

I put 2 examples in my initial question above


you’ll need to put
‘zeros’ = background
‘ones’ = iris
‘twos’ = pupil

into one numpy mask and you are good to go. You can then use and modify the tutorial’s PennFudanDataset class accordingly. In addition to using labels = torch.as_tensor(obj_ids, dtype=torch.int64) suggested above; and use num_classes=3. This will work out of the box.