deep-learningcomputer-visionobject-detectionyolodarknet

Loss and mAP chart in YOLOv4


I'm still new to "You Only Look Once" object detection algorithm (YOLOv4 to be exact). I have some questions regarding the mAP and loss chart.

I tried to follow the instructions from AlexeyAB Darknet, and train my custom object detector using Google Colabs. After the training, it shows the loss and mAP chart as shown below.

Loss and mAP chart:

image

My questions are:

  1. Is there any chart other than this?
  2. Is this loss for training or validation?
  3. Why is there a sudden drop near iteration 1200?
  4. Is the output of the training only that chart and the weight files?

Solution

    1. Yes. But if you want to export the log and make a chart out of it, you can try this command:

    ./darknet detector train data/obj.data cfg/yolov4.cfg yolov4.weights -map | tee results.log

    1. The blue curve is the training loss or the error on the training dataset (specifically Complete Intersection-Over-Union or CIoU loss for YOLOv4). For more details on CIoU loss, check this paper. The red line is the mean average precision at 50% Intersection-over-Union threshold (mAP@0.5), which checks if your model it is generalizing well on a never-before-seen dataset or validation set. If you want to understand mAP more, you can refer to this easy-to-understand blogpost.

    2. Are you using a custom dataset? The drop near iteration 1200 might be caused by some problems in your dataset. To check, try these:

      (a) Check your dataset - run training with flag -show_imgs i.e. ./darknet detector train ... -show_imgs and look at the aug_...jpg images, do you see correct truth bounded boxes?

      (b) Check generated files bad.list and bad_label.list if they exist. These files contain the label files that may have problems.

    3. Yes. But if you enable the log file (check my answer - no. 1), then, no.