otx.algo.object_detection_3d.utils.utils#

utils for object detection 3D models.

Functions

box_cxcylrtb_to_xyxy(x)

Transform bbox from cxcylrtb to xyxy representation.

Classes

NestedTensor(tensors, mask)

Nested tensor class for object detection 3D models.

class otx.algo.object_detection_3d.utils.utils.NestedTensor(tensors: Tensor, mask: Tensor)[source]#

Bases: object

Nested tensor class for object detection 3D models.

Initialize a NestedTensor object.

Parameters:
  • tensors (Tensor) – The tensors representing the nested structure.

  • mask (Tensor) – The mask indicating the valid elements in the tensors.

decompose() tuple[Tensor, Tensor][source]#

Decompose the NestedTensor object into its constituent tensors and masks.

to(device: device) NestedTensor[source]#

Move the NestedTensor object to the specified device.

Parameters:

device – The device to move the tensors to.

Returns:

The NestedTensor object with tensors moved to the specified device.

Return type:

NestedTensor

otx.algo.object_detection_3d.utils.utils.box_cxcylrtb_to_xyxy(x: Tensor) Tensor[source]#

Transform bbox from cxcylrtb to xyxy representation.