System and method to utilize a reduced image resolution for computer vision applications
A system, device and method are provided for generating image processing models for selected hardware. The method, illustratively, includes obtaining a reference model, a desired image resolution based on target hardware, and a training set of images comprising images with the desired image resolution and images with a higher resolution. The method includes generating an updated model by: iteratively training the reference model with a combined set of features, the combined set of features comprising features determined from the images with the higher resolution with at least one stem and features determined from the images with the desired resolution. The method includes outputting the trained updated model to the target hardware to process images with the desired image resolution.
1 . A computer-implemented method for generating image processing models, the method comprising:
obtaining a reference model, an optimal image resolution selected from:
a plurality of resolution bins, each corresponding to an image resolution divisible by 32 within a range from 0.4 times an original image resolution to the original image resolution, the optimal image resolution selection being based on an accuracy evaluation for a specified hardware profile, wherein the optimal image resolution is a lowest resolution bin for which an accuracy metric does not decrease by more than a predefined threshold compared to the accuracy at the original image resolution, the specified hardware profile comprising at least one of a central processing unit (CPU), a neural processing unit (NPU), and embedded graphical processing unit (GPU); and
a training set of images comprising images with the optimal image resolution and images with an image resolution greater than the optimal image resolution, wherein greater indicates a bin with a higher pixel count than the optimal image resolution;
generating an updated model by: iteratively training the reference model with a combined set of features, the combined set of features comprising features determined from the images with the resolution greater than the optimal image resolution with at least one stem and features determined from the images with the optimal image resolution, wherein the at least one stem comprises one or more of a convolution structure, a pooling structure, and a space to depth structure; and
outputting the updated model for deployment on the specified hardware profile to process images with the optimal image resolution.
2 . The method of claim 1 , wherein the at least one stem comprises two different convolution structures.
3 . The method of claim 1 , wherein the at least one stem comprises two different stems, or two identical stems, each of the two different stems comprising one or more of a convolution structure, a pooling structure, and a space to depth structure each of the two identical stems comprising one or more of a convolution structure, a pooling structure, and a space to depth structure.
4 . The method of claim 1 , wherein the at least one stem comprises an instance of the space to depth structure outputting into an instance of the convolution structure.
5 . The method of claim 1 , wherein the at least one stem comprises an instance of the convolution structure outputting into an instance of the pooling structure.
6 . The method of claim 1 , wherein the at least one stem comprises an instance of the pooling structure outputting into an instance of the convolution structure.
7 . The method of claim 3 , wherein features learned from each of the stems are combined for use in training the updated reference model.
8 . The method of claim 1 , further comprising:
evaluating the reference model performance for different image resolutions during a training operation; and
determining the optimal image resolution based on the reference model performance during the evaluation, the optimal image resolution defining characteristics of the target hardware.
9 . A device comprising a processor and memory, the memory comprising computer executable instructions for generating image processing models, the instructions causing the processor to:
obtain a reference model, an optimal image resolution selected from:
a plurality of resolution bins, each corresponding to an image resolution divisible by 32 within a range from 0.4 times an original image resolution to the original image resolution, the optimal image resolution selection being based on an accuracy evaluation for a specified hardware profile, wherein the optimal image resolution is a lowest resolution bin for which an accuracy metric does not decrease by more than a predefined threshold compared to the accuracy at the original image resolution, the specified hardware profile comprising at least one of a central processing unit (CPU), a neural processing unit (NPU), and embedded graphical processing unit (GPU); and
a training set of images comprising images with the optimal image resolution and images with an image resolution greater than the optimal image resolution, wherein greater indicates a bin with a higher pixel count than the optimal image resolution;
generate an updated model by: iteratively training the reference model with a combined set of features, the combined set of features comprising features determined from the images with the image resolution greater than the optimal image resolution with at least one stem and features determined from the images with the optimal image resolution, wherein the at least one stem comprises one or more of a convolution structure, a pooling structure, and a space to depth structure; and
output the updated model for deployment on the specified hardware profile to process images with the optimal image resolution.
10 . The device of claim 9 , wherein the at least one stem comprises two different convolution structures.
11 . The device of claim 9 , wherein the at least one stem comprises two different stems, or two identical stems, each of the two different stems comprising one or more of a convolution structure, a pooling structure, and a space to depth structure, each of the two identical stems comprising one or more of a convolution structure, a pooling structure, and a space to depth structure.
12 . The device of claim 11 , wherein features learned from each of the two or more stems are combined for use in training the updated reference model.
13 . The device of claim 9 , wherein the at least one stem comprises two stems, each of the two stems comprising one or more of a convolution structure, a pooling structure, and a space to depth structure.
14 . The device of claim 13 , wherein at least one of the stems comprises an instance of the space to depth structure outputting into an instance of the convolution structure.
15 . The device of claim 9 , the instructions causing the processor to:
evaluate the reference model performance for different image resolutions during a training operation; and
determine the optimal image resolution based on the reference model performance during the evaluation, the optimal image resolution defining characteristics of the target hardware.
16 . A non-transitory computer readable medium comprising computer executable instructions for generating image processing models, the instructions for:
obtain a reference model, a desired image resolution selected from:
a plurality of resolution bins, each corresponding to an image resolution divisible by 32 within a range from 0.4 times an original image resolution to the original image resolution, the optimal image resolution selection being based on an accuracy evaluation for a specified hardware profile, wherein the optimal image resolution is a lowest resolution bin for which an accuracy metric does not decrease by more than a predefined threshold compared to the accuracy at the original image resolution, the specified hardware profile comprising at least one of a central processing unit (CPU), a neural processing unit (NPU), and embedded graphical processing unit (GPU); and
a training set of images comprising images with the optimal image resolution and images with an image resolution greater than the optimal image resolution, wherein greater indicates a bin with a higher pixel count than the optimal image resolution;
generate an updated model by: iteratively training the reference model with a combined set of features, the combined set of features comprising features determined from the images with the higher resolution with at least one stem and features determined from the images with the optimal image resolution, wherein the at least one stem comprises one or more of a convolution structure, a pooling structure, and a space to depth structure; and
output the trained updated model for deployment on the specified hardware profile hardware to process images with the optimal image resolution.