| In recent years,the detection and identification of printed circuit board(Printed Circuit Board,PCB)defects based on machine vision is a research topic that has attracted much attention in the semiconductor industry.Machine vision detection technology can not only detect typical defects,such as short circuit and open circuit,but also effectively detect various types of defects,such as leaks,residual copper,holes,burrs,gaps,hole offsets,insufficient etching,and incorrect punching.It can effectively avoid the shortcomings of easy fatigue and strong subjectivity of manual testing,and achieve 24 hours high-efficiency testing.In the PCB defect detection system based on machine vision,the related image processing algorithm is its core technology,and it is of great significance and value to further study.Therefore,this paper studies the method of PCB defect detection and classification based on machine vision.First of all,most of the existing PCB defect recognition algorithms adopt traditional image processing and recognition methods,i.e.defect detection,extraction feature and recognition process.Due to the complexity of the circuit board,it is difficult to achieve accurate classification for various defects.A PCB defect recognition algorithm based on deep learning is proposed.Firstly,the defect areas are found by XOR operation between the standard template and the tested template.Then,for the defect area,a convolutional neural network with 2 convolutional layers,2 downsampling layers and 4 fully connected layers is designed.The PCB defect pictures are batch normalized with Re LU is used as the activation function.Maxpooling is used as the down sampling method and the Softmax regression classifier is used to train and optimize the convolutional neural network.The proposedmethod is compared with the recognition methods commonly used on the production line,i.e.,the direction gradient histogram,the scale invariant feature transform feature and the support vector machine.The experimental results show that the recognition rate based on deep learning significantly increase.The identification method can obtain 96.67%recognition accuracy for 10 types of PCB defects.Secondly,for the current PCB defect detection based on image analysis,the reference comparison method is mostly used.Image registration is difficult,and the detection accuracy and recognition rate are not high.The improved YOLOv3 network is used to detect PCB defects.First,the K-means algorithm was used to cluster the PCB defect data.Then,for the problems of small target defect detection,the Densnet method was used to replace the two residual network modules of YOLOv3 with two dense network modules.The phenomenon of gradient disappearance is solved in deep feature training.The experimental results show that the proposed PCB defect detection algorithm based on deep feature learning greatly improves the accuracy of recognition,and can achieve accurate,real-time detection of different types of defects such as common open circuits,short circuits,breakouts,leaks,defects and other common PCB classification.Finally,this paper designs and implements the hardware and software of the PCB defect detection system.The software interface is simple and clear,and it has a good human-computer interaction interface.The PCB image is input to test the whole system.The experimental results show that the PCB defect detection system designed in this paper has good stability and can detect PCB defects more accurately. |