Issue with PILMask in segmentation

So here is the issue:

I first tried to use MaskBlock in my DataBlock and I got CUDA runtime error when I started training. So I thought maybe there is something wrong with my labels. When I checked the output from PILMask.create(which is used inside MaskBlock) I saw this:

It is completely changing my labels and they don’t mean anything now! (Compare it with when I open them simply by

Any solution to the problem?

Okay I think I found the problem:

I wrote my own transform to get rid of any value greater than 20 (because it would be out of the labels defined for dataset) and I created a new block with my new Transform.
It is working now and there is no more error!

1 Like