Abstract:Aiming at the problem of small target size and huge weight file difficult to deploy in PCB defect detection, an improved YOLOv8 small target defect detection method is proposed. The method incorporates the SE attention mechanism into C2f, which enables the network to assign different weights to different locations in the image based on the information in the channel domain to obtain more important feature information; introduces Basic RFB in SPPF to enhance the network sensing field and improve the feature extraction capability of the network; adds a new small target detection scale to improve the model′s ability to detect tiny defects; discards the large target detection scale to reduce the computational load and shrink the weight file. The experimental results show that the improved YOLOv8 improves the average accuracy by 2.6%, shrinks the weight file by 27.3%, and achieves an FPS of 34.4 ms/frame over the original algorithm in the publicly available PCB defective dataset.