Skip to main content

class Object3D

data_or_path: 'np.ndarray | str | pathlib.Path | TextIO | dict',
caption: 'str | None' = None, **kwargs: 'str | FileFormat3D | None'

Description

W&B class for 3D point clouds.

Args

  • data_or_path: Object3D can be initialized from a file or a numpy array.
  • caption: Caption associated with the object for display.
  • kwargs:

Methods

method from_file

data_or_path: 'TextIO | str',
file_type: 'FileFormat3D | None' = None
Initializes Object3D from a file or stream.
Arguments
  • data_or_path: A path to a file or a TextIO stream.
  • file_type: Specifies the data format passed to data_or_path. Required when data_or_path is a TextIO stream. This parameter is ignored if a file path is provided. The type is taken from the file extension.

method from_numpy

data: 'np.ndarray'
Initializes Object3D from a numpy array.
Arguments
  • data: Each entry in the array will represent one point in the point cloud.

method from_point_cloud

points: 'Sequence[Point]',
boxes: 'Sequence[Box3D]',
vectors: 'Sequence[Vector3D] | None' = None,
point_cloud_type: 'PointCloudType' = 'lidar/beta'
Initializes Object3D from a python object.
Arguments
  • points: The points in the point cloud.
  • boxes: 3D bounding boxes for labeling the point cloud. Boxes are displayed in point cloud visualizations.
  • vectors: Each vector is displayed in the point cloud visualization. Can be used to indicate directionality of bounding boxes. Defaults to None.
  • point_cloud_type: At this time, only the “lidar/beta” type is supported. Defaults to “lidar/beta”.