Computer and Modernization ›› 2023, Vol. 0 ›› Issue (12): 82-86.doi: 10.3969/j.issn.1006-2475.2023.12.014

Previous Articles     Next Articles

Application of Improved YOLOv7 Algorithm in Detection of Capping Defects of Vials

  

  1. (1. School of Physics and Electronic Science, Changsha University of Science and Technology, Changsha 410114, China;
    2. Nevil Intelligent Technology Co., LTD., Changsha 410007, China)
  • Online:2023-12-24 Published:2024-01-29

Abstract: Abstract: Aiming at the problem of missing inspection caused by small target defects and unclear features in the defect detection of the capping of penicillin bottles, this paper proposes a defect detection method based on the improved YOLOv7 algorithm. First, the defect images of the capping of penicillin bottles are collected in the real industrial environment, including four common defects: scratches, missing cap, concave-crack, and composite defect, and the data are enhanced to construct a data set with 3220 images of penicillin bottle capping defects. Then CBAM (convolution block attention module) and ASFF (adaptive spatial feature fusion) adaptive feature fusion modules are introduced on the basis of the original YOLOv7 in order to improve the ability of network to extract features, improve the detection accuracy of small target defects, and reduce the missed detection rate of penicillin bottle capping defects. The experimental results show that the average detection accuracy (mAP) of the improved algorithm reaches 99.3%, which is 1.9 percentage points higher than that before the improvement. The improved algorithm provides a new idea for the detection of capping defects of penicillin bottles in industry, and has good application prospect.

Key words: Key words: vials, defect detection, YOLOv7, attention module, adaptive feature fusion

CLC Number: