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 |
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.
|