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:
My questions are:
./darknet detector train data/obj.data cfg/yolov4.cfg yolov4.weights -map | tee results.log
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.
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.
Yes. But if you enable the log file (check my answer - no. 1), then, no.