Faster-RCNN_TF icon indicating copy to clipboard operation
Faster-RCNN_TF copied to clipboard

AP = -1 for every class on custom dataset

Open thanasissdr opened this issue 7 years ago • 9 comments

After a big number of iterations (~100K), I get AP = -1 for every class. Do you have any idea what could possibly go wrong? During the training there is nothing strange oserved, e.g. loss_= nan

thanasissdr avatar Jul 21 '17 11:07 thanasissdr

What are your class names ? It might come from upper case letters somewhere, since they are put to lower case in some parts of the code but not all (if I remember correctly).

gdelab avatar Jul 27 '17 11:07 gdelab

Hello, I want know how did you get the AP ? when i run the test.py iget an error: ... im_detect: 4951/4952 0.505s 0.001s im_detect: 4952/4952 0.505s 0.001s Evaluating detections Writing aeroplane VOC results file Writing bicycle VOC results file Writing bird VOC results file Writing boat VOC results file Writing bottle VOC results file Writing bus VOC results file Writing car VOC results file Writing cat VOC results file Writing chair VOC results file Writing cow VOC results file Writing diningtable VOC results file Writing dog VOC results file Writing horse VOC results file Writing motorbike VOC results file Writing person VOC results file Writing pottedplant VOC results file Writing sheep VOC results file Writing sofa VOC results file Writing train VOC results file Writing tvmonitor VOC results file VOC07 metric? Yes Traceback (most recent call last): File "./tools/test_net.py", line 98, in test_net(sess, network, imdb, weights_filename) File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/fast_rcnn/test.py", line 345, in test_net imdb.evaluate_detections(all_boxes, output_dir) File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/datasets/pascal_voc.py", line 325, in evaluate_detections self._do_python_eval(output_dir) File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/datasets/pascal_voc.py", line 288, in _do_python_eval use_07_metric=use_07_metric) File "/home/ubuntu/Faster-RCNN_TF/tools/../lib/datasets/voc_eval.py", line 126, in voc_eval R = [obj for obj in recs[imagename] if obj['name'] == classname] KeyError: '000001' Hope for your help ,Ths!

Suodislie avatar Jul 28 '17 08:07 Suodislie

@gdelab My class labels have only lowercase letters and numbers.

thanasissdr avatar Jul 31 '17 15:07 thanasissdr

@Suodislie Sorry, I can't help you I haven't trained the network with the original dataset. But, this might help you. https://github.com/rbgirshick/py-faster-rcnn/issues/163

thanasissdr avatar Jul 31 '17 18:07 thanasissdr

@thanasissdr How do you fix the problem?

Zealoe avatar Sep 20 '17 05:09 Zealoe

@Zealoe If my level of understanding is correct, this occurs when there are no objects found belonging to a specific class. First of all, try to see if all the coordinates of the bounding boxes referring to the ground truth do not contain any negative values.

thanasissdr avatar Sep 20 '17 13:09 thanasissdr

@thanasissdr Thanks for your reply. But I have checked the dataset. I think the data has no problem....and if i test with the pretrained model, it works well. So it should be the problem with the training process. And did you change any params? because i use the original params in this repository...

Zealoe avatar Sep 21 '17 03:09 Zealoe

@thanasissdr have you solved this probiem?

hxf930620 avatar May 03 '18 10:05 hxf930620

@thanasissdr have you solved the problem?

lipikak17 avatar Jul 10 '18 10:07 lipikak17