US 12,293,502 B2
Image defect detection method, electronic device using the same
Jung-Hao Yang, New Taipei (TW); Chin-Pin Kuo, New Taipei (TW); Chih-Te Lu, New Taipei (TW); Tzu-Chen Lin, New Taipei (TW); Wan-Jhen Lee, New Taipei (TW); and Wei-Chun Wang, New Taipei (TW)
Assigned to HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed by HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed on Dec. 30, 2021, as Appl. No. 17/566,167.
Claims priority of application No. 202011615847.2 (CN), filed on Dec. 30, 2020.
Prior Publication US 2022/0207707 A1, Jun. 30, 2022
Int. Cl. G06K 9/00 (2022.01); G06N 3/045 (2023.01); G06N 3/08 (2023.01); G06T 5/00 (2006.01); G06T 7/00 (2017.01)
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
OG exemplary drawing
 
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.