Class RandomResizeWithBBox
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class RandomResizeWithBBox : public mindspore::dataset::TensorTransform
Resize the input image using a randomly selected interpolation mode and adjust bounding boxes accordingly.
Public Functions
-
explicit RandomResizeWithBBox(const std::vector<int32_t> &size)
Constructor.
- Parameters
size – [in] A vector representing the output size of the resized image. If the size is a single value, the smaller edge of the image will be resized to this value with the same image aspect ratio. If the size has 2 values, it should be (height, width).
Example/* Define operations */ auto random_op = vision::RandomResizeWithBBox({50, 50}); /* dataset is an instance of Dataset object */ dataset = dataset->Map({random_op}, // operations {"image", "bbox"}); // input columns
-
~RandomResizeWithBBox() = default
Destructor.
-
explicit RandomResizeWithBBox(const std::vector<int32_t> &size)