Class RandomHorizontalFlipWithBBox

Inheritance Relationships

Base Type

Class Documentation

class RandomHorizontalFlipWithBBox : public mindspore::dataset::TensorTransform

Randomly flip the input image horizontally with a given probability and adjust bounding boxes accordingly.

Public Functions

explicit RandomHorizontalFlipWithBBox(float prob = 0.5)

Constructor.

Parameters

prob[in] A float representing the probability of flip.

Example
/* Define operations */
auto random_op = vision::RandomHorizontalFlipWithBBox(1.0);

/* dataset is an instance of Dataset object */
dataset = dataset->Map({random_op},             // operations
                       {"image", "bbox"});      // input columns
~RandomHorizontalFlipWithBBox() = default

Destructor.