utils Module
Utilities for models - mostly preprocessing related.
Functions
preprocess_array
Create a tensorflow op that takes an array of image bytes and returns regularized images.
preprocess_array(in_images, order='RGB', scaling_factor=1.0, output_height=224, output_width=224, preserve_aspect_ratio=True)
Parameters
Name | Description |
---|---|
in_images
Required
|
[?] dim tensor of image bytes. (Typically a placeholder) |
order
|
order of channels - either 'BGR' or 'RGB' default value: RGB
|
scaling_factor
|
multiplier for channel values default value: 1.0
|
output_height
|
output image height default value: 224
|
output_width
|
output image width default value: 224
|
preserve_aspect_ratio
|
if True, preserve image aspect ratio while scaling default value: True
|
Returns
Type | Description |
---|---|
[?, output_height, output_width, 3] dim tensor of float32 pixel values of the image. |
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for