models Package

Python representation of models accelerated with the Azure ML Hardware Accelerated Models Service.

Modules

accel_model

Module with abstract base class of HW accelerated models.

doesnotexisterror

Does not exist error.

utils

Utilities for models - mostly preprocessing related.

Classes

Resnet50

Float-32 Version of Resnet-50.

QuantizedResnet50

Quantized version of Renset-50.

Resnet152

Float-32 Version of Resnet-152.

QuantizedResnet152

Quantized version of Renset-152.

Vgg16

Float-32 Version of VGG-16.

This model is in RGB format.

QuantizedVgg16

Quantized version of VGG-16.

This model is in RGB format.

Densenet121

Float-32 Version of Densenet.

This model is in RGB format, and has a scaling factor of 0.017

QuantizedDensenet121

Quantized version of Densenet.

This model is in RGB format.

SsdVgg

Float-32 Version of SSD-VGG.

This model is in RGB format.

QuantizedSsdVgg

Quantized version of SSD-VGG.

This model is in RGB format.

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

in_images

[?] dim tensor of image bytes. (Typically a placeholder)

order
default value: RGB

order of channels - either 'BGR' or 'RGB'

scaling_factor
default value: 1.0

multiplier for channel values

output_height
default value: 224

output image height

output_width
default value: 224

output image width

preserve_aspect_ratio
default value: True

if True, preserve image aspect ratio while scaling

Returns

[?, output_height, output_width, 3] dim tensor of float32 pixel values of the image.