levipereira / yolov9-qat

Implementation of YOLOv9 QAT optimized for deployment on TensorRT platforms.
Apache License 2.0
85 stars 11 forks source link

Quantization for YOLOv9 Segmentation Models #16

Open GokceSengun opened 2 months ago

GokceSengun commented 2 months ago

Hi,

I’m using YOLOv9 for segmentation tasks and noticed that quantization is currently supported for object detection models. Since the backbone is the same across all YOLOv9 variants, I wanted to ask:

levipereira commented 1 month ago

It is entirely possible to perform quantization for any YOLO model that uses the same architecture. As you mention the backbone remains the same, even when applied to different tasks like segmentation or detection. Since I have already completed quantization for the backbone, the same approach can be applied to segmentation models. The main challenge lies in implement a dataloader for model evaluation and training (for QAT purposes), which is a part I haven't had time to implement yet. The only aspect that might require minor adjustments is the neck of the YOLO model, which can be adapted as needed. Thus, in theory, the quantization process is ready; we just need to implement the dataloader to enable proper training and evaluation.

levipereira commented 1 month ago

I am working on a new project that involves migrate this project to the modelopt. It is a powerful quantization tool, but I am currently addressing some challenges with NVIDIA. For this reason, I have temporarily put this project on hold.

felixkarevo commented 1 month ago

Hi @levipereira! Have you seen any good examples on Github for quantization (PTQ or QAT) of a YoloV8, 9 or 11 segmentation model? Or maybe examples of INT8 conversion of a YoloV8, 9 or 11 segmentation model?