For my mask data, each region of the face has its own binary mask image.(e.g. if the image name is 0.jpg, then the related masks are: 0_nose.png, 0_mouth.png).
In the Dataset class, I followed the methodology of the tutuorial. I convert each binary mask image into a [1, 512, 512] tensor，then concatenate the mouth and nose mask tensor along with 0 dim i.e my target masks is a [2, 512, 512] tensor. Then I set the labels tensor as torch.tensor([1, 2]).
Is it right for me to stack different classes masks along with 0-dim?