Now recruiting capture teams worldwide. Get paid to record first-person video of real work.

Apply to capture

Guide

How to Convert UMI Data to LeRobot Format

A field mapping, step list and checks for converting a UMI Zarr replay buffer to a LeRobot dataset, from the UMI repository and the LeRobot docs.
By the Firsthand capture teamLast updated November 27, 2026

Short answer

The UMI repository writes a Zarr replay buffer, dataset.zarr.zip, with per-step arrays and episode_ends. LeRobot expects Parquet tables, one MP4 per camera and JSON/Parquet metadata. Converting means splitting the arrays by episode and writing frames through the LeRobot dataset API. Neither official source documents a UMI converter, so you build the mapping yourself.

Last reviewed:

What does the UMI pipeline output?

The official UMI repository (opens in a new tab) documents one training format. After the SLAM stage, its README runs scripts_slam_pipeline/07_generate_replay_buffer.py with an output path ending in dataset.zarr.zip, and the training command points task.dataset_path at that file. The README also links a processed Zarr dataset for the authors in-the-wild cup arrangement task. The UMI Zarr replay buffer entry is the definition; this guide treats the file as the source side of a mapping.

The code shows how the file is organised. The script builds the buffer with the repo ReplayBuffer class, which asserts that the root has a data group and a meta group, that meta holds an episode_ends array, and that every array in data has a first dimension equal to the last value of episode_ends. So the layout is flat: every episode is concatenated along the first axis of each array, and episode_ends records where each episode stops. The loader, UmiDataset, opens the zip file with zarr.ZipStore in read mode.

For each gripper i the script writes robot{i}_eef_pos, robot{i}_eef_rot_axis_angle, robot{i}_gripper_width, robot{i}_demo_start_pose and robot{i}_demo_end_pose, and for each camera j it writes camera{j}_rgb. The position, rotation and width arrays are cast to float32. The script writes no IMU array, no timestamp array, no task text and no success or failure labels, so those do not exist in the replay buffer as the repo produces it.

