| CPC G01N 21/8851 (2013.01) [G06N 3/0455 (2023.01); G01N 2021/8887 (2013.01)] | 20 Claims |

|
1. An electronic device comprising:
at least one processor; and
a storage device coupled to the at least one processor and storing instructions for execution by the at least one processor to cause the at least one processor to:
obtain an image of a product to be detected;
obtain a reconstructed image by inputting the image into a pre-trained autoencoder;
generate a difference image according to the image and the reconstructed image;
obtain a plurality of feature absolute values by performing clustering processing on the difference image;
generate a target image according to the plurality of feature absolute values, the difference image, and a preset value, the present value being a preset pixel value that is set according to a range of a plurality of absolute pixel values of the difference image; and
determine a defect detection result of the image by detecting the target image for defects.
|