Auto-Search for General Yolov8 ONNX Quantization

Auto-Search for General Yolov8 ONNX Quantization#

This folder contains an example of Auto search for quantizing a yolov8 model based on the ONNX quantizer of Quark. The example has the following parts:

Pip requirements#

Install the necessary python packages:

python -m pip install -r requirements.txt

Prepare model#

To download the YOLOv8 model from Ultralytics, run the following commands:

# We use yolov8n for this demo. Feel free to change to other YOLO models
model = YOLO("yolov8n.pt")
model.export(format="onnx")

Prepare data#

COCO 2017 — commonly known simply as “COCO” — contains 5,000 validation images. Organize your data folder as follows:

-  val_data
      -  sample_1.jpg
      -  sample_2.jpg
      -  …

we use this dataset as evaluation dataset and calibration dataset at the same time.

License#

Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: MIT