CPC G06T 7/0008 (2013.01) [G06T 5/50 (2013.01); G06T 7/11 (2017.01); G06V 10/28 (2022.01); G06V 10/761 (2022.01); G06T 2207/20224 (2013.01); G06V 2201/07 (2022.01)] | 20 Claims |
1. An image defect detection method applied to an electronic device, the method comprising:
acquiring an image to be detected, a defective image, and a non-defective image;
dividing the image to be detected into a plurality of detecting areas, generating a detection accuracy value for each of the plurality of detecting areas based on the defective image and the non-defective image, and obtaining a plurality of detection accuracy values;
constructing a plurality of learners;
selecting an autoencoder for each of the plurality of detection accuracy values from the plurality of learners;
obtaining a multi-scale autoencoder model corresponding to each of the plurality of detecting areas by training the corresponding autoencoder based on the non-defective image;
dividing each of the plurality of detecting areas into a plurality of detecting blocks, and obtaining a plurality of reconstructed image blocks by inputting each of the plurality of detecting blocks into the corresponding multi-scale autoencoder model;
calculating a reconstruction error value between each of the plurality of reconstructed image blocks and the corresponding detecting block;
generating a detection result of a product contained in the image to be detected based on the reconstruction error value corresponding to each detecting block.
|