CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD Images - Peng Dong; Weihua Feng; Rui Wang; Mingyan Zhang; Qunye Hong; Yongsheng Wang; Di Wang; Guohao Zong (IEEE Access)
In cigarette production, detecting cigarette pack defects is crucial for ensuring that products meet quality standards. The failure to detect defective packs promptly may affect production efficiency and material consumption. Hence, in this study, we used Charge-Coupled Device (CCD) cameras to collect many defect images from real industrial production lines. A relatively comprehensive cigarette pack defect dataset, called CigPack, was established based on complex defect features of different sizes and structures. Consequently, this paper proposes an improved CP-YOLO algorithm based on YOLOv5 to address the characteristics of cigarette pack defects including large size variations and complex foreground-background information. The algorithm integrates multi-scale aggregate convolution into the BottleneckCSP architecture to form the C3MSAC module. This module extracts and fuses grouped features at multiple scales to enhance the multi-scale representation of input feature maps. Additionally, a balanced-domain loss function, which introduces normalized Wasserstein distance to optimize the guidance of the network for bounding boxes with different geometric characteristics, is proposed. Experimental results demonstrate that CP-YOLO achieved average accuracy improvements of 2.9% and 2.5% on the CigPack dataset, without increasing computational complexity. The model also demonstrated excellent detection accuracy and robustness on steel surface defect dataset and printed circuit board defect dataset.