Error when trying pascal voc 2012 segmentation

Hi!

I’m trying to use fastai 1.0 to do semantic segmentation on pascal voc 2012 dataset. Actually the code is borrowed from the code https://nbviewer.jupyter.org/github/fastai/course-v3/blob/master/nbs/dl1/lesson3-camvid.ipynb

However, I don’t know how to define the classes. My code is like this:

classes = ['background', 'aeroplane', 'bicycle', 'bird', 'boat', 'bottle', 'bus', 'car', 'cat', 'chair', 'cow', 'diningtable', 'dog', 'horse', 'motorbike', 'person', 'pottedplant', 'sheep', 'sofa', 'train', 'tvmonitor']
 src = (SegmentationItemList.from_df(all_seg, path=path_img)
   .split_by_idx(val_idxes)
   .label_from_func(get_y_fn, classes=classes)
  )

When running, I got RuntimeError: CUDA error: device-side assert triggered. Generally, this error means there is something wrong in classes. I tried to remove ‘background’ but no luck.
Any suggestion? Thanks in advance!

Hi !

I’m having the same kind of problem right now. Did you solve it ?
I think it comes from the fact that, in the mask images, the labels are not 0,1,2… 20 (number of classes) like in Camvid, but very different number (they range from 0 to 220, apparently)…

Still struggling with this, will post if I find a solution, would be glad to know your solution if you found any :slight_smile:

Did you find a solution for this, i am struggling with this too. Can you share if you did, it would really help, thanks!