allanzelener / YAD2K

YAD2K: Yet Another Darknet 2 Keras
Other
2.71k stars 877 forks source link

Retrain on voc2007+2012 #40

Open Tangzy7 opened 7 years ago

Tangzy7 commented 7 years ago

I wanted to achieve the benchmark of the yolov2 paper, which is a 78% mAP on voc2007+voc2012. I used retrain_yolo.py to train on voc2007+2012 and test on voc2007_test, but I only got a mAP of 37%. Did anyone recurrent the result successfully?

Firyuza commented 7 years ago

How did you calculate mAP? On current solution I have 53.4%. But maybe my implementation of mAP is wrong.

Tangzy7 commented 7 years ago

@Firyuza Hi, I used the same script with Faster RCNN paper. https://github.com/rbgirshick/py-faster-rcnn/blob/master/lib/datasets/voc_eval.py

Firyuza commented 7 years ago

@Tangzy7 Hi, thanks. I try it.

Firyuza commented 7 years ago

Do you know do we have to count FaslePositive if score of bounding box is less then score threshold?

Tangzy7 commented 7 years ago

@Firyuza I think the official script of calculating mAP already did it.

    if ovmax > ovthresh:
        if not R['difficult'][jmax]:
            if not R['det'][jmax]:
                tp[d] = 1.
                R['det'][jmax] = 1
            else:
                fp[d] = 1.
    else:
        fp[d] = 1.
Firyuza commented 7 years ago

@Tangzy7 Yes, I know that they do it, but I'm not sure is it right?

mmderakhshani commented 6 years ago

@Tangzy7 Did you finally retrain on pascal voc? and did you achieve the result claimed in yolo9000 paper?

ZHANGKEON commented 6 years ago

However, set R['det'][jmax] = 1 will not change the value in class_recs[image_ids[d]]. Hence, for the next same image, doing R = class_recs[image_ids[d]] will give a new R which has R['det'][jmax] = 0. Is this understanding correct?

KLH1472 commented 6 years ago

I retrain the last layer using VOC2007+2012 trainval dataset. It worked fine and I got the mAP = 0.74. Personally, I recommend not to use the retrain.py, I think there are some bugs in it.

y-kl8 commented 6 years ago

@Tangzy7 @KLH1472 ,Hi, I want to run the retrain_yolo.py, but I don't know how to convert the VOC data into .npz format, can you help me?