Aiming to address the problems of surface defect detection of printed circuit board ( PCB ) , such as low detection speed and identification accuracy, we propose a PCB surface defect detection algorithm based on improved YOLOv4-tiny.Firstly, the clustering method was used to cluster the defect dataset to solve the problem that the initial prior bounding box is not suitable for PCB surface detection defects.Secondly, to solve the problem of small-scale object information loss in the downsampling of backbone network, slicing operation was introduced.Then, the softpool convolution structure was introduced into the feature fusion network to improve the model receptive field and enhance the expression ability of small object features.Finally, the improved cross-entropy function was used to optimize the loss function.The proposed algorithm was verified on the open source printed circuit board defect dataset of Peking University.Compared with other classical algorithms, the proposed algorithm demonstrates a great improvement in detection speed, accuracy and model parameters.
printed circuit board surface defect detectionyolo look only once version 4-tinyslicing operationcross-entropy loss function