nvidia.dali.fn.bb_flip

nvidia.dali.fn.bb_flip(*inputs, **kwargs)

Flips bounding boxes horizontaly or verticaly (mirror).

The bounding box coordinates for the input are in the [x, y, width, height] - xywh or [left, top, right, bottom] - ltrb format. All coordinates are in the image coordinate system, that is 0.0-1.0

Supported backends
  • ‘cpu’

  • ‘gpu’

Parameters:

input (TensorList) – Input to the operator.

Keyword Arguments:
  • bytes_per_sample_hint (int or list of int, optional, default = [0]) –

    Output size hint, in bytes per sample.

    If specified, the operator’s outputs residing in GPU or page-locked host memory will be preallocated to accommodate a batch of samples of this size.

  • horizontal (int or TensorList of int, optional, default = 1) – Flip horizontal dimension.

  • ltrb (bool, optional, default = False) – True for ltrb or False for xywh.

  • preserve (bool, optional, default = False) – Prevents the operator from being removed from the graph even if its outputs are not used.

  • seed (int, optional, default = -1) –

    Random seed.

    If not provided, it will be populated based on the global seed of the pipeline.

  • vertical (int or TensorList of int, optional, default = 0) – Flip vertical dimension.