# openvino.inference_engine.PreProcessInfo¶

class openvino.inference_engine.PreProcessInfo

This class stores pre-process information for the input

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

 Initialize self. Returns a number of channels to preprocess init(self, size_t number_of_channels) Initializes with given number of channels set_mean_image(self, Blob mean_image) Sets mean image values if operation is applicable. set_mean_image_for_channel(self, …) Sets mean image values if operation is applicable.

Attributes

 color_format Color format to be used in on-demand color conversions applied to input before inference mean_variant Mean Variant to be applied for input before inference if needed. resize_algorithm Resize Algorithm to be applied for input before inference if needed. .. note::.
color_format

Color format to be used in on-demand color conversions applied to input before inference

Usage example:

net = ie_core.read_network(model=path_to_xml_file, weights=path_to_bin_file)
net.input_info['data'].preprocess_info.color_format = ColorFormat.BGR

get_number_of_channels(self)

Returns a number of channels to preprocess

init(self, size_t number_of_channels)

Initializes with given number of channels

mean_variant

Mean Variant to be applied for input before inference if needed.

Usage example:

net = ie_core.read_network(model=path_to_xml_file, weights=path_to_bin_file)
net.input_info['data'].preprocess_info.mean_variant = MeanVariant.MEAN_IMAGE

resize_algorithm

Resize Algorithm to be applied for input before inference if needed. .. note:

It's need to set your input via the set_blob method.


Usage example:

net = ie_core.read_network(model=path_to_xml_file, weights=path_to_bin_file)
net.input_info['data'].preprocess_info.resize_algorithm = ResizeAlgorithm.RESIZE_BILINEAR

set_mean_image(self, Blob mean_image)
set_mean_image_for_channel(self, Blob mean_image, size_t channel)