AlexeyAB / darknet

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

mAP 0 during training, but it works when executing map command alone not meanwhile with training #8343

Open YCAyca opened 2 years ago

YCAyca commented 2 years ago

chart_yolov4_roadsign

I use darknet.exe detector train data/dataset_roadsign/obj.data cfg/yolov4_roadsign.cfg weights/pretrained/yolov4.conv.137 -map command to train a custom dataset and training process is fine except of mAP calculation. I realized that mAP calculation doesnt use my GPU and it causes to have 0 for the whole mAP calculation process. Beside of that when I use darknet.exe detector map data/dataset_roadsign/obj.data cfg/yolov4_roadsign.cfg backup/yolov4_roadsign_final.weights -show_imgs -iou_thresh 0.75 command to calculate map after the training, it works cause it again use my GPU. What can I do to make yolov4 use my GPU during mAP calculation in training step? Any idea about this?

anamozov commented 2 years ago

Are you sure that you put the correct path to the validation set in .data file like it says here?


train  = data/train.txt
valid  = data/test.txt
names = data/obj.names
backup = backup/
YCAyca commented 2 years ago

If that was the case, detector map command wouldnt work too, but it works as I said and actually I mentioned the base of the problem that -map option which calculates map during the training can't use gpu, where detector map can use. And it affects the result. I dont know how to adapt the code to use gpu for -map option though