| With the development of deep learning,more and more deep learning models are used to solve problems in the field of computer vision and perform well,making many problems that are difficult to be solved by traditional computer vision algorithms solved well.Based on the actual demand of button cell production and the method of deep learning,this paper designs and develops a button cell appearance defect detection system based on deep learning from image acquisition,image processing to detection results.According to the actual production demand,the main research contents of this paper are as follows: 1)Firstly,this paper designed an image acquisition device according to the appearance characteristics of button cell,and based on the feature that the sealing ring of button cell is a black ring,the method of area growth and least square circle fitting were used to locate and extract multi-target images.2)Studied the image preprocessing algorithm of button cell,used the algorithm of local area gray stretching and covering the background to improve the feature information of defects and increase the accuracy of network recognition.3)This paper studies the structure of neural network,compares and introduces the better lightweight convolutional neural network models in recent years,and then designs a lightweight and efficient defect detection network based on the Mobile Net V2 model and the Channel Shuffle,and select the Tensor Flow deep learning framework to build the model,using the single target image after preprocessing for network training,will improve the contrast experiment network model and Mobile Net V2 model,Experiments show that the proposed network has good performance while reducing the number of parameters.4)On the basis of the above design,according to the actual production needs,using vs2015 development platform and MFC library button battery appearance defect detection software for the design.Software using opencv4.0 image algorithms library call Tensor Flow training model,at the same time using the GPU acceleration image recognition,further improve the real-time performance of the system.5)After the performance of the improved model are verified,and in terms of image resolution,preprocessing algorithm is optimized,effectively improve the detection precision of the network,then in on-line defect detection system software of collection efficiency and the invocation model to adjust the classification speed optimization,improve the detection rate of the system.6)Finally,the button cell appearance defect detection system was applied to the actual production line,and a continuous test was carried out for one week.After manual reinspection,the total detection accuracy of the detection system was 99.84%,among which there were 20 batteries in each pallet on the production line,and the detection speed was 546ms/pallet.By button cell appearance defect detection system set up to the actual production line,through the online application test show that this design of the button cell appearance defect detection system has high precision,faster recognition and higher reliability,etc.To meet the needs of enterprises for button cells appearance defect detection,the next step will be widely applied. |