IndexError: Target 225 is out of bounds.
IremYoldas opened this issue · comments
I'm trying to train my own dataset with this repo. I covered my dataset to Pascal format and I changed num classes, cmap. As I searched in web this error happens because of index of classes. I can't find class ids. Please help me, I stucked in here. Thanks in advance.
Hi @IremYoldas, I guess 225 is the class ID for background pixels? If so, you can simply set the ignore_index (Line 272) to 225 to ignore it. But I think, for background pixels, 255 seems more resonable than 225. Maybe it is caused by a typo in your data transformation?
We are on the same page but I have no idea where 225 came from. I set the ignore_index
to 225 and my problem seems like resolved. Thank you so much for your help.