AlexeyAB / darknet

YOLOv4 / Scaled-YOLOv4 / YOLO - Neural Networks for Object Detection (Windows and Linux version of Darknet )
http://pjreddie.com/darknet/
Other
21.71k stars 7.96k forks source link

Is it overfitting before classes*2000 iterations complete? #5769

Open anakita opened 4 years ago

anakita commented 4 years ago

If something doesn’t work for you, then show 2 screenshots:

  1. screenshots of your issue
  2. screenshots with such information
    ./darknet detector test cfg/coco.data cfg/yolov4.cfg yolov4.weights data/dog.jpg
    CUDA-version: 10000 (10000), cuDNN: 7.4.2, CUDNN_HALF=1, GPU count: 1
    CUDNN_HALF=1
    OpenCV version: 4.2.0
    0 : compute_capability = 750, cudnn_half = 1, GPU: GeForce RTX 2070
    net.optimized_memory = 0
    mini_batch = 1, batch = 8, time_steps = 1, train = 0
    layer   filters  size/strd(dil)      input                output
    0 conv     32       3 x 3/ 1    608 x 608 x   3 ->  608 x 608 x  32 0.639 BF

If you do not get an answer for a long time, try to find the answer among Issues with a Solved label: https://github.com/AlexeyAB/darknet/issues?q=is%3Aopen+is%3Aissue+label%3ASolved

Hello great work on yolov4! I have 9 classes, with 17k images and I trained yolov4 for 22k iterations and below is the chart chart_yolo-obj_elcita But when I use the yolo-obj_best.weights on test data I get a mAP of only 67% as opposed to the training mAP of at least 83% as shown in the chart above. But when I use the yolo-obj_3000.weights , I get a mAP of 73%.That is in 3000 iterations itself I got the best mAP on test data(compared to other weights). I have attached the screenshot of mAP which I got with yolo-obj_3000.weights. elcita_map

The command used for calculating mAP on test data is -

./darknet detector map ./obj.data ./yolo-obj.cfg ./backup/yolo-obj_3000.weights

I am not sure if to call it overfitting,but I trained only for minimum number of iterations.

Some examples from the training data are: image0 image0_noisy_bright

Any suggestion is appreciated. Thankyou

anakita commented 4 years ago

@AlexeyAB Update: I also checked the predictions manually , it gives very low accuracy for few classes,which was not the case with yolov3 Examples of images where it gets confused are- cartempo In the above image, the ground truth is tempo, but it labels it as car and tempo(both with at least 50% confidence) , and similar predictions happens in 50% of the images. Also in some images it detects the object and in some other images it misses out,For example in the below image it detects the cycle ,but does not detect in other images of same view. cycle

Any suggestion and help is appreciated Thank you

anakita commented 4 years ago

Can you please give me some suggestion @AlexeyAB ? Thank you