Liu Jie, Cai Zelong, He Kuanfang, Huang Chengqiang, Lin Xianxin, Liu Zhenyong, Li Zhicong, Chen Minsheng
School of Mechatronics Engineering and Automation, Foshan University, Foshan 528225, China.
Sensors (Basel). 2024 Nov 21;24(23):7429. doi: 10.3390/s24237429.
During the production process of inkjet printing labels, printing defects can occur, affecting the readability of product information. The distinctive shapes and subtlety of printing defects present a significant challenge for achieving high accuracy and rapid detection in existing deep learning-based defect detection systems. To overcome this problem, we propose an improved model based on the structure of the YOLOv5 network to enhance the detection performance of printing defects. The main improvements include the following: First, we introduce the C3-DCN module to replace the C3 module in the backbone network, enhancing the model's ability to detect narrow and elongated defects. Secondly, we incorporate the Large Selective Kernel (LSK) and RepConv modules into the feature fusion network, while also integrating a loss function that combines Normalized Gaussian Wasserstein Distance (NWD) with Efficient IoU (EIoU) to enhance the model's focus on small targets. Finally, we apply model pruning techniques to reduce the model's size and parameter count, thereby achieving faster detection. Experimental results demonstrate that the improved YOLOv5 achieved a mAP@0.5 of 0.741 after training, with 323.2 FPS, which is 2.7 and 20.8% higher than that of YOLOv5, respectively. The method meets the requirements of high precision and high efficiency for printing defect detection.
在喷墨打印标签的生产过程中,可能会出现打印缺陷,影响产品信息的可读性。打印缺陷独特的形状和细微之处,给现有的基于深度学习的缺陷检测系统实现高精度和快速检测带来了重大挑战。为克服这一问题,我们提出一种基于YOLOv5网络结构的改进模型,以提高打印缺陷的检测性能。主要改进包括:第一,引入C3-DCN模块替换主干网络中的C3模块,增强模型检测狭窄和细长缺陷的能力。第二,将大选择性内核(LSK)和RepConv模块纳入特征融合网络,同时集成一种结合归一化高斯瓦瑟斯坦距离(NWD)和高效交并比(EIoU)的损失函数,以增强模型对小目标的关注。最后,应用模型剪枝技术减小模型大小和参数数量,从而实现更快的检测。实验结果表明,改进后的YOLOv5训练后mAP@0.5达到0.741,帧率为323.2 FPS,分别比YOLOv5高2.7%和20.8%。该方法满足打印缺陷检测高精度和高效率的要求。