Hi,
I am trying to use the scripts in https://github.com/pytorch/vision/blob/master/references/segmentation/train.py to train a Semantic Segmentation model using a custom dataset of 6 classes (background-red, face-yellow, Eyes-blue, nose-green, hair-brown, lips-pink). I ned the background class as it does facial matting.
I have created a mask with 0 as default, 1-bg, 2-face,…, 6-lips. In the code, the cross entropy uses ignore_index=255 which I changed to ignore_index=0.
It should run fine, but I get error as : Target 255 is out of bounds with num_classes = 7
What am I doing wrong? I need help in understanding what the code base expects/how it works…
Thanks.