| With the increasing application of mobile electronic devices,the demand for lithium batteries is increasing due to their large capacity,small size,and low density.The production of lithium batteries has basically been automated,but due to various factors in the production process,the lithium battery shell Defects such as scratches,pits,dents,pinholes,and exposed aluminum will form on the surface,which not only hinders its appearance,but also affects the performance of the lithium battery in severe cases.Manual detection of surface defects of lithium batteries is time-consuming and laborious,and the detection efficiency is low and unstable.This paper is based on deep learning to study the surface defect detection of lithium batteries,and optimizes on the basis of the direct regression algorithm YOLOv3,and then proposes a new network structure.The main work content is as follows:First make a data set of the surface image of the lithium battery shell,determine the acquisition background and shooting light source through comparison experiments,select the camera and lens according to the target characteristics,and then design the data acquisition platform,and design the conveyor belt for material transportation to simulate the lithium battery in the production line movement.Secondly,the model framework and detection principle of different target detection algorithms are analyzed,and the surface defects of the lithium battery case are detected by modifying the parameters.By comparing the values and prediction effects of different algorithms,and analyzing the structure of different target detection algorithms in detail,it is determined that YOLOv3 is the main research object of surface defect detection algorithms for lithium battery shells.Then on the basis of YOLOv3,the K-means clustering method is used to optimize the a priori box value of the lithium battery shell surface defect data set;the ablation method is used to reduce the number of convolutional layers,and the backbone network is modified;and the activation is replaced Function,propose a new network model-yolov3-x.Compared with the original model,the m AP value of yolov3-x is higher in the detection of surface defects of lithium battery shells,and the detection speed has also been improved.Finally,the development of the interface of the lithium battery surface defect detection system is carried out.The yolov3-x is loaded into the system,and the light source intensity and transmission speed are controlled on the PC side to visually demonstrate the function of lithium battery surface defect detection. |