The invention discloses an industrial defect detection method based on self-supervised
fine tuning, and solves the problems of scarcity of industrial scene defect samples and weak model generalization ability. The method comprises the steps that a
data set is divided and preprocessed, and the data robustness is improved through size scaling, random
luminosity transformation, geometric enhancement and the like; extracting a foreground
mask by using a saliency model, synthesizing a Perlin
Noise and DTD texture fused pseudo-abnormal image, carrying out self-supervised
fine tuning on the ImageNet pre-trained WideResNet-50, and enhancing the industrial data
feature extraction capability; a model containing a visual
trunk,
feature aggregation mapping,
noise feature
adaptation and a
discriminator is established, local neighborhood features are fused through Unfold operation,
Gaussian noise is superposed to generate pseudo-abnormal features, and an abnormal
score is output by the
discriminator after multi-scale fusion. And the training adopts binary
cross entropy and focus loss optimization parameters. The innovation points of the method are that self-supervised
fine tuning adapts to industrial data distribution,
feature aggregation improves fine-grained detection, and multi-scale fusion considers different defects.