_image_utils

Module Contents

Functions

preprocess_img_resnet(path)

Resnet specific function for preprocessing.

open_image(file)

Open an image from a file and returns it as a numpy array.

_image_utils.preprocess_img_resnet(path)[source]

Resnet specific function for preprocessing.

Reshape figure to 224,224 and get colour channel at position 0. Also: for resnet preprocessing: normalize the data. This works specifically for ImageNet. See: https://github.com/onnx/models/tree/main/vision/classification/resnet

_image_utils.open_image(file)[source]

Open an image from a file and returns it as a numpy array.