arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2407.04943cs.CVcs.ARcs.LG
收藏

量化YOLOv7:一项全面研究

Quantizing YOLOv7: A Comprehensive Study

Shahid Bahonar University of Kerman(克尔曼沙希德·巴霍纳尔大学);Shiraz University(设拉子大学)

Mohammadamin Baghbanbashi, Mohsen Raji, Behnam Ghavami

AI总结:

本文系统研究了多种量化方案在YOLOv7预训练权重上的效果,发现4-bit量化结合不同粒度可在均匀和非均匀量化下分别节省约3.92倍和3.86倍内存,且精度损失仅为2.5%和1%。

摘要:

YOLO是一种深度神经网络(DNN)模型,遵循单阶段推理方法,用于鲁棒的实时目标检测。它在速度和精度上以较大优势超越其他实时目标检测器。然而,由于YOLO建立在具有大量参数的DNN骨干网络之上,会造成过高的内存负载,因此将其部署在内存受限设备上是实践中的严峻挑战。为克服这一限制,可以采用模型压缩技术,例如将参数量化为较低精度值。作为YOLO的最新版本,YOLOv7在5 FPS到160 FPS范围内实现了速度和精度上的最先进性能,在这一方面超越了YOLO所有先前版本以及其他现有模型。迄今为止,已有若干量化方案的鲁棒性在YOLO旧版本上得到评估。由于YOLOv7采用了不同的架构,这些方法未必能在YOLOv7上产生相似结果。本文对多种量化方案在最先进的YOLOv7模型预训练权重上的有效性进行了深入研究。实验结果表明,与全精度基线模型相比,采用4-bit量化并结合不同粒度的组合,在均匀量化和非均匀量化下分别实现约3.92倍和约3.86倍的内存节省,而精度损失分别仅为2.5%和1%。

英文摘要:

YOLO is a deep neural network (DNN) model presented for robust real-time object detection following the one-stage inference approach. It outperforms other real-time object detectors in terms of speed and accuracy by a wide margin. Nevertheless, since YOLO is developed upon a DNN backbone with numerous parameters, it will cause excessive memory load, thereby deploying it on memory-constrained devices is a severe challenge in practice. To overcome this limitation, model compression techniques, such as quantizing parameters to lower-precision values, can be adopted. As the most recent version of YOLO, YOLOv7 achieves such state-of-the-art performance in speed and accuracy in the range of 5 FPS to 160 FPS that it surpasses all former versions of YOLO and other existing models in this regard. So far, the robustness of several quantization schemes has been evaluated on older versions of YOLO. These methods may not necessarily yield similar results for YOLOv7 as it utilizes a different architecture. In this paper, we conduct in-depth research on the effectiveness of a variety of quantization schemes on the pre-trained weights of the state-of-the-art YOLOv7 model. Experimental results demonstrate that using 4-bit quantization coupled with the combination of different granularities results in ~3.92x and ~3.86x memory-saving for uniform and non-uniform quantization, respectively, with only 2.5% and 1% accuracy loss compared to the full-precision baseline model.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