open3d.ml.torch.datasets.utils.BEVBox3D#

class open3d.ml.torch.datasets.utils.BEVBox3D(center, size, yaw, label_class, confidence, world_cam=None, cam_img=None, **kwargs)#

Class that defines a special bounding box for object detection, with only one rotation axis (yaw).

up z x front (yaw=0.5*pi)

^ ^ | / | /

(yaw=pi) left y <—— 0

The relative coordinate of bottom center in a BEV box is (0.5, 0.5, 0), and the yaw is around the z axis, thus the rotation axis=2. The yaw is 0 at the negative direction of y axis, and increases from the negative direction of y to the positive direction of x.

__init__(center, size, yaw, label_class, confidence, world_cam=None, cam_img=None, **kwargs)#

Creates a bounding box.

Parameters:
  • center – (x, y, z) that defines the center of the box

  • size – (width, height, depth) that defines the size of the box, as measured from edge to edge

  • yaw – yaw angle of box

  • label_class – integer specifying the classification label. If an LUT is specified in create_lines() this will be used to determine the color of the box.

  • confidence – confidence level of the box

  • world_cam – world to camera transformation

  • cam_img – camera to image transformation

generate_corners3d()#

Generate corners3d representation for this object.

Returns:

(8, 3) corners of box3d in camera coordinates.

Return type:

corners_3d

get_difficulty()#

General method to compute difficulty, can be overloaded.

Returns:

Difficulty depending on projected height of box.

to_camera()#

Transforms box into camera space.

up x y front

^ ^ | / | /

left z <—— 0

Returns box in the common 7-sized vector representation. (x, y, z, l, h, w, a), where (x, y, z) is the bottom center of the box, (l, h, w) is the length, height, width of the box a is the yaw angle

Returns:

(7,)

Return type:

transformed box

to_dict()#

Convert data for evaluation:

static to_dicts(bboxes)#

Convert data for evaluation:

Parameters:

bboxes – List of BEVBox3D bboxes.

to_img()#

Transforms box into 2d box.

Returns:

(4,)

Return type:

transformed box

to_kitti_format(score=1.0)#

This method transforms the class to KITTI format.

to_xyzwhlr()#

Returns box in the common 7-sized vector representation: (x, y, z, w, l, h, a), where (x, y, z) is the bottom center of the box, (w, l, h) is the width, length and height of the box a is the yaw angle.

Returns:

box(7,)