Macrodata_Labs
AboutBlogDemo
Announcing MacroHands, our SOTA model for 3D hands and camera path from egocentric video!
// Docs›
Quickstart
Running pipelines
  • In-process debugging
  • Local launcher
Reading data
  • Reader model
  • Sharding
  • LeRobot reader
  • HDF5 reader
  • Zarr reader
  • MCAP reader
  • Tabular files
  • Files and videos
  • Hugging Face
  • TensorFlow
  • Lance
  • Custom readers
Episode data
  • Episode rows
  • Frames and videos
  • Metadata, tasks, and stats
  • Converting to robot rows
Transforms
  • Row transforms
  • Async and batch transforms
  • Vectorized transforms
  • Expressions
  • Schemas and DTypes
Episode operations
  • Motion trimming
  • Subtask annotation
Inference
  • Generate text
  • Multimodal and structured output
  • Inference providers
  • Pooling
Writing data
  • Writer model
  • LeRobot writer
  • Zarr writer
  • Parquet and JSONL writers
  • Lance
  • Media assets and reducers
Examples
  • ALOHA HDF5
  • robomimic HDF5
  • Zarr replay buffer
  • MCAP Franka
  • LIBERO HDF5
  • Merge LeRobot datasets
  • Annotate subtasks
Reference
  • Path formats
  • Optional dependencies
// Docs
Quickstart
Running pipelines
  • In-process debugging
  • Local launcher
Reading data
  • Reader model
  • Sharding
  • LeRobot reader
  • HDF5 reader
  • Zarr reader
  • MCAP reader
  • Tabular files
  • Files and videos
  • Hugging Face
  • TensorFlow
  • Lance
  • Custom readers
Episode data
  • Episode rows
  • Frames and videos
  • Metadata, tasks, and stats
  • Converting to robot rows
Transforms
  • Row transforms
  • Async and batch transforms
  • Vectorized transforms
  • Expressions
  • Schemas and DTypes
Episode operations
  • Motion trimming
  • Subtask annotation
Inference
  • Generate text
  • Multimodal and structured output
  • Inference providers
  • Pooling
Writing data
  • Writer model
  • LeRobot writer
  • Zarr writer
  • Parquet and JSONL writers
  • Lance
  • Media assets and reducers
Examples
  • ALOHA HDF5
  • robomimic HDF5
  • Zarr replay buffer
  • MCAP Franka
  • LIBERO HDF5
  • Merge LeRobot datasets
  • Annotate subtasks
Reference
  • Path formats
  • Optional dependencies

Schemas and DTypes

Use dtype metadata for assets, media, and writer schemas

DTypes attach semantic metadata to columns. This matters most for assets and media, where a string or bytes column needs to be treated as a file, image, audio, video, or PDF.

Video columns

1
2
3
4
pipeline = mdr.read_parquet(
    "/data/video_paths.parquet",
    dtypes={"video": mdr.datatype.video_path()},
)

Now downstream transforms can expose video through to_robot_rows:

1
2
3
4
5
pipeline = pipeline.to_robot_rows(
    episode_id_key="episode_id",
    video_keys=("video",),
    fps=30.0,
)

Asset types

HelperUse it for
file_path() / file_bytes()Generic files.
image_path() / image_bytes()Images.
audio_path() / audio_bytes()Audio.
video_path() / video_bytes()Encoded videos.
video_frame_array()In-memory RGB frame arrays.
pdf_path() / pdf_bytes()PDFs.

Transform output DTypes

1
2
3
4
5
6
7
8
def add_clip(row):
    return row.update({"clip": row.videos["front"].clipped(to_timestamp_s=2.0)})


pipeline = pipeline.map(
    add_clip,
    dtypes={"clip": mdr.datatype.video_path()},
)

Related pages

  • Files and Videos
  • Media Assets and Reducers

// Table of Contents

  1. Video columns
  2. Asset types
  3. Transform output DTypes
  4. Related pages
Macrodata_Labs
TermsPrivacyContact
  • GitHub
  • LinkedIn
  • X
  • HuggingFace
  • Discord