Defect Detection of Printed Matter Based on Improved YOLOv5l
Herein,to address the issues associated with traditional manual defect detection in printing production,such as time and effort consumption,difficulty in detecting small defect areas,and poor robustness,an improved YOLOv5l-based printing defect detection algorithm is proposed.First,by expanding the detection scale by adding shallow feature maps to capture small defect information,the ability of the network to detect small targets is improved.Subsequently,the ordinary convolution in the Neck area is replaced with full-dimensional dynamic convolution to enhance the ability of the network to capture contextual printing defect information.Finally,to address the issue of reduced detection speed caused by the aforementioned two modifications,the C3 module in the Neck area is replaced with C3Ghost to improve detection speed to the maximum extent possible with considerably low detection accuracy loss.Experimental results show that the proposed algorithm has a detection speed of 44.1 frame/s,and its mean average precision(mAP)reaches 97.3%,which is 2.9 percentage points and 2.7 percentage points higher than those of the original YOLOv5l algorithm and an existing printing defect detection algorithm-Siamese-YOLOv4,respectively.The proposed algorithm outperforms the original YOLOv5l and Siamese-YOLOv4 algorithms in classifying and locating defects in printed products with high detection accuracy and speed.Thus,the proposed algorithm can be applied to print quality inspection to improve production quality control levels and reduce labor costs.