Computer and Modernization ›› 2024, Vol. 0 ›› Issue (09): 107-113.doi: 10.3969/j.issn.1006-2475.2024.09.018

Previous Articles     Next Articles

Camera Module Defect Detection Based on Improved YOLOv8s

  

  1. (1. College of Electronics and Electrical Engineering, Wuhan Textile University, Wuhan 430000, China;
    2. College of Automation, Hubei University of Science and Technology, Xianning 437000, China;
    3. Hubei Xiangcheng Intelligent Electromechanical Technology Research Institute Co., Ltd., Xianning 437000, China)
  • Online:2024-09-27 Published:2024-09-29

Abstract:  Aiming at the problems of the great change of defect size, unclear contour and high missed detection rate of small target defects in camera module defect detection, an improved YOLOv8s algorithm is proposed. Firstly, the small target detection layer is added to improve the detection performance of small targets. Secondly, BiFormer is introduced to improve the C2f module in the backbone network, and the C2f-Bif module is proposed to enhance the ability of the network to extract image features. Then, the H-SPPF (Hybrid Fast Space Pyramid Pooling) module is proposed to enhance the ability of the network to capture local and global information. Finally, the parameter-free SimAM attention mechanism is added to suppress the non-target background interference information and improve the attention of the target. The experimental results show that the average accuracy of the improved YOLOv8s algorithm for camera module defect detection reaches 87.2% under the condition of reducing the number of model parameters, which is 3.2 percentage points higher than that of the YOLOv8s algorithm. The detection speed reaches 55 FPS, which meets the factory’s real-time detection requirements for camera module defects.

Key words:  , deep learning; YOLOv8s; defect detection; camera; BiFormer; attention mechanism

CLC Number: