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

    With the aim to solve surface-quality detection of liquor bottle-cap packaging and the difficulty of deploying algorithms owing to large parameters, this study proposes a more lightweight and high-precision detection algorithm, named SEGC-YOLO, which is based on YOLOv5s. First, the ShuffleNet V2 is used to replace the original backbone network to effectively simplify the parameters, and the backbone network is enhanced using efficient channel attention mechanism. Next, the improved GhostConv and C3-Ghost modules, based on GhostNet, are used to improve the neck network and reduce the neck parameters. In addition, the CARAFE operator is introduced to replace the nearest neighbor interpolation upsampling operator. The upsampling prediction kernel with adaptive content awareness can improve the information-expression ability of the neck network and thereby the detection accuracy. The Adam gradient optimizer is used for training. Experimental results show that the proposed SEGC-YOLO algorithm achieves the mean accuracy precision mAP @0.5 of 84.1% and mAP@0.5∶0.95 of 49.0% at different intersection over union (IoU) thresholds, which are 1.2 and 0.5 percentage points higher than the original YOLOv5s algorithm, respectively. The overall floating-point operations (FLOPs), parameter volume, and model file size are also reduced by 69.94%, 71.15%, and 69.66%, respectively, indicating higher accuracy and lighter weight compared with that of the original algorithm. Therefore, SEGC-YOLO can quickly and accurately identify the surface defects of bottle caps, providing data and algorithm support for rapid detection and equipment deployment in related fields.

    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