1

I have a set of Images and Yolo Annotation files(in txt format) for the validation.

How to properly use -map argument (something like below) to get the mAP score of the validation dataset using the darknet framework (Repo:https://github.com/AlexeyAB/darknet)?

/darknet detector map cfg/test.data cfg/test_tiny.cfg backup\my_yolov3_tiny_final.weights 

Will it be possible to derive the confusion matrix from this?

Sandeep M
  • 53
  • 1
  • 7
  • Please give more information like which repo you use for training, if you wrote the code on your own, please share it. – CuCaRot Jul 06 '21 at 06:09
  • @CuCaRot Thanks for pointing it out. I have added the repo details. Just want to know there is any existing method to get the mAP score on the Validation dataset. Thanks! – Sandeep M Jul 06 '21 at 06:41
  • In [that repo how to train yolov4](https://github.com/AlexeyAB/darknet#how-to-train-to-detect-your-custom-objects), check section 8.1 – CuCaRot Jul 06 '21 at 06:48
  • @CuCaRot Thanks for your reply. It is giving the mAP value while training as mentioned in the section. My query is whether it is possible to get the mAP value just with a validation dataset.I am not planning to do the training again and I already have the Yolo weights file. – Sandeep M Jul 06 '21 at 07:09
  • 1
    I got your point, in that case, use the pre-trained model to predict the validation set, then you can use [this repo](https://github.com/Cartucho/mAP) to evaluate it. It's my favourite repo because of its simplicity. – CuCaRot Jul 06 '21 at 07:11
  • 1
    Thanks for the suggestion! This is what I was looking for. I will check it. – Sandeep M Jul 06 '21 at 07:15
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/234550/discussion-between-sandeep-m-and-cucarot).As StackOverflow suggests to avoid extended discussions. – Sandeep M Jul 06 '21 at 07:50

2 Answers2

1

/darknet detector map detector map cfg/test.data cfg/test_tiny.cfg backup\my_yolov3_tiny_final.weights where test.data is same data file which you was training on. You can use -map flag when you training so after 4 epochs( 4 * train_size / batch) you will se mAP@0.5.

TheGamerCoder
  • 91
  • 1
  • 11
0

I couldn't edit the code above. For more proper command:

./darknet detector map test.data yolov4-tiny.cfg yolov4-tiny_last.weights

Ugurcan
  • 366
  • 1
  • 4
  • 17