CPC G06T 7/001 (2013.01) [G06F 18/214 (2023.01); G06F 18/22 (2023.01); G06V 10/40 (2022.01); G06V 10/764 (2022.01); G06V 10/82 (2022.01); G06T 2207/20081 (2013.01); G06T 2207/20084 (2013.01); G06T 2207/30108 (2013.01)] | 17 Claims |
1. A method for detecting defect comprising:
importing a plurality of flawless images into an autoencoder for model training to obtain a plurality of reconstructed images;
comparing the reconstructed images with the flawless images to obtain a plurality of groups of test errors;
selecting an error threshold from the plurality of the groups of the test errors according to preset rules;
obtaining an image to be tested, and a reconstructed image to be tested and an error to be tested;
determining detection result of the image to be tested according to the error to be tested and the error threshold;
importing the image to be tested into a classifier for defect classification to output a classification result when the image to be tested is defective;
extracting all pixels of the reconstructed image and the flawless images;
comparing the pixel values of each pixel of the reconstructed image and the flawless image respectively to obtain the pixel value difference of each pixel; and
calculating an expected value of the square of the pixel value difference of each pixel point to obtain the plurality of the groups of the test errors.
|