The visualizer class for dataset objects and custom point clouds.

class ColormapEdit(window, em)

This class is used to create a color map for visualization of points.

__init__(window, em)

Initialize self. See help(type(self)) for accurate signature.

update(colormap, min_val, max_val)

Updates the colormap based on the minimum and maximum values passed.

class LabelLUTEdit

This class includes functionality for managing a labellut (label look-up-table).


Initialize self. See help(type(self)) for accurate signature.


Clears the look-up table.


Returns a list of label keys.


Checks if the look-up table is empty.


Updates the labels based on look-up table passsed.

class ProgressDialog(title, window, n_items)

This class is used to manage the progress dialog displayed during visualization.

  • title – The title of the dialog box.

  • window – The window where the progress dialog box should be displayed.

  • n_items – The maximum number of items.

__init__(title, window, n_items)

Initialize self. See help(type(self)) for accurate signature.


Post updates to the main thread.


Set the label text on the dialog box.


Enumerate the progress in the dialog box.


Initialize self. See help(type(self)) for accurate signature.

set_lut(attr_name, lut)

Set the LUT for a specific attribute.

Args: attr_name: The attribute name as string. lut: The LabelLUT object that should be updated.


Set up camera for visualization.

show_geometries_under(name, show)

Show geometry for a given node.

visualize(data, lut=None, bounding_boxes=None, width=1280, height=768)

Visualize a custom point cloud data.


Minimal example for visualizing a single point cloud with an attribute:

import numpy as np
import as ml3d
# or import as ml3d

data = [ {
    'name': 'my_point_cloud',
    'points': np.random.rand(100,3).astype(np.float32),
    'point_attr1': np.random.rand(100).astype(np.float32),
    } ]

vis = ml3d.vis.Visualizer()
  • data – A list of dictionaries. Each dictionary is a point cloud with attributes. Each dictionary must have the entries ‘name’ and ‘points’. Points and point attributes can be passed as numpy arrays, PyTorch tensors or TensorFlow tensors.

  • lut – Optional lookup table for colors.

  • bounding_boxes – Optional bounding boxes.

  • width – window width.

  • height – window height.

visualize_dataset(dataset, split, indices=None, width=1280, height=768)

Visualize a dataset.


Minimal example for visualizing a dataset::

import as ml3d # or as ml3d

dataset = ml3d.datasets.SemanticKITTI(dataset_path=’/path/to/SemanticKITTI/’) vis = ml3d.vis.Visualizer() vis.visualize_dataset(dataset, ‘all’, indices=range(100))

  • dataset – The dataset to use for visualization.

  • split – The dataset split to be used, such as ‘training’

  • indices – An iterable with a subset of the data points to visualize, such as [0,2,3,4].

  • width – The width of the visualization window.

  • height – The height of the visualization window.

GREYSCALE_NAME = 'Colormap (Greyscale)'
LABELS_NAME = 'Label Colormap'
RAINBOW_NAME = 'Colormap (Rainbow)'
SOLID_NAME = 'Solid Color'
X_ATTR_NAME = 'x position'
Y_ATTR_NAME = 'y position'
Z_ATTR_NAME = 'z position'