US 12,125,193 B2
Method for detecting defect in products and electronic device using method
I-Hua Chen, New Taipei (TW); Tung-Tso Tsai, New Taipei (TW); Chin-Pin Kuo, New Taipei (TW); and Tzu-Chen Lin, 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 Jan. 11, 2022, as Appl. No. 17/572,859.
Claims priority of application No. 202110037669.8 (CN), filed on Jan. 12, 2021.
Prior Publication US 2022/0222799 A1, Jul. 14, 2022
Int. Cl. G06T 7/00 (2017.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)
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
OG exemplary drawing
 
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.