[1]贾云飞,郑红木,刘闪亮.基于YOLOv5s 的金属制品表面缺陷的轻量化算法研究[J].郑州大学学报(工学版),2022,43(05):31-38.[doi:10.13705/j.issn.1671-6833.2022.05.001]
 JIA Yunfei,ZHENG Hongmu,LIU Shanliang.Lightweight Surface Defect Detection Method of Metal Products Based on YOLOv5s[J].Journal of Zhengzhou University (Engineering Science),2022,43(05):31-38.[doi:10.13705/j.issn.1671-6833.2022.05.001]
点击复制

基于YOLOv5s 的金属制品表面缺陷的轻量化算法研究()
分享到:

《郑州大学学报(工学版)》[ISSN:1671-6833/CN:41-1339/T]

卷:
43卷
期数:
2022年05期
页码:
31-38
栏目:
出版日期:
2022-08-22

文章信息/Info

Title:
Lightweight Surface Defect Detection Method of Metal Products Based on YOLOv5s
作者:
贾云飞 郑红木 刘闪亮
中国民航大学电子信息与自动化学院;

Author(s):
JIA Yunfei ZHENG Hongmu LIU Shanliang
School of Electronic Information and Automation, Civil Aviation University of China, Tianjin 300300, China
关键词:
Keywords:
surface defect object detection light weight YOLOv5s tensorRT
分类号:
TP391. 7
DOI:
10.13705/j.issn.1671-6833.2022.05.001
文献标志码:
A
摘要:
为解决企业降低智能化成本的要求,运用低成本、低算力的硬件设备,通过深度学习中目标检测算法模型对产品进行缺陷检测。基于深度学习目标检测中的YOLOv5s网络,采用结构裁剪思想,并基于网络中的BN层对网络进行稀疏训练,将稀疏训练后的模型对应权重值较小的层进行裁剪,从而降低模型的计算参数数量以及模型文件大小,达到轻量化的效果。使用NVIDIA的加速推理框架TensorRT对训练好的裁剪模型进行层级融合,实现推理加速效果。实验结果表明:所提目标检测模型相对于原始YOLOv55模型权重文件大小降低约70% ,同时在公开数据集NEU-DET上检测精度达到了74.2%。在搭建的高性能实验台中单图推理速度相比原模型提升了11.3%6 ,且网络没有精度损失;在低性能实验台中,所提模型相比原网络模型推理速度提升了165%,相比高性能实验台中的结果有了更显著的提升,说明所提模型在低算力硬件设备中表现优秀。再针对所提模型采用公开的潜水泵叶轮的俯视图数据集进行普适性测试,最后对所提模型采用推理加速框架TensorRT进行加速后,在高性能实验台上可以达到单图5.8 ms的推理时间。所提目标检测模型在低算力硬件设备上推理速度提升较大,可以帮助企业降低预算.
Abstract:
In order to reduce the intelligent cost in the enterprise, the hardware equipment with low cost and low computing power was used to detect the defects of products through the object detection algorithm model in deep learning. Based on the YOLOv5s network in target detection, this study adopts the idea of structure cutting, sparsely training the network based on the BN layer, and cuting the sparsely trained model corresponding to the layer with small weight value, so as to reduce the number of calculation parameters and the size of model file and to achieve the effect of lightweight. Finally, the trained pruning model was hierarchically fused using NVIDIA′s accelerated framework TensorRT to realize the reasoning acceleration effect. The experimental results showed that the weight file size of this model was reduced by about 70% compared with the original YOLOv5s model, and the detection accuracy on the public dataset NEU-DET reached 74.2%. In the high-performance experimental platform built in this study, the single graph inference speed was improved by 11.3% compared with the original model, and the network had no accuracy loss. In the low-performance experimental platform compared with the original network model, the inference speed of this model increased by 165%, which was more significantly improved than the results in the high-performance experimental platform, indicating that this model perform well in low computing power hardware devices. Then the model was tested by using the open top view data set of submersible pump impeller. At last, the inference acceleration framework TensorRT is used to accelerate the model in this study, and the inference time of single figure 5.8 ms can be achieved on the high-performance experimental platform. The experimental results showed that the inference speed of this model could be greatly improved on low computing power hardware equipment, which could help enterprises reduce their budget.

参考文献/References:

[1] HE K M, ZHANG X Y, REN S Q, et al. Spatial pyramid pooling in deep convolutional networks for visual recognition[ J] . IEEE transactions on pattern analysis and machine intelligence, 2015, 37(9) :1904-1916. 

