Resizer

class Resizer(option: ResizerOption)

Represents a Resizer instance used for image processing operations including cropping, resizing, padding, and implementation with multiple interpolation modes.

Initializes a Resizer object.

Parameters:

option (ResizerOption) -- The configuration options for the image processing. ResizerOption is a wrapper of the C++ class ImageOps::Resizer::Option.

Methods

__init__

Initializes a Resizer object.

get_input_num

Retrieves the total number of input tensors.

get_input_tensor

Retrieves the input tensor with the given index.

get_output_num

Retrieves the total number of output tensors.

get_output_tensor

Retrieves the output tensor with the given index.

get_stream

Retrieves the stream used for image processing.

run

Processing images with the given configurations.

set_stream

Sets the stream for image processing.

sync

Waits for the completion of all preceding tasks in the stream that is related to the image processing.