| Production of FPCB is more complicated than PCB and due to its materials,FPCB is easily damaged.Therefore,quality inspection is an essential step for the production of FPCB.In this paper,we designed an AOI system based on deep learning for the defects on connecting fingers.The research contents are divided into the following aspects:(1)A set of hardware and software system were designed to inspect the FPCB’s defects according to process requirement,including the selection of lens,camera and light source as well as the GUI.(2)A method of segmentation of the connecting fingers was proposed according to the location and shape feature.An extraction algorithm based on Gaussian filter and Erosion was used to solve the problem that traditional segmentation methods were difficult to separate the gold finger and the cover film.The connecting fingers were located and extracted by applying an adaptive thresholding method.(3)Transfer learning was used to recognize the defects on connecting fingers.A weighted binary cross entropy was applied as the loss function to balance the data set.Dropout layer and L2 regularization were employed to prevent overfitting.A single number was output to indicate the probability of defects.(4)The types of defects to be classified were foreign objects,spots and glue overflow.The trained network of the binary classification was used as the pretrained network.We added a SE block to the network and fine-tuned the network for training.Experiments shown that the accuracy of existence of defects was 97.85%and the classification accuracy achieved 94.44%.The total time cost was4.59 s.The stability and reliability were improved compared to traditional methods,meeting the requirements of AOI system. |