This invention discloses an image
size adjustment method, apparatus, and storage medium based on
model inference. The method includes: generating a summary mapping table; obtaining the data size of an image or video frame; determining whether the image size or video
frame size is within a specific range; if within the specific range, determining whether the image size or video
frame size is greater than the maximum input size based on the memory and
video memory of the execution device and the summary mapping table; if not within the specific range, preprocessing the image or video frame to scale the image size or video
frame size proportionally to the specific range, performing data block
processing on the compressed image or compressed video frame, performing
model inference, obtaining the
inference result, and outputting the stitched
inference result enlarged to the original image or video frame size before compression. This method can improve super-resolution and restoration effects and has a short
processing time.