| With the increasing demands on industrial product quality,the inspection of product surface defects has become an important part of the production process.The difficulty of quantifying surface defects due to uncontrollable factors in the production environment makes traditional rule-based machine vision inspection solutions ineffective.The development of deep learning provides new ideas and alternatives for product surface defect detection.Based on the basic structure of the UNet++ network,this paper combines the characteristics of surface defects of an industrial product-rivets-with a series of improvements in terms of data enhancement,overall network architecture,loss functions and convolutional blocks to provide an optimal defect detection scheme that effectively meets detection accuracy and real-time performance.The main work of the thesis is as follows.(1)A data enhancement scheme is proposed to address the problem of small industrial datasets.In this paper,we try to use dense slice sampling to expand the size of the rivet defect dataset.However,experiments show that dense slice sampling does not show good results on the dataset in this paper.For this reason,in combination with the problem that the boundary of rivet defects is difficult to define,this paper proposes a fuzzy labelling data augmentation approach to enhance the learning ability of the network for defects,starting from the annotation of the dataset.(2)Streamlining the original network structure,combining the semantic hierarchy of rivet defects with industrial requirements for detection efficiency,a simpler and more effective network structure is designed,pruning the original network structure to reduce the number of down-sampling operations.The unknown network depth is mitigated by designing an effective integration of U-net of different depths,and co-learning is performed by deep supervision.(3)To address the problem of slow convergence of a single cross-entropy loss in datasets with small detection targets,an IOU loss function is added to the original cross-entropy loss function to speed up convergence and facilitate learning of small sample defects.(4)In this paper,we analyze that the residual network can avoid the problems of gradient dispersion and serious loss of image detail information during network training,and use residual blocks instead of conventional convolution blocks to accelerate the convergence speed of the network and reduce the loss of detail information during network training,which improves the accuracy by 10.6 percentage points.In this paper,comparison tests are designed for each of the improved methods to verify the effectiveness of the schemes one by one.The algorithms are compared with other algorithms on two publicly available datasets,and achieve good results: the recall rate reaches 100% on the rivet surface defect dataset,and the average intersection ratio reaches 0.6315.The detection speed is 14.3fps in the hardware environment of this paper.This work satisfies the needs of industrial inspection and successfully implements deep learning algorithms in the industrial inspection of surface defects of rivets. |