This module contains utilities for visualization.


This module contains visualization methods on image

d3d.vis.image.visualize_detections(ax, image_frame, targets, calib, box_color=(0, 1, 0), thickness=2, tags=None)[source]

Draw detected object on matplotlib canvas



d3d.vis.pcl.visualize_detections(visualizer, visualizer_frame, targets, calib, text_scale=0.8, box_color=(1, 1, 1), text_color=(1, 0.8, 1), id_prefix='', tags=None, text_offset=None, viewport=0)[source]

Visualize detection targets in PCL Visualizer.

  • visualizer (pcl.Visualizer) – The pcl.Visualizer instance used for visualization

  • visualizer_frame (str) – The frame that visualizer is in

  • targets (d3d.abstraction.Target3DArray) – Object array to be visualized

  • calib (d3d.abstraction.TransformSet) – TransformSet object storing calibration information. This is mandatory if the targets are in different frames

  • text_scale – The scale for text tags. Set to 0 or negative if you want to suppress text visualization

  • box_color – Specifying the color of bounding boxes. If it’s a tuple, then it’s assumed that it contains three RGB values in range 0-1. If it’s a str or matplotlib colormap object, then the color comes from applying colormap to the object id.

  • text_color – Specifying the color of text tags.

  • id_prefix – Prefix of actor ids in PCL Visualizer, essential when this function is called multiple times

  • text_offset – Relative position of text tags with regard to the box center

  • viewport – Viewport for objects to be added. This is a PCL related feature


class d3d.vis.xviz.TrackingDatasetConverter(loader, lidar_names=None, camera_names=None, lidar_colormap='hot')[source]

Bases: object

This class converts tracking dataset to data blobs like https://github.com/uber/xviz-data You can derive this class and custom the visualization results

  • lidar_names – Frame names of lidar to be visualized

  • camera_names – Frame names of camera to be visualized

  • lidar_colormap – Matplotlib colormap used to color lidar points

  • loader (d3d.dataset.base.TrackingDatasetBase) –

d3d.vis.xviz.visualize_detections(builder, visualizer_frame, targets, calib, stream_prefix, id_prefix='', tags=None, text_offset=None)[source]

Add detection results to xviz builder

d3d.vis.xviz.visualize_detections_metadata(builder, tag_enum, stream_prefix='/tracklets', box_color=(1, 1, 1), text_color=(1, 1, 1))[source]
  • tag_enum (enum.Enum) – Enumeration of all possible tags.

  • box_color – tuple or dict of tuple. Define bounding box color for each category

  • text_color – tuple or dict of tuple. Define text color for each category

  • builder (xviz_avs.builder.XVIZMetadataBuilder) –