目的 针对皮革包装产品外表面容易出现划伤、褶皱、污渍等现象,传统图像处理方法依赖手工特征提取,难以适应复杂的纹理变化,其检测精度和鲁棒性均受到限制。为此提出一种基于深度学习的融合注意力机制和加权双向特征网络的皮革缺陷检测方法。方法 以YOLOv5s为基准模型,在其主干网络中引入CA、CBAM注意力机制,以增强模型对关键缺陷特征的关注能力。同时,利用加权双向特征金字塔网络重构其颈部结构,提高特征融合效率。最后,将上述改进方法进行联合集成,以提升检测性能。结果 在构建的缺陷皮革数据集上进行训练和测试,结果显示,相较于基准模型,所提方法的Precision值提高了2.73%,Recall值提高了2.68%,mAP@0.5值提高了2.67%,mAP@0.5:0.95值提高了2.63%,F1 score值提高了2.7%。结论 该方法缓解了传统目标检测模型在皮革包装缺陷检测任务中存在的预测框定位偏差、漏检和误检等问题,为皮革包装缺陷检测提供了可行的改进方案。
Abstract
The work aims to propose a deep learning-based leather defect detection method that integrates attention mechanisms with a weighted bidirectional feature network so as to solve problems that the surface of leather-packaging products is highly susceptible to defects such as cut, fold, and stains, and that traditional image processing methods rely on handcrafted feature extraction, making them inadequate for handling complex texture variations, thereby limiting both detection accuracy and robustness. Specifically, based on the YOLOv5s architecture, Coordinate Attention (CA) and Convolutional Block Attention Module (CBAM) were incorporated into the backbone to enhance the model's ability to focus on key defect features. Meanwhile, a weighted bidirectional feature pyramid network was utilized to reconstruct the neck structure, thereby improving feature fusion efficiency. These enhancements were jointly integrated to boost detection performance. Experimental results on a custom-built leather defect dataset demonstrated that, compared with the baseline YOLOv5s model, the proposed method achieves improvements of 2.73% in Precision, 2.68% in Recall, 2.67% in mAP@0.5, 2.63% in mAP@0.5:0.95, and 2.7% in F1 score. The proposed approach effectively mitigates issues such as localization deviation, missed detection, and false detection commonly observed in conventional object detection models, providing a practical and improved solution for leather packaging defect inspection.
关键词
包装产业 /
皮革缺陷 /
深度学习 /
注意力机制 /
加权双向特征 /
融合集成
Key words
packaging industry /
leather defects /
deep learning /
attention mechanism /
weighted bidirectional features /
fusion integration
{{custom_sec.title}}
{{custom_sec.title}}
{{custom_sec.content}}
参考文献
[1] CAO J, LI J, LIU G, et al.Automatic Fiber Placement Accuracy Detection Based on Morphology[J]. Modern Manufacturing Engineering, 2024(5): 15-22.
[2] 方亮泰, 董子靖, 朱文博, 等. 织物表面缺陷检测的研究进展[J]. 毛纺科技, 2023, 51(4): 94-101.
FANG L T, DONG Z J, ZHU W B, et al.Research Progress in Fabric Surface Defect Detection[J]. Wool Textile Journal, 2023, 51(4): 94-101.
[3] HUANG X.Survey of Intelligent Inspection Based on Image Perception[J]. High Voltage Engineering, 2024, 50(5): 1826-1841.
[4] CHEN R, JI X, ZHANG M, et al.Progress and Research Status in Machine Learning for Defect Detection in Laser Cladding Coatings[J]. China Surface Engineering, 2024, 37(5): 112-137.
[5] LIANG H, WANGY, JIA W.Research on Defect Detection Method for Natural Gas Steel Pipeline Based on Machine Learning[J]. Journal of Safety and Environment, 2023, 23(10): 3528-3537.
[6] 刘莉琳, 谭荣, 高翔. 不同机器学习模型对钢板缺陷分类的性能比较[J]. 现代电子技术, 2021, 44(1): 101-106.
LIU L L, TAN R, GAO X.Comparison on Different Machine Learning Models' Steel Plate Defect Classification Performance[J]. Modern Electronics Technique, 2021, 44(1): 101-106.
[7] LI S, YANG J, WANG Z, et al.Review of Development and Application of Defect Detection Technology[J]. Acta Automatica Sinica, 2020, 46(11): 2319-2336.
[8] LUO D, CAI Y, YANG Z, et al.Survey on Industrial Defect Detection with Deep Learning[J]. Scientia Sinica Informationis, 2022, 52(6): 1002-1039.
[9] 宗国浩, 张明琰, 王锐, 等. 卷烟包装外观缺陷数据集构建及深度学习检测技术研究[J]. 包装工程, 2024, 45(5): 135-143.
ZONG G H, ZHANG M Y, WANG R, et al.Cigarette Packaging Appearance Defect Data Set Construction and Deep Learning Detection Technology Research[J]. Packaging Engineering, 2024, 45(5): 135-143.
[10] 王军, 万书东, 程勇. 基于改进YOLOv5s的白酒瓶盖瑕疵检测[J]. 包装工程, 2024, 45(7): 180-188.
WANG J, WAN S D, CHENG Y.Liquor Bottle Cap Defect Detection Based on Improved YOLOv5s[J]. Packaging Engineering, 2024, 45(7): 180-188.
[11] CHEN H, SU L J, TIAN Y R, et al.A Robust YOLOv5 Model with SE Attention and BIFPN for Jishan Jujube Detection in Complex Agricultural Environments[J]. Agriculture, 2025, 15(6): 665.
[12] LUAN D.Design of Apple Target Detection Algorithm Based on Improved YOLOv5 Model[J]. Journal of Physics: Conference Series, 2025, 2999(1): 012017.
[13] WANG J, ZHANG L, LI Z.Research on Cigarette Recognition based on Improved YOLOv5[J]. International Core Journal of Engineering, 2025, 11(4): 60-69.
[14] YUE Y H, ZHANG W.Detection and Counting Model of Soybean at the Flowering and Podding Stage in the Field Based on Improved YOLOv5[J]. Agriculture, 2025, 15(5): 528.
[15] LIU G Y, ZHANG S, WANG L X, et al.Research on Mechanical Automatic Food Packaging Defect Detection Model Based on Improved YOLOv5 Algorithm[J]. PLoS One, 2025, 20(4): e0321971.
[16] 蒋亚军, 曹昭辉, 丁椒平, 等. 基于改进YOLOv5s模型纸杯缺陷检测方法[J]. 包装工程, 2023, 44(11): 249-258.
JIANG Y J, CAO Z H, DING J P, et al.Paper Cup Defect Detection Method Based on the Improved YOLOv5s Model[J]. Packaging Engineering, 2023, 44(11): 249-258.
[17] 叶宇星, 孙志锋, 马风力, 等. 基于改进YOLOv5s的腌制蔬菜真空包装缺陷检测[J]. 包装工程, 2023, 44(9): 45-53.
YE Y X, SUN Z F, MA F L, et al.Vacuum Packaging Defect Detection of Pickled Vegetables Based on Improved YOLOv5s[J]. Packaging Engineering, 2023, 44(9): 45-53.
[18] 王新良, 马耀博. 改进Yolov5的医废包装袋破损检测方法[J]. 计算机工程与设计, 2022, 43(12): 3513-3520.
WANG X L, MA Y B.Improved Yolov5 Method for Detecting Damage of Medical Waste Packaging Bags[J]. Computer Engineering and Design, 2022, 43(12): 3513-3520.
[19] GIRSHICK R, DONAHUE J, DARRELL T, et al.Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation[C]// 2014 IEEE Conference on Computer Vision and Pattern Recognition. Columbus: IEEE, 2014: 580-587.
[20] GIRSHICK R.Fast R-CNN[C]// 2015 IEEE International Conference on Computer Vision (ICCV). Santiago: IEEE, 2015: 1440-1448.
[21] REN S Q, HE K M, GIRSHICK R, et al.Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 1137-1149.
[22] HE K M, GKIOXARI G, DOLLÁR P, et al. Mask R-CNN[C]// 2017 IEEE International Conference on Computer Vision (ICCV). Venice: IEEE, 2017: 2980-2988.
[23] LIU W, ANGUELOV D, ERHAN D, et al.SSD: Single Shot MultiBox Detector[M]// Computer Vision - ECCV 2016. Cham: Springer International Publishing, 2016: 21-37.
[24] LIN T Y, DOLLÁR P, GIRSHICK R, et al. Feature Pyramid Networks for Object Detection[C]// 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Honolulu: 2017: 936-944.
[25] LIU S, QI L, QIN H F, et al.Path Aggregation Network for Instance Segmentation[C]// 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 8759-8768.
[26] TAN M X, PANG R M, LE Q V.EfficientDet: Scalable and Efficient Object Detection[C]// 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Seattle: IEEE, 2020: 10781-10790.
[27] HU J, SHEN L, SUN G.Squeeze-and-Excitation Networks[C]// 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 7132-7141.
[28] WANG Q L, WU B G, ZHU P F, et al.ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks[C]// 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Seattle: IEEE, 2020: 11534-11542.
[29] HOU Q B, ZHOU D Q, FENG J S.Coordinate Attention for Efficient Mobile Network Design[C]// 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Nashville: IEEE, 2021: 13708-13717.
[30] WOO S, PARK J, LEE J Y, et al.CBAM: Convolutional Block Attention Module[C]// Computer Vision - ECCV 2018. Cham: Springer International Publishing, 2018: 3-19.
[31] SELVARAJU R R, COGSWELL M, DAS A, et al.Grad-CAM: Visual Explanations from Deep Networks via Gradient-Based Localization[J]. International Journal of Computer Vision, 2020, 128(2): 336-359.
基金
中央高校基本科研业务费专项资金(2572019BL01)