| Surface quality is an important index to evaluate resin zipper.With the increasing degree of automation of light industry production,the production of resin zipper presents a situation of mass and automation.However,due to the frequent flow of production processes and the untimely maintenance of production equipment under long-term operation,it often leads to a variety of surface defects on its surface.Among them,"dirty" and "broken" affect the appearance of zipper,and "burr" and "missing teeth" affect consumers’ use experience.Therefore,the detection of surface quality is very important.At present,manufacturers mainly use manual observation to detect resin zippers,which has low detection efficiency and high employment cost.In recent years,there are numerous cases of target detection algorithm based on deep learning to solve visual problems.By building detection model and training sample images,defective parts can be identified with high efficiency and precision.Therefore,this paper adopts the target detection algorithm of deep learning to detect the surface defects of resin zipper.The main work is as follows:1.Build a detection platform.Design the inspection plan of the resin zipper.Analyze the surface characteristics,inspection requirements and inspection accuracy of the resin zipper,and select industrial cameras and industrial lenses.Through the intuitive comparison experiment of light sources,industrial light sources are selected.In order to realize automatic detection,the feeding device is designed to realize the transportation of the zipper,and the photoelectric sensor is selected as the external trigger device of the industrial camera.Finally,the design of a human-computer interactive graphical interface can intuitively reflect the detection effect.2.Construct data set and defect annotation.In order to meet the needs of the image size in the detection model,a bilinear interpolation algorithm is used to zoom the image taken by the industrial camera to reduce the distortion of the image.In view of the small number of training samples,the image data set is expanded through geometric transformation and histogram equalization.Since industrial cameras and signal transmission cables will bring noise to the image under long-term work,some images are added with noise to improve the generalization ability of the model;finally,the defect area is marked and located manually.3.Model training and improvement.Under the training strategy of migration learning,the YOLO-v3 and YOLO-v4 original models are used to train the resin zipper data set.Through the analysis of model evaluation indicators,it is found that the detection rate of "burr" defects is low,and the calculation of the model The amount is larger.Therefore,based on the needs of enterprises,a lightweight resin zipper surface defect detection model was built.In this paper,Mobile Net-v2 is used as the feature extraction skeleton.After the feature extraction,the attention mechanism is added before the feature fusion;and,through adaptive adjustment of the learning rate,a priori frames of different scales are designed,and the K-means algorithm is used to compare the prior frames.Check boxes for clustering to accelerate the convergence speed of the model.Experiments prove that the improved algorithm has 99.1%,98.4%,99.2% and 99.4% detection accuracy for "broken","burr","dirty" and "missing teeth" defects,and the m AP value is 99.025%,the model size is51.1MB.Compared with the YOLO-v3 and YOLO-v4 models,the precision measurement accuracy has been significantly improved,and the model has the characteristics of lightweight. |