A Novel Hybrid YOLO Approach for Precise Paper Defect Detection With a Dual-Layer Template and an Attention Mechanism
Xuanfeng Li, Haibo Yan, Kai Cui, Zhiwu Li, Ruibin Liu, Guibin Lu, Kai Chin Hsieh, Xiaoshi Liu, Chitin Hon
Abstract
In a printing production process, paper often exhibits various surface defects due to objective factors. These defects manifest in different forms and are typically small and densely distributed, posing a challenge for existing object detection methods. To tackle this issue, this research reports a paper product appearance inspection system that combines a dual-layer template and an attention mechanism. The system effectively addresses the problem of surface defect detection by matching template images with the images to be inspected. This approach ensures robust detection performance and reduces false negatives (FNs) through the utilization of the improved You Only Look Once v7 (YOLOv7) algorithm. The enhanced algorithm incorporates diverse attention mechanisms that effectively utilize features, thereby enhancing the model’s capability for defect detection. The system’s development includes the creation of a visual interface that provides a customized defect detection solution for the printing authority. Through comprehensive ablation experiments, the algorithm demonstrates significant improvements in both detection accuracy and speed. This system enables automatic inspection of the appearance of single-page paper products and automates the removal of products with surface defects. Consequently, it achieves a high level of automation in the inspection and handling processes for single-page paper products.