PCB Defect Detection Algorithm Based on SimAM-YOLOv5s
To solve the problems of low accuracy and poor detection effect of PCB defect detection,a PCB defect detection algorithm based on SimAM-YOLOv5s is proposed.Firstly,Kmeans++is used to re-cluster the anchor frames and enrich the small target data by adding shallow scale information to improve the fusion of deep and shallow semantic information;then,the loss function is modified to SIoU,that is,the angular loss is introduced to calculate the distance loss as a way to speed up the network convergence and make the regression parameters more accurate;finally,combining with the lightweight attention mechanism SimAM to provide three-dimensional attention weights for the network,filtering out redundant information,thus improving the accuracy and robustness of the model.The experimental results show the model size of the improved YOLOv5s algorithm is 27.7 MB and the average accuracy of detection is 98.39%which is 4.44%higher than the average accuracy of the original network,effectively improving the accuracy of PCB defect detection.