| Defect detection method,as a realization method of image visual detection task,is an important method for quality control in the production process of industrial products.With the development of visual detection technology,some progress has been made in defect detection methods.However,there are still some problems to be solved in the detection method of surface defects of industrial products.For example,the complex patterns on the surface of industrial products and the diverse scales of product defects lead to low detection accuracy in existing defect detection methods.In addition,due to the fast update rate of new products in the industrial production process,it is difficult to collect and produce sufficient defect image datasets for the training of visual detection models.This thesis mainly studies the multi-scale surface visual detection method of complex pattern industrial products.In view of the problems existing in the current defect detection methods,this thesis proposes a multi-scale defect detection method fused with deep network low-light enhancement and a small-sample defect detection method based on finetuning.The specific research content of this thesis can be summarized as the following two points:(1)This thesis proposes the LE-MSFE-DDNet defect detection model to realize the surface defect detection of complex patterns and multi-scale industrial products.Aiming at the problem that complex patterns in defect images are easily confused with defects,a deep network low-light enhancement module is used to improve the illumination adaptability of the model and improve the model’s resolution accuracy for complex patterns and defects.At the same time,for the problem of different defect scales in defect images,the channel attention module is integrated into the multi-scale feature extraction network to enhance the multi-scale feature extraction capability of the model,thereby improving the model’s generalization performance for multi-scale defects.The experimental results show that the method in this thesis can solve the problems of confusion between complex patterns and defects and inconsistent defect scales,thereby improving the defect detection ability of the model.(2)This thesis proposes to construct a few-shot defect detection model based on finetuning to solve the problem of insufficient image sample data.First,an initial model is constructed through the basic two-stage target detection framework,and the initial model is trained based on the basic data set,so that the model has the ability to detect the basic data set.Then,the feature parameters of the initial model backbone network are frozen to prepare for the training phase of the target model.At the same time,a classifier based on cosine similarity is introduced to improve the classification ability of the object model for new categories.Finally,the object model is trained based on the newly added small sample image dataset,and finally the trained few-shot defect detection model is obtained,which realizes the defect detection under small sample.Experiments show that the few-shot defect detection model based on fine-tuning in this thesis can learn new image features through the image dataset with a small number of samples,so that the model has the ability to classify new categories,thus completing the defect detection task under the condition of rare image samples. |