I think this thread 20 is what you want, it is a custom dataset example.
You can do some transformation on the image and label, then I think you can cat them together in  __getitem__ if you still need.