tfm.vision.preprocess_ops.random_horizontal_flip_with_roi
Randomly flips input image and bounding boxes horizontally.
tfm.vision.preprocess_ops.random_horizontal_flip_with_roi(
image: tf.Tensor,
boxes: Optional[tf.Tensor] = None,
masks: Optional[tf.Tensor] = None,
roi_boxes: Optional[tf.Tensor] = None,
seed: int = 1
) -> Tuple[tf.Tensor, Optional[tf.Tensor], Optional[tf.Tensor], Optional[tf.Tensor]]
Extends preprocess_ops.random_horizontal_flip to also flip roi_boxes used
by ViLD.
Args |
image
|
tf.Tensor , the image to apply the random flip.
|
boxes
|
tf.Tensor or None , boxes corresponding to the image.
|
masks
|
tf.Tensor or None , masks corresponding to the image.
|
roi_boxes
|
tf.Tensor or None , RoIs corresponding to the image.
|
seed
|
Seed for Tensorflow's random number generator.
|
Returns |
image
|
tf.Tensor , flipped image.
|
boxes
|
tf.Tensor or None , flipped boxes corresponding to the image.
|
masks
|
tf.Tensor or None , flipped masks corresponding to the image.
|
roi_boxes
|
tf.Tensor or None , flipped RoIs corresponding to the image.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2024-02-02 UTC.
[null,null,["Last updated 2024-02-02 UTC."],[],[]]