347 | 0 | 60 |
下载次数 | 被引频次 | 阅读次数 |
【背景和目的】卷烟厂在生产中不可避免会出现有外观缺陷的烟支,而外观缺陷会严重影响烟草产品的质量。因此,在烟支高速生产线上,有实时检测烟支外观缺陷并剔除外观缺陷烟支的需求。【方法】提出一种基于YOLOv7tiny的烟支外观缺陷的快速检测模型,该模型被命名为CAD-YOLO(Cigarette Appearance Defects detection using YOLO)。在该模型中,特征提取网络中引入了可变形卷积网络的升级版(DCNv2),通过对采样点添加偏移量来灵活提取特征,自适应复杂缺陷的几何形状,以此提升模型的特征提取能力;在颈部网络的特征融合金字塔中,引入了双向加权特征融合金字塔,并在P5特征层上增加了来自P2特征层的跳层连接,加强了颈部网络在深层特征上的特征融合能力;引入定位损失函数WIoUv3,降低了数据集中低质量实例产生的不利梯度,增加定位精度和检测精度,最后使用带有多头自注意力的基于注意的尺度内特征交互(Attention-based Intrascale Feature Interaction,AIFI)模块替换了特征池化金字塔模块,进一步增强多尺度融合能力。【结果】CAD-YOLO模型的平均检测精度为94.1%,召回率为92.4%,每支烟支图像检测时长仅12.0ms。【结论】所提出的模型可以应用于烟支高速生产流水线,能为烟支生产质量控制提供保障。
Abstract:[Background] Appearance defects in cigarette production are inevitable during production in cigarette factories, and such defects can severely impact the quality of tobacco products. Therefore, there is a need for real-time detection and removal of defective cigarettes on high-speed production lines. [Methods] This paper proposes a real-time defects detection model for cigarette appearance based on improved YOLOv7tiny, named CAD-YOLO. In this model, the upgraded version of deformable convolutional networks(DCNv2)is introduced in the feature extraction network, which adds offsets to sampling points to flexibly extract features, adapting to complex defect geometries and enhancing the model's feature extraction capability. In the feature fusion pyramid of the neck network, a bidirectional weighted feature pyramid is incorporated, along with a skip connection from the P2 feature layer to the P5 feature layer, which strengthens the feature fusion capability in deep-layer features of the neck network. Moreover, WIoUv3 localization loss function is introduced to reduce adverse gradients from low-quality instances in the dataset, increasing localization accuracy and detection precision.. Finally, the Attention-based Intrascale Feature Interaction(AIFI) module, featuring multi-head self-attention, replaces the feature pooling pyramid module, further enhancing multi-scale fusion capabilities. [Results] The experimental results show that the CAD-YOLO model achieves an average detection accuracy of 94.1%, a recall rate of 92.4%, and a detection time of only 12.0ms per cigarette image. [Conclusion] The proposed model can be applied to high-speed cigarette production lines, providing assurance for quality control in cigarette production.
[1] Girshick R, Donahue J, Darrell T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23-28 June 2014;IEEE Computer Society Press:Los Alamitos, CA, USA, 2014; pp.580-587.
[2] Girshick R. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, Santiago, Chile, 7-13 December2015; IEEE Computer Society Press:Los Alamitos, CA, USA,2015; pp. 1440-1448.
[3] Ren S, He K, Girshick R, Sun J. Faster r-cnn:Towards real-time object detection with region proposal networks. IEEE Trans.Pattern Anal. Mach. Intell. 2017, 39, 1137-1149.
[4] Redmon J, Divvala S, Girshick R, Farhadi A. You only look once:Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; IEEE Computer Society Press:Los Alamitos, CA, USA, 2016; pp. 779-788.
[5] Redmon J, Farhadi A. YOLO9000:Better, faster, stronger. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21-26 July 2017; IEEE Computer Society Press:Los Alamitos, CA, USA, 2017; pp.7263-7271.
[6] Redmon J, Farhadi A. Yolov3:An incremental improvement.arXiv2018, arXiv:1804.02767.
[7] Bochkovskiy A, Wang CY, Liao H. Yolov4:Optimal speed and accuracy of object detection.arXiv2020, arXiv:2004.10934.
[8] Wei L, Dragomir A, Dumitru E, Christian S, Scott R, Cheng-Yang F. SSD:Single shot multibox detector. In European Conference on Computer Vision; Springer:Berlin/Heidelberg, Germany, 2016; pp.21-37.
[9] Chen Ssu-Han, Tsai Chia-Chun. SMD LED chips defect detection using a YOLOv3-dense model, Advanced Engineering Informatics,Volume 47, 2021, 101255, ISSN 1474-0346, https://doi.org/10.1016/j.aei.2021.101255.
[10] XIA Beixin, CAO Jianbin, WANG Chen. SSIM-NET:Real-time PCB defect detection based on SSIM and MobileNet-V3. In:20192nd World Conference on Mechanical Engineering and Intelligent Manufacturing(WCMEIM). IEEE, 2019. p. 756-759.
[11] Hu B, Wang J. Detection of PCB surface defects with improved faster-RCNN and feature pyramid network[J]. Ieee Access, 2020, 8:108335-108345.
[12] GUAN Shengqi, et al. Ceramic ring defect detection based on improved YOLOv5. In:2022 3rd International Conference on Computer Vision, Image and Deep Learning&International Conference on Computer Engineering and Applications(CVIDL&ICCEA). IEEE, 2022. p. 115-118.
[13] CHEN Le, et al. Detection of Polarizer Surface Defects Based on an Improved Lightweight YOLOv3 Model. In:2022 4th International Conference on Intelligent Control, Measurement and Signal Processing(ICMSP). IEEE, 2022:138-142.
[14] Li Y. and Xu J.“Electronic Product Surface Defect Detection Based on a MSSD Network,” 2020 IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference(ITNEC), Chongqing, China, 2020, pp. 773-777, doi:10.1109/ITNEC48623.2020.9084756.
[15] LI Yu, WANG Ziwei. Research on textile defect detection based on improved cascade R-CNN. In:2021 International Conference on Artificial Intelligence and Electromechanical Automation(AIEA).IEEE, 2021. p. 43-46.
[16] Kou Xupeng, Liu Shuaijun, Cheng Kaiqiang, et al. Development of a YOLO-V3-based model for detecting defects on steel strip surface,Measurement, Volume 182,2021,109454, https://doi.org/10.1016/j.measurement.2021.109454.
[17] LI Lu, JIANG Zhanjun, LI Yanneng. Surface Defect Detection Algorithm of Aluminum Based on Improved Faster RCNN. In:2021 IEEE 9th International Conference on Information, Communication and Networks(ICICN). IEEE, 2021. p. 527-531.
[18]袁国武,刘建成,刘鸿瑜,瞿睿,周浩.基于ResNeSt的烟支外观缺陷分类[J].云南大学学报(自然科学版),2022, 44(03):464-470.YUAN Guowu, LIU Jiancheng, LIU Hongyu, et al. ResNeSt based cigarettes classification of appearance defects[J]. Journal of Yunnan University(Natural Science Edition), 2022, 44(03):464-470.
[19] Rui Qu, Guowu Yuan, Jianchen Liu, et al. Detection of cigarette appearance defects based on improved SSD model. In Proceedings of the 2021 5th International Conference on Electronic Information Technology and Computer Engineering(EITCE'21). Association for Computing Machinery, New York,NY, USA, 1148-1153.https://doi.org/10.1145/3501409.3501612
[20]刘鸿瑜,袁国武.基于改进YOLOv5s的烟支外观缺陷检测方法[J].计算机技术与发展,2022, 32(08):161-167.LIU Hongyu, YUAN Guowu. A method for detecting cigarette appearance defects based on improved YOLOv5s[J]. Computer Technology and Development, 2022, 32(08):161-167.
[21] Guowu Yuan, Jiancheng Liu, Hongyu Liu, et al. Detection of cigarette appearance defects based on improved YOLOv4[J].Electronic Research Archive, 2023, 31(3):1344-1364.
[22] Hongyu Liu, Guowu Yuan, Lei Yang, et al. An appearance defect detection method for cigarettes based on C-CenterNet[J]. Electronics,Vol.11(14):2182, 2022.
[23]徐大勇,邓国栋,刘朝贤,等.烟支刺破梗签粒度分析[J].中国烟草学报,2021, 27(01):37-42.XU Dayong, DENG Guodong, LIU Chaoxian, et al. Particle size analysis of cigarette puncture stem label[J]. Acta Tabacaria Sinica,2021, 27(01):37-42.
[24]栗勇伟,乔建军,马少军,等.卷接机组烟支搓接质量的研究及改进[J].烟草科技,2012(10):24-27.LI Yongwei, QIAO Jianjun, MA Shaojun, et al. Research and improvement on the quality of cigarette rubbing in rolling machine unit[J]. Tobacco Science&Technology, 2012(10):24-27.
[25] Zheng Z, Wang P, Liu W, Li J, Ye R, Ren D. Distance-iou loss:Faster and better learning for bounding box regression. In Proceedings of the Thirty-Fourth AAAI Conference on Artificial Intelligence(AAAI-20), New York, NY, USA, 7–12 February 2020;Volume 34, pp. 12993–13000.
[26] Zhu X, Hu H, Lin S, et al. Deformable convnets v2:More deformable, better results[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2019:9308-9316.
[27] Tan M, Pang R, Le Q V. Efficientdet:Scalable and efficient object detection[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2020:10781-10790.
[28] Lv W, Xu S, Zhao Y, et al. Detrs beat yolos on real-time object detection[J]. arXiv preprint arXiv:2304.08069, 2023.
[29] Tong Z, Chen Y, Xu Z, et al. Wise-IoU:Bounding Box Regression Loss with Dynamic Focusing Mechanism[J]. arXiv preprint arXiv:2301.10051, 2023.
[30] Dai J, Qi H, Xiong Y, et al. Deformable convolutional networks[C]//Proceedings of the IEEE international conference on computer vision. 2017:764-773.
[31] Lin T-Y, Dollár P, Girshick R, He K, Hariharan B, Belongie S.Feature pyramid networks for object detection. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition(CVPR), Honolulu, HI, USA, 21–26 July 2017; pp.2117–2125.
[32] Liu S, Qi L, Qin H, Shi J, Jia J. Path aggregation network for instance segmentation. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 8759–8768.
[33] Li C, Li L, Jiang H, et al. YOLOv6:A single-stage object detection framework for industrial applications[J]. arXiv preprint arXiv:2209. 02976, 2022.
[34] Xu S, Wang X, Lv W, et al. PP-YOLOE:An evolved version of YOLO[J]. arXiv preprint arXiv:2203.16250, 2022.
[35] Terven Juan, and Diana Cordova-Esparza.“A comprehensive review of YOLO:From YOLOv1 to YOLOv8 and beyond.” arXiv preprint arXiv:2304.00501(2023).
[36] Lyu C, Zhang W, Huang H, et al. Rtmdet:An empirical study of designing real-time object detectors[J]. arXiv preprint arXiv:2212.07784, 2022.
[37] Ge Z, Liu S, Wang F, et al. Yolox:Exceeding yolo series in 2021[J].arXiv preprint arXiv:2107.08430, 2021.
[38] Chen Q, Wang Y, Yang T, et al. You only look one-level feature[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2021:13039-13048.
基本信息:
DOI:10.16472/j.chinatobacco.2024.T0168
中图分类号:TP391.41;TS47
引用信息:
[1]袁国武,马一海,吴昊等.一种实时高精度烟支外观缺陷检测方法[J].中国烟草学报,2025,31(02):47-57.DOI:10.16472/j.chinatobacco.2024.T0168.
基金信息:
云南省科技厅-云南大学“双一流”建设联合专项重点项目“基于深度学习的烟支外观缺陷检测”(No.202201BF070001-005); 国家自然科学基金项目“基于深度学习的太阳射电频谱自动检测研究”(No.12263008)