| Leather is a widely used material with excellent wear resistance and flexibility,and is widely used in the production of leather bags,bags and car interiors.However,during the growth of animals and the transportation and storage of leather,various defects will inevitably appear on the surface of the leather.At present,China’s leather processing industry mainly relies on traditional detection methods for defect detection and classification,but traditional detection methods have problems such as high false detection rate and slow detection speed.Therefore,being able to quickly and accurately detect these defects and automatically classify them before the processing of leather goods is of great significance to improve product quality and production efficiency.In recent years,with the development of deep learning,more industrial surface defect detection tends to use deep learning technology,so this paper uses deep learning technology to study leather surface defect detection,the main research content is as follows:(1)By using image acquisition equipment to collect images of defective leather,the main defects collected are scratches,pinholes and rotten surfaces.The captured leather defect images are pre-processed,the images are adjusted to a uniform size of 640×640,and then enhanced by flipping,mirroring and brightness adjustment.Label Img was used to annotate the enhanced images to produce a leather defect dataset.Through the analysis of the object detection algorithm,YOLOv5,which has performed well in the field of deep learning object detection in recent years,was selected as the research algorithm for leather defect detection.The final test results show that the average detection accuracy of the algorithm for the three types of defects can reach 96.4%,which proves that the algorithm is suitable for the detection of leather surface defects.(2)Since the YOLOv5 network has further room for improvement in detection accuracy and model complexity,the original model is optimized and improved to achieve the best balance between detection accuracy and detection speed.Lightweight Ghost convolution is introduced in the feature extraction layer and feature fusion layer of the model,and the number of parameters is reduced from 7018216 to 3689936,which greatly reduces the number of parameters and calculations of the model,realizes the lightweight of the model,but reduces the detection accuracy by 1.8%,and then introduces the CBAM attention mechanism module to make up for the accuracy loss caused by the use of Ghost convolution.The final test results show that the test accuracy of the leather surface defect detection model of the improved YOLOv5 network reaches 97.9%,which is 1.5% higher than before the improvement,and the number of parameters and calculations are reduced by 47.1%,which improves the accuracy and accelerates the detection speed,which proves the effectiveness of the improved method.This network model is more suitable for implanting embedded processors with limited computing power,which improves the feasibility of developing a leather defect detection system based on embedded.(3)Design and develop leather surface defect detection system based on QT and Python.The system designed and developed a QT interface for leather surface defect detection based on the improved YOLOv5 inspection algorithm,which visualizes the inspection results and enables fast operation from raw data loading to final result output. |