
科学技术与工程

中国技术经济学会
融合RepVit和剪枝的路面缺陷加速化检测方法
Accelerated Detection Method for Road Defects by Integrating RepVit and Pruning
针对于在资源受限的移动设备进行路面缺陷检测工作需要推理速度快且性能优异的模型,提出了一种基于改进YOLOv5的路面缺陷检测算法:YOLO-RGCS。训练前先使用K-means++聚类算法生成预锚框,然后引入轻量化视觉转换器(RepViT),消除和跳过无关的计算和内存成本,提升推理速度;其次添加深度可分离卷积块,减少模型的计算量;再添加注意力机制提升模型对单图多目标的关注及削弱背景干扰因素;最后对模型进行网络通道剪枝,移除一些冗余的网络通道来提高模型的效率和速度。模型进行测试的结果表明:相比于原模型,YOLO-RGCS模型体积减小了14%,检测速度提升了11.8%,其中准确率和召回率分别提高了5%和9.8%,mAP增长了2.7%,证明了YOLO-RGCS的加速化改进,能够适用于部署到移动端或低成本的环境中用于路面缺陷的实时检测。
Aiming at the need for a fast inference speed and excellent performance model for road defect detection on resource-constrained mobile devices, an improved YOLOv5-based road defect detection algorithm, YOLO-RGCS, was proposed. Before training, K-means + + clustering algorithm was used to generate pre-anchor boxes. Then, a lightweight vision transformer(RepViT) was introduced to eliminate and skip irrelevant computational and memory costs, improving inference speed. Subsequently, depthwise separable convolution blocks were added to reduce the model's computational load. Furthermore, an attention mechanism was incorporated to enhance the model's focus on multiple targets in a single image and to weaken background interference factors. Finally, network channel pruning was performed to remove some redundant network channels, improving the model's efficiency and speed. The test results of the model show that compared to the original model, the YOLO-RGCS model has a reduced volume of 14%, an increased detection speed of 11.8%, with Precision and recall improving by 5% and 9.8%, respectively, and mAP increasing by 2.7%. These results demonstrate the acceleration improvement of YOLO-RGCS, making it suitable for deployment on mobile devices or in low-cost environments for real-time road defect detection.
缺陷检测 / YOLOv5 / RepViT / 深度可分离卷积 / 剪枝
defect detection / YOLOv5 / RepViT / depthwise separable convolution / pruning
/
| 〈 |
|
〉 |