I tried to train with my own database. The annotations, train, val are all converted to coco type. I also updated the mmdetection/configs/dcn/faster_rcnn_dconv_c3-c5_r50_fpn_1x.py, and mmdetection/mmdet/datasets/coco.py based on my own labels and training set. But the strange thing is the original labels from coco (such as truck, person, car) remains in the testing image when I run the demo code from official https://github.com/open-mmlab/mmdetection#test-images I am pretty sure that I use the trained model. I am pretty sure that there is no error in my dataset (with coco style). Does anyone know the reason?
Found the reason, because I also need to update the mmdetection/mmdet/core/evaluation/class_names.py
You can refer to the testing script.
I had changed my own database to the coco type ,but maybe the way I changed have some problem, when I use run the demo code with the checkpoint from my train,
it warns"UserWarning: Class names are not saved in the checkpoint's meta data, use COCO classes by default.
warnings.warn('Class names are not saved in the checkpoint's ' "
but it worked out, it showed the classes of my data in the result.
when I run the test command with"python tools/test.py configs/faster_rcnn_r50_fpn_1x.py work_dirs/epoch_12.pt
h --out ./result/result_12.pkl --eval bbox --show"
It reported error that AttributeError: 'FasterRCNN' object has no attribute 'CLASSES'. How can I solve the issue?
Most helpful comment
Found the reason, because I also need to update the mmdetection/mmdet/core/evaluation/class_names.py