Laser & Optoelectronics Progress, Volume. 60, Issue 22, 2210009(2023)
YOLOv5-Based Lightweight Algorithm for Detecting Bottle-Cap Packaging Defects
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.
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
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)