Article ID: 000059640 Content Type: Troubleshooting Last Reviewed: 05/20/2022

Unable to Get the Correct Mean Average Precision (mAP) Result for Quantified YOLOv4 Model on Rectangular Input Size

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Possible reasons for the model not getting mAP value equal to 1.00.

Description
  • Quantized the YOLOv4 model with the size of 416 x 416 and obtained correct mAP value.
  • Quantized the YOLOv4 model with the size of 320 x 544 using the command:

    pot -c yolov4-tiny-3l-gray-license_plate_prune_0.46_keep_0.01_320x544_qtz.json --output-dir backup -e

The obtained mAP value was incorrect:

Output:
INFO:app.run:map : 0.47562541279744447
INFO:app.run:AP@0.5 : 0.0
INFO:app.run:AP@0.5 : 0.05:95 : 0.0

Resolution
  • The obtained results are expected due to the definition of mAP itself: The rule that is used to compare inference results of a model with reference values. The mAP is calculated by first finding the sum of average precisions of all classes and then dividing the sum by the number of classes.
  • OpenVINO™ models were tested and validated using yolov3: 416x416 and yolov4: 608x608 which were the default network sizes in the common template configuration files by the industry. Hence, using other than the validated size may cause the mAP value to return less than 1.0.

Related Products

This article applies to 2 products