CPC G06T 7/001 (2013.01) [G06T 2207/20081 (2013.01); G06T 2207/30108 (2013.01)] | 17 Claims |
1. A method for detecting and classifying defects comprising:
inputting an image to be detected to a trained autoencoder, and obtaining a reconstructed image corresponding to the image to be detected;
determining whether the image to be detected has defects based on a defect criteria for filtering out small noise reconstruction errors;
in response that the image to be detected has defects, calculating a plurality of structural similarity values between the image to be detected and a plurality of template images marking defect categories respectively;
determining a target defect category corresponding to the template image with the highest structural similarity value, and classifying the image to be detected into the target defect category, wherein a mathematical expression of the defect criteria is
wherein ΔXi,j is a reconstruction error image between the image to be detected and the reconstructed image, δXi,j is a binary image of the reconstruction error image, i and j represent pixel positions, τ is a preset reconstruction error measurement threshold.
|