| CPC G06T 7/0006 (2013.01) [G06T 2207/20081 (2013.01); G06T 2207/20084 (2013.01); G06T 2207/30148 (2013.01)] | 8 Claims |

|
1. A method for detecting a surface defect based on a perceptual autoencoder, comprising:
operation (1): constructing an unsupervised perceptual autoencoder network with an encoder-decoder architecture, wherein the encoder includes a feature pyramid; and
inputting a defect-free sample image to the encoder, wherein the encoder extracts features at different scales from the sample image and then performs a convolution on the features to obtain a feature map, and the decoder outputs an initial reconstructed image by performing an inverse convolution on the feature map;
operation (2): inputting the initial reconstructed image and an original image into a perceptual computing network, wherein the perceptual computing network determines a feature map of the initial reconstructed image and a feature map of the original image, determining a perceptual loss based on the feature map of the initial reconstructed image and the feature map of the original image, optimizing the perceptual autoencoder network based on the perceptual loss using a backpropagation algorithm, and completing training of the perceptual autoencoder network until the perceptual loss reaches a minimum value;
operation (3): acquiring an image to be detected of a circuit to be detected, inputting the image to be detected into a trained perceptual autoencoder network, and outputting a defect-free output image as a template image; and
performing a recursive quadratic segmentation on the template image and the image to be detected using a quadtree algorithm and stopping the recursive quadratic segmentation until an area of a segmented region that is lower than a preset similarity threshold is less than or equal to a preset minimum precision, wherein:
in response to determining that a structural similarity of a region is less than or equal to the preset similarity threshold, the region is output as a defective region; or
in response to determining that the structural similarity of the region is greater than the preset similarity threshold, there is no output, indicating no defect.
|