Class ResizeWithBBox

Inheritance Relationships

Base Type

Class Documentation

class ResizeWithBBox : public mindspore::dataset::TensorTransform

Resize the input image to the given size and adjust bounding boxes accordingly.

Public Functions

explicit ResizeWithBBox(std::vector<int32_t> size, InterpolationMode interpolation = InterpolationMode::kLinear)

Constructor.

Parameters
  • size[in] The output size of the resized image. If the size is an integer, smaller edge of the image will be resized to this value with the same image aspect ratio. If the size is a sequence of length 2, it should be (height, width).

  • interpolation[in] An enum for the mode of interpolation (default=InterpolationMode::kLinear).

    • InterpolationMode::kLinear, Interpolation method is blinear interpolation.

    • InterpolationMode::kNearestNeighbour, Interpolation method is nearest-neighbor interpolation.

    • InterpolationMode::kCubic, Interpolation method is bicubic interpolation.

    • InterpolationMode::kArea, Interpolation method is pixel area interpolation.

    • InterpolationMode::kCubicPil, Interpolation method is bicubic interpolation like implemented in pillow.

~ResizeWithBBox() = default

Destructor.