yuantn / MI-AOD

Code for Multiple Instance Active Learning for Object Detection, CVPR 2021
https://openaccess.thecvf.com/content/CVPR2021/papers/Yuan_Multiple_Instance_Active_Learning_for_Object_Detection_CVPR_2021_paper.pdf
Apache License 2.0
329 stars 43 forks source link

No detection of testing of custom train model #84

Closed chiran7 closed 1 year ago

chiran7 commented 2 years ago

Dear Author,

I have attached the training log on custom data (converted in pascal VOC format). image

It gives good results on pascal VOC. However, it does not provide class-wise detection results 'cls_dets' on custom data.

I checked the return result of single_gpu_test, (y_head), which is used as cls_det to calculate mean_ap. In the detection results, it shows 0 to dets column. Can you suggest the better solution ?

Thank you for your time and consideration.

chiran7 commented 2 years ago

64 , #44,

Dear Author, Can you suggest a proper change in the configuration file for custom data? although it trains and converges the loss function, I am getting 0 detections (no predictions) on custom data for MIAOD_SSD while testing..

yuantn commented 2 years ago

Sorry, I am not clear about your custom dataset. Please describe the error in detail.

chiran7 commented 2 years ago

Sorry, I am not clear about your custom dataset. Please describe the error in detail.

image

Dear Author,

I have attached the screenshot of the test on MIAOD_SSD. In mmdet info, it shows dets = 0 for most of the classes except class = 20 (where dets = 509800) (in VOC, it has 20 classes, it may be the reason it is showing dets = 509800 at class = 20). However, in my custom data, it has more classes. I changed the names of classes in voc.py, and in class_names.py. I changed data into voc format and use only VOC2007 in active_datasets.py.

Moreover, in your repository, i found that the configuration for VOC and COCO is different. You are using --eval bbox for coco, but using --eval mAP in VOC. Will --eval mAP work on custom data that is converted in VOC format ?

In training, it shows as it is converging with different types of losses, but it is not working for test(as dets column is 0 for all classes except class =20).

I will be grateful if you can suggest a better solution.

Thank you for your time and consideration.

yuantn commented 2 years ago

--eval mAP can work on all custom data converted in VOC format.

In your custom dataset, what are the 22 classes? What is special about that class with 509800 detection boxes compared to other classes?

Also, have you tested your custom dataset on other general detectors (like RetinaNet and SSD) before, and how well does it work?

chiran7 commented 2 years ago

--eval mAP can work on all custom data converted in VOC format.

In your custom dataset, what are the 22 classes? What is special about that class with 509800 detection boxes compared to other classes?

Also, have you tested your custom dataset on other general detectors (like RetinaNet and SSD) before, and how well does it work?

Thank you for your response. I tried with another custom data that has 30 classes. The issue was same. It shows high detection boxes at class 20 and 0 at others. detection of custom data on general detectors like SSD is good ( at least mAP in the range of 10 to 20). I am trying to see if I can get good detection on SSD (using only first initial labels set training of current active learning cycle). If it works, I can try for whole active learning cycle later.

yuantn commented 2 years ago

OK.

What I mean is that, what types are these classes belong to? For example, they may be cats, dogs or cars.

And what is special for class 20? For example, it may be small cups, and they are small objects.

chiran7 commented 2 years ago

OK.

What I mean is that, what types are these classes belong to? For example, they may be cats, dogs or cars.

And what is special for class 20? For example, it may be small cups, and they are small objects.

Thank you for your response. the classes belong to different crops of agriculture (for instance, grass, tree, etc ) and class 20 is just one of the categories indicating crop type. In both custom datasets, the class 20 detection box becomes high ( i think it may be because of the total 20 classes in VOC and there is something missing in configuration). I just replaced the class names in voc.py with custom data classes and used the total class number 30 instead of 20. will mmdetection make all GT class zero for custom data assuming them as empty GT if used inside voc.py? should I use custom data in mmdet instead of just using voc.py with customized class names?

Thank you for your time and consideration.

yuantn commented 1 year ago

Please ensure that you have prepared the dataset and code as described here.