Laser & Optoelectronics Progress, Volume. 60, Issue 22, 2210009(2023)

YOLOv5-Based Lightweight Algorithm for Detecting Bottle-Cap Packaging Defects

Lei Zhao1,2,3、*, Likuan Jiao1,2,3、**, Ran Zhai1,2,3, Bin Li1,2,3, and Meiye Xu1,2,3
Author Affiliations
  • 1Tianjin Key Laboratory for Advanced Mechatronic System Design and Intelligent Control, Tianjin University of Technology, Tianjin 300384, China
  • 2National Demonstration Center for Experimental Mechanical and Electrical Engineering Education (Tianjin University of Technology), Tianjin 300384, China
  • 3School of Mechanical Engineering, Tianjin University of Technology, Tianjin 300384, China
  • show less
    Figures & Tables(17)
    Pictures of bottle cap defects. (a) Break point; (b) broken edge; (c) deformation; (d) damage; (e) data error; (f) spinning
    Pictures of defects in complex situation
    Structure of the original YOLOv5s model
    CIoU loss
    Improved deep learning model SEGC-YOLO
    Lightweight Backbone module
    Channel Shuffle
    Structure of the ECA mechanism
    Structures of GhostConv-1, GhostConv-2, and C3-Ghost
    Diagram of Ghost operation
    Structure of CARAFE upsampling operator
    Analog inspection equipment
    mAP and loss curves of YOLOv5s and SEGC-YOLO. (a) mAP@0.5; (b) mAP@0.5∶0.95; (c) loss
    Comparison of defect detection using different algorithms
    • Table 1. Data of ablation experiments

      View table

      Table 1. Data of ablation experiments

      No.BackboneAdamECAGhostCARAFEFLOPs /109Parameters /106Model file /MBmAP@0.5 /%mAP@0.5∶0.95 /%
      116.37.0714.582.948.5
      26.93.316.980.646.5
      36.93.316.982.748.3
      46.93.317.081.848.6
      54.41.914.282.748.6
      64.92.044.484.149.0
      74.92.044.483.448.3
    • Table 2. Comparative data on multiple attention mechanisms

      View table

      Table 2. Comparative data on multiple attention mechanisms

      Attention mechanismFLOPs /109Parameters /106Model file /MBmAP@0.5 /%mAP@0.5∶0.95 /%
      ECA174.92.044.484.149.0
      SE205.42.785.883.949.0
      CBAM216.02.735.882.147.7
      CA226.43.086.583.648.7
      ShuffleAttention234.92.044.481.748.6
      NAM244.92.044.582.948.0
    • Table 3. Comparative experimental data of multiple algorithms

      View table

      Table 3. Comparative experimental data of multiple algorithms

      AlgorithmFLOPs /109Parameters /106Model file /MBmAP@0.5 /%mAP@0.5∶0.95 /%Inference time /ms
      YOLOv5s16.37.0714.582.948.516.3
      SEGC-YOLO4.92.044.484.149.015.8
      YOLOv3-tiny13.08.6817.582.346.18.3
      YOLOv3155.361.55123.683.548.434.3
      YOLOv7105.237.2274.884.149.041.4
    Tools

    Get Citation

    Copy Citation Text

    Lei Zhao, Likuan Jiao, Ran Zhai, Bin Li, Meiye Xu. YOLOv5-Based Lightweight Algorithm for Detecting Bottle-Cap Packaging Defects[J]. Laser & Optoelectronics Progress, 2023, 60(22): 2210009

    Download Citation

    EndNote(RIS)BibTexPlain Text
    Save article for my favorites
    Paper Information

    Category: Image Processing

    Received: May. 6, 2023

    Accepted: Jun. 25, 2023

    Published Online: Nov. 6, 2023

    The Author Email: Zhao Lei (leizhaotjut@163.com), Jiao Likuan (1913194980@qq.com)

    DOI:10.3788/LOP231231

    Topics