Well, torchvision’s transformation also build on top of PIL.
I’m not sure if there is a workaround to use 10-channel images in PIL.
Maybe you could load the 10-channel mask and slice it into 10 binary images?
I’ve posted a link to an example using the functional API to transform the image and mask.