tensorflow-yolov4-tflite icon indicating copy to clipboard operation
tensorflow-yolov4-tflite copied to clipboard

Yolov4 Evaluation returns an mAP of 0

Open milanpatel25 opened this issue 4 years ago • 4 comments

I am having an issue with Yolov4. I downloaded the weights, and convert to pb. I create the dataset and do the preprocessing of the dataset. Then I run the command python evaluate.py --weights ./checkpoints/yolov4-416 I then do python remove_space.py And python main.py --output results_yolov4_tf An I just get a total mAP of 0, I have attached the results txt file. results.txt Is this a known problem, am I missing a step or do I need to change something? Any help would be appreciated, thanks! Tensorflow version: 2.6.0

milanpatel25 avatar Sep 09 '21 16:09 milanpatel25

Your issue may happen during converting the weights. In savemodel.py, go to the 51st row and replace utils.load_weights(model, FLAGS.weights, FLAGS.model, FLAGS.tiny) with model.load_weights(FLAGS.weights) . Then redo what the demo.

Sebastian514 avatar Sep 13 '21 13:09 Sebastian514

Thanks for the speedy reply!

I get an issue from this line:

OSError: Unable to open file (file signature not found)

I have tried redownloading the weights file but I get the same error.

Edit: My colleague says he managed to do the workflow with this amend but says he got the same result (mAP of 0), I will verify with him as to why I got an error and he didnt.

milanpatel25 avatar Sep 13 '21 17:09 milanpatel25

Rolling back your tf version as decribed in requirements-gpu.txt may be helpful.

I met the same mAP issue before. However ,my issue only came out when I used the weights that was automatically saved during training instead of the default weights. After my correction as above ,the mAP issue was solved. However, it was still poor(about 42%). But it's another thing.

Sebastian514 avatar Sep 13 '21 18:09 Sebastian514

facing the same issue with yolov4-tiny, any updates on this. although the tflite detections give good results.

naruto-raj avatar Sep 14 '21 07:09 naruto-raj