Skip to main content
The lerobot-dataset-viz command visualizes all frames in a dataset episode using Rerun.

Command

Location: src/lerobot/scripts/lerobot_dataset_viz.py

Overview

The visualization script:
  • Displays all data modalities (images, states, actions)
  • Shows temporal evolution across episodes
  • Useful for dataset inspection and debugging
  • Supports local and remote viewing
  • Can save visualization recordings

Key Options

str
required
Dataset repository ID (e.g., lerobot/pusht).
int
required
Episode index to visualize (0-based).
str
Local path to dataset.
int
default:"32"
Batch size for data loading.
int
default:"0"
Number of dataloader workers.
str
default:"local"
Viewing mode: local or distant.
int
default:"9090"
Web viewer port for distant mode.
int
default:"9876"
gRPC port for distant mode.
bool
default:"False"
Save visualization to .rrd file.
str
Directory for saving .rrd files.
bool
default:"False"
Compress images in Rerun (reduces bandwidth).

Usage Examples

Local Visualization

This opens Rerun viewer locally showing:
  • Camera images
  • Action trajectories
  • State values
  • Rewards
  • Episode metadata

Visualize Specific Episode

Save Visualization to File

Remote Visualization (Server)

On remote machine:
On local machine:

Local Dataset Visualization

High-Performance Loading

Compressed Images (Low Bandwidth)

Visualization Features

The Rerun viewer shows:

Camera Views

  • All camera streams from the episode
  • Synchronized playback
  • Pan/zoom controls

Action Space

  • Action values over time
  • Multi-dimensional action plots
  • Action bounds visualization

State Space

  • Robot state evolution
  • Joint positions/velocities
  • End-effector positions

Metadata

  • Frame indices
  • Timestamps
  • Episode information
  • Task descriptions

Programmatic Usage

Custom Visualization

Compare Multiple Episodes

Rerun Viewer Controls

  • Play/Pause: Spacebar
  • Step Forward/Back: Arrow keys
  • Zoom: Mouse wheel
  • Pan: Click and drag
  • Select View: Click panel names
  • Timeline: Drag timeline slider

Output File Format

When using --save=1, creates .rrd files:
These files can be:
  • Shared with collaborators
  • Viewed offline with rerun <file>.rrd
  • Archived for later inspection

Tips

  1. Large Episodes: Use higher --batch-size for faster loading
  2. Remote Viewing: Use distant mode for headless servers
  3. Bandwidth: Enable --display-compressed-images for remote viewing
  4. Debugging: Useful for verifying dataset quality before training
  5. Comparison: Save multiple episodes and compare offline

See Also