WXinlong / SOLO

SOLO and SOLOv2 for instance segmentation, ECCV 2020 & NeurIPS 2020.
Other
1.69k stars 307 forks source link

Trained for multi classes but only detect one class #159

Open f771216203 opened 3 years ago

f771216203 commented 3 years ago

I use "solov2_r101_fpn_8gpu_3x.py" to train my own dataset, I have two classes including 'block' and 'other'. But all the detections only detect one class 'block' in my model and there was no error when I was training. How can I fix the problem? The dataset I prepared was using 'labelme' like first pic and turned it to coco dataset.

螢幕擷取畫面 2021-03-09 142052 螢幕擷取畫面 2021-03-09 142215

shadowuyl commented 2 years ago

I met the same problem

leidi1989 commented 2 years ago

Does any one resovle?

mira-murali commented 2 years ago

You can try adding 'background' as the first class in your custom dataset, i.e.,:

class MyDataset(CocoDataset):

    CLASSES = ('background', 'a', 'b', 'c', 'd', 'e')

And update num_classes in your config file to have N+1 classes where N is the original number of classes without background.