| CPC G06T 7/0004 (2013.01) [G06N 3/045 (2023.01); G06N 3/08 (2013.01); G06T 5/00 (2013.01); G06T 2207/20076 (2013.01); G06T 2207/20081 (2013.01); G06T 2207/20084 (2013.01)] | 8 Claims |

|
1. An image defect detection method comprising:
generating a defect image repair data set comprising sample images;
training an autoencoder according to the defect image repair data set, and obtaining a trained autoencoder, comprising: training the autoencoder to learn to reconstruct images of the defect image repair data set; using a preset error function as a loss function of the autoencoder, and minimizing the loss function to obtain the trained autoencoder, comprising:
training the autoencoder to learn to reconstruct the flawless sample image when the image input in the autoencoder is the flawless sample image;
training the autoencoder to learn to reconstruct the flawless sample image corresponding to the artificial defect sample image when the image input in the autoencoder is an artificial defect sample image, comprising:
training the autoencoder to learn to reconstruct images of the plurality of artificial defect sample images;
using a cross entropy function as a loss function of the autoencoder, and minimizing a cross entropy between reconstructed images of the plurality of artificial defect sample images and the flawless sample images corresponding to the plurality of artificial defect sample images;
generating, by the trained autoencoder, a reconstructed image corresponding to a sample image in the defect image repair data set, calculating a reference error value between the sample image and the reconstructed image by invoking a preset error function, and setting a threshold value based on the reference error value;
inputting an image to be detected to the trained autoencoder, and generating the reconstructed image corresponding to the image to be detected;
calculating the reconstruction error between the image to be detected and the reconstructed image corresponding to the image to be detected, and determining whether the image to be detected does have defects;
determining that the image to be detected is a defective image when the reconstruction error is greater than the threshold value;
determining that the image to be detected is a flawless image when the reconstruction error is less than or equal to the threshold value.
|