simple-faster-rcnn-pytorch
simple-faster-rcnn-pytorch copied to clipboard
The problem in train on my own voc data
Hi, I use my data like voc dataset in this project.and I have met some problem. First, I replace the offical voc data(20 classes) by my own data(5 classes). and modify the VOC_BBOX_LABEL_NAMES in voc_dataset.py and vis_tool.py Then I saw self.roi_cm = ConfusionMeter(21) in line 62 in trainer.py, so I modiy it into 6. and the error occurs.---------------"AssertionError: number of predictions does not match size of confusion matrix", I guess whether I have not modiy the classes number.and I want to know where I modify it Thank you very much!
@chenyuntc
@mahavird
hello! I have met the same question as yours. Have you resolved it? Can you tell me?thank you very very much!
My guess is that there are some other places you might need to modify. i.e the RCNN head for final predictions (number of predictions in your error?) so it would be from https://github.com/chenyuntc/simple-faster-rcnn-pytorch/blob/0ea7069318692d6cf80c0dcbae7ed45b70cfc5e8/model/faster_rcnn_vgg16.py#L58 to 5 in your case
now I'm using endernewton's tf-faster-rcnn..... @cmstudyscode @rxqy
When I use my dataset train model meet same problem,my dataset have 4 category.I modify code and the problem is solved.
1.modify model/faster_rcnn_vgg16.py n_fg_class=4
2.modify trainer.py self.roi_cm = ConfusionMeter(5)
hope can help you
Thank you SOOOOO MUCH. You saved me even if it's been 3 years later. @blackAndrechen