US 12,118,704 B2
Model input size determination method, electronic device and storage medium
Chin-Pin Kuo, New Taipei (TW); Shih-Chao Chien, New Taipei (TW); and Tung-Tso Tsai, 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 Nov. 15, 2021, as Appl. No. 17/526,325.
Claims priority of application No. 202011527502.1 (CN), filed on Dec. 22, 2020.
Prior Publication US 2022/0198645 A1, Jun. 23, 2022
Int. Cl. G06T 9/00 (2006.01); G06T 7/00 (2017.01); G06T 7/143 (2017.01); G06V 10/75 (2022.01)
CPC G06T 7/0004 (2013.01) [G06T 7/143 (2017.01); G06T 9/00 (2013.01); G06V 10/751 (2022.01); G06T 2207/30108 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A model input size determination method, the method comprising:
acquiring a test image set, the test image set includes a plurality of test images and a defect result corresponding to each test image;
encoding each test image to obtain an encoding vector;
decoding the encoding vector to obtain a reconstructed image corresponding to the test image, comparing the reconstructed image with the corresponding test image to obtain a reconstruction error;
segmenting the encoding vector according to a plurality of preset sizes to obtain a plurality of sub-vectors corresponding to each preset size;
inputting the plurality of sub-vectors corresponding to each preset size into a Gaussian mixture model to obtain a plurality of sub-probabilities, and determining an estimated probability according to the plurality of sub-probabilities corresponding to each preset size;
determining a test error according to the estimated probability and the reconstruction error corresponding to each preset size, and obtaining a detection result in the test image corresponding to each preset size according to the test error and the corresponding error threshold;
determining an accuracy according to the detection result and the defect result corresponding to each preset size, and selecting an input size from the plurality of preset sizes according to the accuracy corresponding to each preset size.