CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD Images

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 colle...

Full description

Saved in:
Bibliographic Details
Main Authors: Peng Dong, Weihua Feng, Rui Wang, Mingyan Zhang, Qunye Hong, Yongsheng Wang, Di Wang, Guohao Zong
Format: Article
Language:English
Published: IEEE 2025-01-01
Series:IEEE Access
Subjects:
Online Access:https://ieeexplore.ieee.org/document/10942327/
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1850271888778985472
author Peng Dong
Weihua Feng
Rui Wang
Mingyan Zhang
Qunye Hong
Yongsheng Wang
Di Wang
Guohao Zong
author_facet Peng Dong
Weihua Feng
Rui Wang
Mingyan Zhang
Qunye Hong
Yongsheng Wang
Di Wang
Guohao Zong
author_sort Peng Dong
collection DOAJ
description 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.
format Article
id doaj-art-3bb6f1f96c454ba4b0ac2c07e7e0ac58
institution OA Journals
issn 2169-3536
language English
publishDate 2025-01-01
publisher IEEE
record_format Article
series IEEE Access
spelling doaj-art-3bb6f1f96c454ba4b0ac2c07e7e0ac582025-08-20T01:52:03ZengIEEEIEEE Access2169-35362025-01-0113573545736810.1109/ACCESS.2025.355498910942327CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD ImagesPeng Dong0https://orcid.org/0000-0002-9338-7704Weihua Feng1Rui Wang2Mingyan Zhang3Qunye Hong4Yongsheng Wang5Di Wang6Guohao Zong7https://orcid.org/0000-0002-0617-3610Zhengzhou Tobacco Research, China National Tobacco Corporation (CNTC), Zhengzhou, ChinaZhengzhou Tobacco Research, China National Tobacco Corporation (CNTC), Zhengzhou, ChinaZhengzhou Tobacco Research, China National Tobacco Corporation (CNTC), Zhengzhou, ChinaGolden Leaf Production and Manufacturing Center, Zhengzhou, ChinaZhengzhou Tobacco Research, China National Tobacco Corporation (CNTC), Zhengzhou, ChinaZhengzhou Tobacco Research, China National Tobacco Corporation (CNTC), Zhengzhou, ChinaZhengzhou Tobacco Research, China National Tobacco Corporation (CNTC), Zhengzhou, ChinaZhengzhou Tobacco Research, China National Tobacco Corporation (CNTC), Zhengzhou, ChinaIn 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.https://ieeexplore.ieee.org/document/10942327/YOLOv5cigarette packdefect detectionmulti-scale feature extractionWasserstein distance
spellingShingle Peng Dong
Weihua Feng
Rui Wang
Mingyan Zhang
Qunye Hong
Yongsheng Wang
Di Wang
Guohao Zong
CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD Images
IEEE Access
YOLOv5
cigarette pack
defect detection
multi-scale feature extraction
Wasserstein distance
title CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD Images
title_full CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD Images
title_fullStr CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD Images
title_full_unstemmed CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD Images
title_short CP-YOLO: An Algorithm for Cigarette Pack Defects Detection Based on CCD Images
title_sort cp yolo an algorithm for cigarette pack defects detection based on ccd images
topic YOLOv5
cigarette pack
defect detection
multi-scale feature extraction
Wasserstein distance
url https://ieeexplore.ieee.org/document/10942327/
work_keys_str_mv AT pengdong cpyoloanalgorithmforcigarettepackdefectsdetectionbasedonccdimages
AT weihuafeng cpyoloanalgorithmforcigarettepackdefectsdetectionbasedonccdimages
AT ruiwang cpyoloanalgorithmforcigarettepackdefectsdetectionbasedonccdimages
AT mingyanzhang cpyoloanalgorithmforcigarettepackdefectsdetectionbasedonccdimages
AT qunyehong cpyoloanalgorithmforcigarettepackdefectsdetectionbasedonccdimages
AT yongshengwang cpyoloanalgorithmforcigarettepackdefectsdetectionbasedonccdimages
AT diwang cpyoloanalgorithmforcigarettepackdefectsdetectionbasedonccdimages
AT guohaozong cpyoloanalgorithmforcigarettepackdefectsdetectionbasedonccdimages