[2] GIRSHICK R, DONAHUE J, DARRELL T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation [ C] ∥2014 IEEE Conference on Computer Vision and Pattern Recognition. New York: ACM, 2014: 580-587.
[3] REN S Q, HE K M, GIRSHICK R, et al. Faster RCNN: towards real-time object detection with regio proposal networks[ J] . IEEE transactions on pattern analysis and machine intelligence, 2017, 39(6) : 1137 -1149. 
[4] REDMON J, FARHADI A. YOLOv3: an incremental improvement[EB / OL] . ( 2018 - 04 - 08) [ 2021 - 09- 01] . https: / / arxiv. org / abs/ 1804. 02767.
[5] ZHOU P, NI B B, GENG C, et al. Scale-transferrable object detection[ C] / / 2018 IEEE / CVF Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2018: 528-537. 
[6] LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot MultiBox detector[ C] / / European Conference on Computer Vision. Cham: Springer, 2016:21-37. 
[7] 程旭, 宋晨, 史金钢, 等. 基于深度学习的通用目 标检测 研 究 综 述 [ J] . 电 子 学 报, 2021, 49 ( 7) : 1428-1438. 
CHENG X, SONG C, SHI J G, et al. A survey of generic object detection methods based on deep learning [J]. Acta electronica sinica,2021,49(7): 1428-1438. 
[8] 郝用兴, 李泽坤, 张太萍, 等. 改进 Faster R-CNN 对铝型材表面瑕疵的检测 [ J] . 工 具 技 术, 2021, 55(3) : 76-80. 
HAO Y X, LI Z K, ZHANG T P, et al. Detection of surface defect of aluminum profile by improved faster R-CNN [ J ] . Tool engineering, 2021, 55 ( 3 ) : 76-80. 
[9] 程婧怡, 段先华, 朱伟. 改进 YOLOv3 的金属表面 缺陷检测研究[ J] . 计算机工程与应用, 2021, 57 (19) : 252-258. 
CHENG J Y, DUAN X H, ZHU W. Research on metal surface defect detection by improved YOLOv3[ J] . Computer engineering and applications, 2021, 57 (19) : 252-258. 
[10] LI Y, XU J B. Electronic product surface defect detection based on a MSSD network[ C] / / 2020 IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference. Piscataway: IEEE, 2020: 773-777. 
[11] REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified, real-time object detection [C] / / 2016 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2016: 779-788. 
[12] REDMON J, FARHADI A. YOLO9000: better, faster, stronger[C] / / 2017 IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE, 2017: 6517-6525.
[13] 陈友升, 周介祺, 梁敏健, 等. 基于 YOLOv5 视觉 感知的实时叉车驾驶操作行为识别方法[ J] . 自动 化与信息工程, 2021, 42(3) : 21-26. 
CHEN Y S, ZHOU J Q, LIANG M J, et al. Real time forklift driving operation behavior recognition method based on YOLOv5 visual perception [ J] . Automation & information engineering, 2021, 42(3) : 21-26. 
[14] IOFFE S, SZEGEDY C. Batch normalization: accelerating deep network training by reducing internal covariate shift[EB / OL] . ( 2015 - 02 - 11) [ 2021 - 09 - 16] . https: / / arxiv. org / abs/ 1502. 03167. 
[15] SHI X H, HU J, LEI X Y, et al. Detection of flying birds in airport monitoring based on improved YOLOv5 [C] / / 2021 6th International Conference on Intelligent Computing and Signal Processing (ICSP). Piscataway: IEEE, 2021: 1446-1451.
[16] DETTMERS T, ZETTLEMOYER L. Sparse networks from scratch: faster training without losing performance [EB / OL] . (2019-06-13) [ 2021- 09- 14] . https: / / arxiv. org / abs/ 1907. 04840. 
[17] 周立君, 刘宇, 白璐, 等. 使用 TensorRT 进行深度 学习推理[ J] . 应用光学, 2020, 41(2) : 337-341. ZHOU L J, LIU Y, BAI L, et al. Using TensorRT for deep learning and inference applications [ J] . Journal of applied optics, 2020, 41(2) : 337-341. 
[18] 张震, 李浩方, 李孟洲, 等. 改进 YOLOv3 算法与 人体信息数据融合的视频监控检测方法[ J] . 郑州 大学学报(工学版) , 2021, 42(1) : 28-34. 
ZHANG Z, LI H F, LI M Z, et al. Video surveillance detection method based on improved YOLOv3 algorithm and human body information data fusion[J]. Journal of Zhengzhou university ( engineering science), 2021, 42 (1): 28-34. 
[19] LIU Z, LI J G, SHEN Z Q, et al. Learning efficient convolutional networks through network slimming[C] / / 2017 IEEE International Conference on Computer Vision. Piscataway: IEEE, 2017: 2755-2763.
[20] 陈建强, 刘明宇, 符秦沈, 等. 基于深度学习的热 轧钢带表 面 缺 陷 检 测 方 法 [ J] . 自 动 化 与 信 息 工 程, 2019, 40(4) : 11-16, 19. CHEN J Q, LIU M Y, FU Q S, et al. Hot rolled steel strip surface defect detection method based on deep learning [ J] . Automation & information engineering, 2019, 40(4) : 11-16, 19.

相似文献/References:

[1]陈义飞、郭胜、潘文安、陆彦辉.基于多源传感器数据融合的三维场景重建[J].郑州大学学报(工学版),2021,42(02):81.[doi:10.13705/j.issn.1671-6833.2021.02.008]
 Chen Yifei,Guo Sheng,Pan Wenan,et al.3D Scene Reconstruction Based on Multi-source Sensor Data Fusion[J].Journal of Zhengzhou University (Engineering Science),2021,42(05):81.[doi:10.13705/j.issn.1671-6833.2021.02.008]
[2]杨 起,刘牧耕,马 郓.一种面向UI 手稿识别的数据集制作方法[J].郑州大学学报(工学版),2022,43(06):1.[doi:10.13705/j.issn.1671-6833.2022.06.009]
 YANG Qi,LIU Mugeng,MA Yun.An Efficient Approach to Creating Hand-Drawn Dataset for UI Manuscript Recognition[J].Journal of Zhengzhou University (Engineering Science),2022,43(05):1.[doi:10.13705/j.issn.1671-6833.2022.06.009]

更新日期/Last Update: 2022-08-20