Tim M b22c929a64 Corrected additional `.md` files with new image %!s(int64=2) %!d(string=hai) anos
..
README.md b22c929a64 Corrected additional `.md` files with new image %!s(int64=2) %!d(string=hai) anos
object_detection_demo_coco.py dfe4b90216 Files for Post Training Quantization with OpenVINO Toolkit %!s(int64=3) %!d(string=hai) anos
pycocoEvalDemo.ipynb dfe4b90216 Files for Post Training Quantization with OpenVINO Toolkit %!s(int64=3) %!d(string=hai) anos
yolo_to_ssd_classes.py a07471c281 Files for Post Training Quantization with OpenVINO Toolkit %!s(int64=3) %!d(string=hai) anos

README.md

Post Training Quantization with OpenVino Toolkit

This repository contains code for Post Training Quantization with OpenVino Toolkit blogpost.

download

This repository has the following as well,

  • Python file to create the results JSON file for the COCO validation dataset.
  • Juptyter notebook for calculating the mAP.

Instructions

Download the Video Used in the Post

  • Download the video used in the post for inference from this link.

Getting the JSON Results File

  • To get the results JSON file for COCO validation set:

    • Execute object_detection_demo_coco.py by providing the correct path to the MS COCO validation dataset by editing the Python file.

    • Execute using the following commands:

    python object_detection_demo_coco.py --model tiny_yolov4_fp32/frozen_darknet_tiny_yolov4_model.xml -at yolo -i mscoco/val2017 --loop -t 0.2 --no_show -r -nireq 4
    
    python object_detection_demo_coco.py --model int8/optimized/yolo-v4-tiny.xml -at yolo -i mscoco/val2017 --loop -t 0.2 --no_show -r -nireq 4
    

mAP Calculation

  • Put the pycocoEvalDemo.ipynb in the cocoapi/PythonAPI.

  • Run the pycocoEvalDemo.ipynb Notebook by providing the correct path the results.json

  • Once for the FP32 results.

  • And once for INT8 results.

  • The correct path to the MS COCO evaluation JSON file also needs to be provided. Please check the path according to your directory structure of the MS COCO dataset.

AI Courses by OpenCV

Want to become an expert in AI? AI Courses by OpenCV is a great place to start.

img.