Images are not stored as the original video. The script decodes each demo video, resizes the frames to an output resolution set by one of its options (default 224,224) and stores RGB frames in an array with one frame per chunk, compressed with a JPEG XL codec that the repo registers itself. The paper (https://arxiv.org/abs/2402.10329) describes a handheld gripper with a wrist-mounted fisheye camera, recovers the end-effector pose from that video with SLAM, and records one video per attempt, which is why the pose arrays hold post-processed values and not robot readings.

What does the LeRobot dataset format expect?

The official LeRobotDataset v3.0 documentation (opens in a new tab) says the format is included in lerobot 0.4.0 and later, and describes three pillars: tabular data (states, actions, timestamps) in Apache Parquet, visual data as camera frames encoded into MP4 and sharded per camera, and metadata as JSON or Parquet records for schema, frame rates, normalization statistics and episode segmentation. Many episodes share one Parquet or MP4 file, and episode boundaries are resolved through metadata, not file names. The library lives in the huggingface/lerobot repository (opens in a new tab).

  • meta/info.json: the canonical schema (features, shapes and dtypes), the frame rate, the codebase version and the path templates that locate data and video files.
  • meta/stats.json: feature statistics (mean, std, min, max) used for normalization.
  • meta/tasks.parquet: natural-language task descriptions mapped to integer IDs.
  • meta/episodes/: per-episode records with lengths, tasks and offsets, stored as chunked Parquet.
  • data/: frame-by-frame Parquet files, each typically holding many episodes.
  • videos/: MP4 files per camera, each typically holding many episodes.

At load time, a sample is a Python dictionary of PyTorch tensors. The docs show keys such as observation.state, action, observation.images.front_left and timestamp. Older v2.1 datasets used one Parquet file and one MP4 file per episode, per the porting guide in the official docs (opens in a new tab), and the LeRobot format page on this site states that Firsthand exports the v2.1 layout. Pick the version first, because the file layout and the import path differ between them.

Is there an official UMI-to-LeRobot converter?

Not in the sources read. The UMI README mentions Zarr only; it names no LeRobot, RLDS or MCAP output and documents no converter. The LeRobot docs describe a v2.1 to v3.0 migration script and a walkthrough that ports a different dataset into the v3.0 format; neither names UMI. The same reading is recorded in UMI dataset formats.

That makes conversion an approach a lab implements itself: read the replay buffer, decide the field mapping, write the dataset through the LeRobot API and check the result. Nothing here is an official UMI or LeRobot tool, and this site does not state otherwise. For the shape of the work in another setting, see converting RLDS to LeRobot, a field-by-field mapping written for the Firsthand egocentric schema, not for UMI.

How do UMI arrays map to LeRobot features?

A proposed mapping, not an official one. Not stated means neither the UMI repository nor the LeRobot docs say how the field should be placed.
UMI array (as the repo names it)What it holdsLeRobot feature or locationNotes
camera{j}_rgbRGB frames from gripper camera j, one frame per step, JPEG XL compressed at the script output resolution (default 224,224).A video feature, for example observation.images.<camera name>, stored as an MP4 per camera under videos/.Camera names are your choice. The docs sample uses observation.images.front_left. Frames must be encoded to video.
robot{i}_eef_posEnd-effector position, three values per step, float32.Part of observation.state, action, or both.Ordering inside the vector: not stated. Fix it in your spec.
robot{i}_eef_rot_axis_angleEnd-effector rotation as axis-angle, three values per step, float32.Part of observation.state, action, or both.The UMI task config uses a 6D rotation representation at training time. The LeRobot docs state no rotation representation.
robot{i}_gripper_widthGripper width, one value per step, float32.Part of observation.state, action, or both.Placement: not stated.
robot{i}_demo_start_pose, robot{i}_demo_end_poseThe start and end pose of the demo, repeated on every step of the episode.No LeRobot counterpart stated.Keep as extra per-frame features or drop. Decide in the spec.
meta/episode_endsThe index at which each episode ends in the concatenated arrays (int64).meta/episodes/ records (lengths, tasks, offsets), produced when you save each episode.You use it to cut the arrays; LeRobot rebuilds boundaries from its own metadata.
TimestampsNo timestamp array is written by the replay-buffer script. The README states no frame rate.timestamp per frame, and the frame rate in meta/info.json.Take timing from your capture spec. Not stated by the sources.
IMUNot written to the replay buffer.No standard key stated.Needs the raw session data, if it is available to you.
Task descriptionNot in the replay buffer.meta/tasks.parquet, natural-language task text mapped to integer IDs.Supply it yourself for each episode.
Success and failure labelsNot in the replay buffer.Not stated.Add as an extra feature or episode metadata, agreed in the spec.

A proposed mapping, not an official one. Not stated means neither the UMI repository nor the LeRobot docs say how the field should be placed.

What are the steps to convert UMI data to LeRobot?

These steps are a conversion approach assembled from the two sets of docs. They are not a documented UMI procedure, so treat each as a decision to write down in your spec before you run anything.

  • Pick the target version. The v3.0 docs describe the layout in lerobot 0.4.0 and later; the site delivers v2.1. Install a LeRobot release that matches, and note that import paths differ between the two.
  • Open the replay buffer. List the arrays under data, read meta/episode_ends, and confirm the first dimension of every array matches its last value, as the repo itself asserts.
  • Split into episodes. Use episode_ends to cut every array into per-episode slices, so each episode has the same step count in every array.
  • Define the features. Decide which UMI arrays form observation.state and which form action, how each is ordered, and what each camera feature is called. Record dtype, shape and ordering.
  • Decode the images. Read the camera arrays with the same JPEG XL codec the repo uses, then prepare the frames for a video feature.
  • Write each episode. For every step, add a frame; at the end of the episode, save it.
  • Finalize. Call finalize() after the last episode and before any push to the Hub. The docs state that without it the Parquet files are incomplete.
  • Check. Compare counts with the replay buffer, load a sample with LeRobotDataset and inspect the keys.
LeRobot v3.0 docs skeleton (episode_data = converted frames of one UMI episode)
from lerobot.datasets import LeRobotDataset

# Create dataset and record episodes
dataset = LeRobotDataset.create(...)  # arguments: see the LeRobot docs for your version

for episode in range(num_episodes):
    for frame in episode_data:
        dataset.add_frame(frame)
    dataset.save_episode()

# Call finalize() when done recording and before push_to_hub()
dataset.finalize()
dataset.push_to_hub()

How do you handle camera images and video?

This is where the two formats differ most. UMI stores per-step frames inside a Zarr array, compressed with a JPEG XL codec the repo registers. LeRobot stores camera frames encoded into MP4, one set of files per camera, and the porting guide in the official docs shows camera features with a video dtype and height, width and channel names. So the frames have to be decoded from the array and written into the LeRobot camera features. Reading the array needs the same codec; without it the arrays cannot be decoded.

Resolution is the second decision. The script resizes frames to its output resolution, default 224,224, so the replay buffer is already a reduced version of the recording. If you need a different size, the script option that sets it is the place to change it, followed by regenerating the buffer. The LeRobot docs state that transforms such as brightness or contrast are applied at training time and not at recording, so raw frames are stored as given; resize or augment accordingly.

How do you check the converted dataset?

Structural checks you run yourself. They are not Firsthand figures, and no thresholds are implied.
CheckUMI sideLeRobot side
Episode countThe number of entries in meta/episode_ends.The number of records in meta/episodes.
Total stepsThe last value of episode_ends, equal to the first dimension of every data array.The sum of episode lengths in meta/episodes, matching the rows in data/.
FeaturesArray names, shapes and dtypes under data.Features, shapes and dtypes in meta/info.json.
VideoThe frame count of camera{j}_rgb for each episode.The frames of each episode in the per-camera MP4, found through the metadata offsets.
LoadingUmiDataset opens the original file.LeRobotDataset loads the new dataset and returns a sample with the expected keys, and a DataLoader returns a batch.

Structural checks you run yourself. They are not Firsthand figures, and no thresholds are implied.

A converted dataset can pass every structural check and still carry a poor trajectory: conversion does not repair SLAM tracking loss or an uncalibrated gripper width. Those are upstream checks in the UMI data quality checklist. Run both: quality before conversion, structure after.

What can go wrong in conversion?

  • Skipping finalize(). The v3.0 docs state the dataset uses incremental Parquet writing, and without finalize() the Parquet files are incomplete and the dataset will not load properly.
  • Mixing versions. The v2.1 and v3.0 layouts differ, and the docs provide a v2.1 to v3.0 migration script. The site LeRobot page loads with lerobot.common.datasets, while the v3.0 docs import from lerobot.datasets, so check the import path against your installed release.
  • Inventing timestamps. The replay buffer has no timestamp array and the README states no frame rate, so a frame rate has to come from the capture spec and be written into the metadata, not guessed.
  • Reading episode_ends wrongly. The repo asserts that the last value equals the array length, which implies the values are end offsets and the first episode starts at zero. Confirm this on your file before slicing.
  • Changing the rotation or pose representation without recording it. The UMI task config sets a 6D rotation representation and relative pose representations; the LeRobot docs state none. If you train outside the UMI code, choose one and write it down.

When is it simpler to collect data in LeRobot format from the start?

When your training stack is LeRobot and you are buying or commissioning data, name the format and version in the spec, so the conversion is the provider job and not a project for your team. The LeRobot docs show recording with a robot and a leader device through its own command, which is a robot-based path; handheld UMI-style capture has no robot in the loop, so its episodes still need a mapping like the one above unless delivery is already in your format.

How does Firsthand deliver custom UMI-style data?

Firsthand runs custom UMI data collection: UMI-style handheld gripper demonstrations recorded to your task spec in real homes, workplaces and factories, through our network of capture providers, on rigs we source and ship. Delivered per episode: gripper-camera video, 6-DoF end-effector trajectory, continuous gripper width, IMU, timestamps, task and episode metadata, and success and failure labels. Paired head-mounted egocentric video is available on request.

This is fast, on-demand custom collection at scale through a network of thousands of capture providers, for a consistent, recurring data flow to labs. The site lists six delivery formats on the formats index: RLDS, LeRobot, WebDataset, HDF5 and zarr, Rerun .rrd and the episode schema. Whether UMI-style episodes are delivered in a LeRobot layout, a UMI-compatible Zarr layout or another listed format is not stated on the site for UMI, so delivery format is scoped on request. Force/torque, tactile and gripper depth are scoped on request too. Details are on UMI data collection services; see also what UMI is and how UMI variants differ. To start, request a custom UMI dataset.

Firsthand is not affiliated with, endorsed by or related to the UMI authors, the LeRobot maintainers or Hugging Face, their institutions or any gripper or camera maker.

FAQ

How to Convert UMI Data to LeRobot Format, answered.

01

Can UMI data be used with LeRobot?

Yes in principle, once it is converted. The UMI replay buffer is Zarr and LeRobot reads Parquet, MP4 and metadata, so the arrays have to be mapped into LeRobot features and written through the LeRobot dataset API. Neither official source documents a UMI-specific path.

02

Does UMI ship a LeRobot converter?

No converter is documented in the UMI README, which mentions Zarr only. The LeRobot docs describe a v2.1 to v3.0 migration and a porting walkthrough for another dataset, not UMI. A UMI conversion is something you implement.

03

What is the UMI replay buffer format?

A Zarr store written by 07_generate_replay_buffer.py as dataset.zarr.zip. It has a data group of arrays (robot{i}_* and camera{j}_rgb) and a meta group with episode_ends. All episodes are concatenated along the first axis.

04

Do I need to re-encode the camera frames?

Yes, as the formats store images differently. UMI keeps JPEG XL compressed frames in Zarr arrays, while LeRobot stores camera frames as MP4 per camera. The docs read do not state encoder settings for frames added from existing data, so test a small batch.

05

Can Firsthand deliver UMI-style data in LeRobot format?

The site lists LeRobot among its delivery formats, but does not state a LeRobot or UMI-compatible Zarr layout for UMI-style data, so delivery format is scoped on request. Name your format and version in the request.

06

Where can I get custom UMI data?

Firsthand runs custom UMI data collection: UMI-style handheld gripper demonstrations recorded to your task spec in real homes, workplaces and factories, through our network of capture providers, on rigs we source and ship. Delivered per episode: gripper-camera video, 6-DoF end-effector trajectory, continuous gripper width, IMU, timestamps, task and episode metadata, and success and failure labels. Paired head-mounted egocentric video is available on request. This is custom collection at scale through a network of thousands of capture providers, for a consistent, recurring data flow to labs.

Sources

Where is this documented?

Check it against the sample pack.

40 episodes across 4 environments, delivered in the exact schema these guides describe.