It is hard to answer as repo which you use is unknown for us. You can calculate it with formula of mAP, but which iou threshold will be used depends on you. Often it is 0.5, so mAP@0.5 will be calculated as:
- Set IoU threshold to 0.5
- Calculate AP as:
TP/(TP+FP)
where TP stand for True Positives and FP stands for False Positives per each class.
- Then calculate mAP as average of AP.
If you are using hunglc007, then try this:
- Convert to framework which you are will use(in your project, it is tflite):
python save_model.py --weights ./path/to/your/weights --output ./checkpoints/yolov4-416 --input_size 416 --model yolov4 --framework tflite python convert_tflite.py --weights ./checkpoints/yolov4-416 --output ./checkpoints/yolov4-416.tflite --quantize_mode( you can use eiter float16 or int8)
- Evaluate your TFLite model:
python evaluate.py --weights ./checkpoints/yolov4-416.tflite --framework tflite --input_size 416 --model yolov4 --annotations /path/to/your/annotations.txt
- Calculate mAP:
cd mAP/extra python remove_space.py cd .. python main.py --output results_yolov4_tflite
- Then watch in mAP/results_yolov4_tflite/results.txt for your mAP