This example demonstrates how to use Post-Training Quantization API from Neural Network Compression Framework (NNCF) to quantize YOLOv8n model.
The example includes the following steps:
- Download and prepare COCO-128 dataset.
- Quantize the model with NNCF Post-Training Quantization algorithm.
- Measure accuracy and performance of the floating-point and quantized models.
Before running this example, ensure you have Python 3.10+ installed and set up your environment:
python3 -m venv nncf_env
source nncf_env/bin/activate # On Windows: nncf_env\Scripts\activate.batpython3 -m pip install ../../../../ -r requirements.txtThe example is fully automated. Just run the following command in the prepared Python environment:
python main.py