pytorch-semseg icon indicating copy to clipboard operation
pytorch-semseg copied to clipboard

Camvid Segnet unlabelled problem

Open andyhahaha opened this issue 6 years ago • 6 comments

I use this code to train segnet on camvid, but the results can't reach the paper performance. I found that you didn't use median-frequency balancing to training. Moreover, unlabelled class is '11', not '<0', so you didn't ignore unlabelled pixel at training and validate. Your segnet will output unlabelled class that is weird. You should change n_class=12 to n_class=11.

andyhahaha avatar Jan 24 '18 08:01 andyhahaha

Could you please tell me how the split of 'train', 'val', 'test' is done in advance in camvid_loader.py? As I can see, the original dataset take them as a whole 701_StillsRaw_full folder.

d-li14 avatar Feb 04 '18 10:02 d-li14

I follow the split from this repo. https://github.com/alexgkendall/SegNet-Tutorial This is the repo from segnet author alex kendall.

andyhahaha avatar Feb 08 '18 09:02 andyhahaha

@andyhahaha Thanks a lot for reminding me, and I got the split from SegNet repo. But there exists some conflicts with the CamVid official site as far as i know:

  • it claims 32 classes and here we can only see 11
  • the label-color mapping is also not so matching with the label_colous list in the camvid_loader.py for lack of Roadmarking and Pavement

d-li14 avatar Feb 16 '18 08:02 d-li14

@andyhahaha Furthermore, as for your original question, I think shrinking n_class to 11 naively won't work, because if so, the network will output 11 classes while the ground truth still contains the 12nd class, this will lead to an unexpected error in cross entropy. And in my opinion you'd better set an ignore_index to exclude the unlabeled "void" class, which can be refered to in the loader of CityScapes dataset as well.

d-li14 avatar Feb 16 '18 15:02 d-li14

same problem, and I wonder whether the color map is not same with the origin paper. I try to test like blew:

label_colours = np.array([Sky, Building, Pole, Road, Pavement, Tree, 
                              SignSymbol, Road_marking, Car, 
                              Pedestrian, Fence, Unlabelled])

guanfuchen avatar Apr 25 '18 09:04 guanfuchen

@andyhahaha @d-li14 did you implement class balancing in the CamVid? How did you deal with unlabelled class?

komms avatar Dec 28 '18 12:12 komms