AILab-CVC / YOLO-World

[CVPR 2024] Real-Time Open-Vocabulary Object Detection
https://www.yoloworld.cc
GNU General Public License v3.0
3.88k stars 372 forks source link

INT8 Quantization of YOLO-World #339

Open MaverickPigoo opened 1 month ago

MaverickPigoo commented 1 month ago
  1. Is the newly released 'TFLite Export with INT8 Quantization' only quantize the yolov8 backbone(or image encoder)? I note that you emphasis on 'Please use Reparameterized YOLO-World for TFLite!!' , is that mean the quantization of text encoder is not supported?
  2. How is the detection performance of the int8 quantized model, and is there any corresponding metric?
  3. Will you consider adding the spport of quantization with pytorch quantization api?
wondervictor commented 1 month ago

Hi @MaverickPigoo, thanks for your interest! For your questions:

  1. Is the newly released 'TFLite Export with INT8 Quantization' only quantize the yolov8 backbone(or image encoder)? I note that you emphasise on 'Please use Reparameterized YOLO-World for TFLite!!', is that mean the quantization of text encoder is not supported?

The TFLite INT8 Quantization only supports Reparameterized YOLO-World including the image backbone, neck, and the detention head, but without the text encoder.

  1. How is the detection performance of the int8 quantized model, and is there any corresponding metric?

The INT8 Quantization has a slight performance drop, about 1.0 AP on COCO. The results of FP16 models and INT8 models are consistent. BTW, quantization-aware training (QAT) will bridge the gap.

  1. Will you consider adding the support of quantization with pytorch quantization API?

Sure, and we're working on it. In the next plans, we will release TensorRT with quantization and quantization-aware training.

MaverickPigoo commented 2 weeks ago

For reparameterized module, if the text prompts are changed, which means the parameters of 1*1 conv changed. Does this part of the parameter need to be recalibrated? If recalibration is needed, is it for the neck section alone?