Creating an Image Segmentation Dataset for Multiple Classes

You should use and ImageSegment with CHW channels. That probably requires a custom open method, so you will have to subclass ImageSegment but then the transforms should be applied properly to the targets.

1 Like