说明
这里不介绍量化的基础知识,可自行补充。
量化结果
-
量化精度
Calibration evaluation: mAP@IoU=0.50:0.77817, mAP@IoU=0.50:0.95:0.60306 Orgin evaluation: mAP@IoU=0.50:0.58237, mAP@IoU=0.50:0.95:0.44876
- 注:量化时,可自行对敏感层做处理。
-
推理性能
- 对于量化之后的推理性能,可自行进行测试即可。
代码地址
使用:
- 安装
pytorch-quantization
pip install pytorch-quantization
- 下载代码并切换到master分支
git clone https://github.com/LemonWang0110/YOLOv8_PTQ.git
git checkout master
- 配置
quant_ptq.py
中模型等参数,执行即可
python quant_ptq.py