• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2023, Vol. 45 ›› Issue (08): 1463-1471.

• Graphics and Images • Previous Articles     Next Articles

An electronic component defect detection method based on lightweight YOLOX

WU Dong-liang1,LIU Zhi-gui1,2   

  1. (1.School of Information Engineering,Southwest University of Science and Technology,Mianyang 621000;
    2.School of Computer Science and Technology,Southwest University of Science and Technology,Mianyang 621000,China)
  • Received:2022-06-06 Revised:2022-08-13 Accepted:2023-08-25 Online:2023-08-25 Published:2023-08-18

Abstract: Aiming at the problem of large number of parameters and low detection efficiency of the traditional target detection method in defect detection of electronic components, this paper proposes a target detection method based on the lightweight YOLOX detection network. Firstly, the backbone network is lightened using deeply separable convolution to reduce parameters and improve detection speed. Secondly, a spatial Pyramid-based channel attention model is constructed to filter and fuse features of different scales to enhance the feature weights of small size defects. In the feature fusion upsampling process, efficient channel attention is added to improve detection accuracy with slightly increased parameters. Finally, the EIoU loss function is used to optimize the IoU loss function, and the cosine annealing algorithm is used to make the model achieve the best detection effect. The model is tested on a self-made dataset of electronic component appearance defects, and the average detection accuracy reaches 98.96%, with a detection time of approximately 0.09 seconds per image. Compared with the original model, the detection speed is doubled and the model size is reduced by about 60%. The model is also validated on the PCB defect public dataset, achieving fast detection of target defects.

Key words: electronic component, defect detection, YOLOX, attention mechanism ,