Skip to main content

PyRoboFrames

High-performance Rust-backed dataloader for robot learning datasets — native LeRobot v3.0 support, in-process hardware video decode, format conversion from HDF5/NetCDF/RLDS/MCAP/ROS 2, and NumPy / PyTorch / JAX / MLX output.

CI PyPI License: Apache 2.0 Python 3.10+

What it is

PyRoboFrames loads robot-learning datasets fast. The heavy lifting — dataset reading, video decode, temporal windowing — is a compiled Rust extension (pyroboframes._core, PyO3/maturin); the Python layer is the ergonomic surface (RoboFrameDataset, DataLoader, format converters, device adapters). It targets robot learning's LeRobot-style episodic data (state/action/video aligned by frame index) and its differentiator is in-process hardware video decode via Apple VideoToolbox — not an ffmpeg subprocess per frame.

Features

  • LeRobot v3.0 native — direct Rust reader for the meta/, data/, videos/ layout; batched iteration with on-the-fly camera decode.
  • Multiple array backends — output="numpy" | "torch" | "mlx" | "jax"; output="numpy_zerocopy" returns per-frame [H, W, 3] arrays with no shared-batch copy (works with torch.from_dlpack / jax.dlpack.from_dlpack).
  • In-process hardware decode (macOS) — real VTDecompressionSession returning IOSurface-backed CVPixelBuffers; H.264/HEVC (hev1) zero-copy, transparent ffmpeg+dav1d fallback for AV1.
  • Format conversion — bring HDF5 (ROBOMIMIC/ACT), NetCDF, RLDS (Open X-Embodiment), MCAP, or ROS 2 bags into LeRobot format via convert_* / RLDSDataset.from_tfds().
  • Cloud and Hub — download_lerobot_dataset() from the Hugging Face Hub; RemoteDataset.from_s3()/from_gcs().
  • Unified registry — load_dataset(path, format=...) across supported formats; missing optional deps raise a clear ImportError with an install hint.

Who it's for / Use cases

  • Training-loop data loading — iterate a LeRobot dataset in batches (state/action + decoded camera frames) into NumPy/PyTorch/JAX/MLX. Primary, best-tested path.
  • Normalizing mixed recordings — convert HDF5/NetCDF/RLDS/MCAP/ROS 2 into one LeRobot format so downstream code only knows one reader.
  • Apple Silicon training where camera decode is the bottleneck — the in-process VideoToolbox path avoids the subprocess-copy cost of per-frame ffmpeg.

What it is not

  • Prebuilt wheels are macOS (Apple Silicon) only. Linux/Windows install from the source distribution and need a Rust toolchain (and, for the default build, ffmpeg/ffprobe on PATH).
  • Not a true remote-streaming loader. Cloud readers download to a local cache first.
  • Video decode does not cover everything. HEVC is limited to hev1-tagged files (not hvc1), the native path has no full B-frame reorder buffer, and AV1 uses software dav1d via subprocess.
  • CUDA decode downloads frames to host memory — not yet a zero-copy CUDA buffer handoff.
  • convert_mcap has an open upstream crash in mcap 0.25.0 on malformed input; it is isolated behind catch_unwind so callers get a clean error, but the fuzz smoke test cannot pass until upstream fixes it.
  • Not a general-purpose video toolkit — scope is robot-learning episodic data.

Project status

Released and in use, version 2.6.1 (matching the latest PyPI release). 323 Python tests and 324 Rust unit+integration tests at this revision. Two shipped incidents are disclosed rather than hidden: the v2.5.0 PyPI wheel was broken (no compiled extension; fixed in v2.5.1), and VideoToolbox hardware decode was dead code in every wheel before v2.5.0 (the Cargo feature was missing from the maturin features list; fixed in v2.5.0). scripts/release.sh now guards against the former. See ROADMAP_HONEST.md for the solid-vs-rough breakdown.

Installation

pip install pyroboframes

Installs a prebuilt wheel on macOS arm64. On other platforms install from source (Rust toolchain; ffmpeg/ffprobe on PATH for the default build):

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
pip install pyroboframes

Optional extras/dependencies, depending on format and backend: pyroboframes[mlx], h5py (HDF5), xarray netCDF4 (NetCDF), tensorflow_datasets (RLDS), fsspec s3fs gcsfs (cloud), torch/jax (array backends), scipy scikit-learn (GPU transforms and 3D occupancy morphology).

Quick start

import pyroboframes as prf

# Open a local LeRobot v3.0 dataset (directory holding meta/, data/, videos/)
ds = prf.RoboFrameDataset.from_path("/path/to/lerobot_dataset")
print(ds.num_frames, ds.num_episodes, ds.fps, ds.cameras)

# Or pull one from the Hugging Face Hub first
ds = prf.RoboFrameDataset.from_path(prf.download_lerobot_dataset("lerobot/aloha_mobile_cabinet"))

loader = ds.loader(
    batch_size=32, shuffle=True,
    cameras=["observation.images.top"],  # decodes video on the fly
    output="numpy",                      # or "torch" / "mlx" / "jax"
)
for batch in loader:
    batch["observation.state"]           # [32, state_dim] float32
    batch["action"]                      # [32, action_dim] float32
    batch["observation.images.top"]      # [32, H, W, 3] uint8

Usage

# Zero-copy per-frame arrays (no shared-batch copy); not available with num_workers > 0
loader = ds.loader(batch_size=32, cameras=["observation.images.top"], output="numpy_zerocopy")

# Convert a foreign recording into LeRobot format
prf.convert_hdf5("/data/robomimic_task.hdf5", "/data/lerobot_out")

Documentation

  • docs/ — architecture, camera calibration, depth cameras, multimodal fusion, and more
  • .github/INSTALL.md — platform-specific install notes
  • examples/ — full training-loop scripts (humanoid multimodal fusion, quadruped proprioception)
  • ROADMAP_HONEST.md — solid vs rough, open issues, measurements
  • SECURITY.md — security/compliance posture
  • CHANGELOG.md — notable changes

Contributing

Bug reports and questions: GitHub Issues. Releases are cut with scripts/release.sh (not maturin build directly).

Part of the robotics & autonomy family

PyRoboFrames is one of six complementary, composable tools in the Mullassery robotics & autonomy family. Together they form a single stack: perceive → map → simulate → learn → debug → coordinate the fleet.

Tool Role What it does
PyRoboVision Perception Multi-object tracker (Kalman filter + Hungarian algorithm) and trajectory predictor for robot perception.
PyTerrainMap Mapping / SLAM Fuses multi-robot terrain observations into a spatial-temporal store, with H3 spatial indexing and SLAM.
PyRoboSimulator Simulation World simulator for autonomous systems, with a FastAPI backend.
PyRoboFrames Learning data This project — Rust-backed ML dataloader for robot-learning datasets (native LeRobot format, Apple Silicon hardware video decode).
PyRoboReplay Mission forensics Forensic-debugging and causal-analysis engine for autonomous robot mission replay.
SyncFleet Fleet coordination Rust + SQLite, peer-to-peer state sync for robotics fleets — mutual-TLS 1.3, version-vector replication, mDNS discovery; conflict resolution on the roadmap.

Each works standalone, but they're complementary by design. Browse all projects →

License

Apache License 2.0 — see LICENSE.

Metadata

Release files for pyroboframes 2.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyroboframes 2.6.2
File Size Uploaded Provenance
pyroboframes-2.6.2.tar.gz 259.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pyroboframes 2.6.2
File Interpreter ABI Platform
pyroboframes-2.6.2-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details

Total release size: 5.2 MB

Release files / pyroboframes-2.6.2.tar.gz

Download URL pyroboframes-2.6.2.tar.gz
Size 259.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6fd0ff568ef753c820f53ed2eff8b6f41be2daeeb76e35c27ccf1dbcf197d2bc
BLAKE2b-256 checksum
How to use checksums
10b753215d8059581bd345952e642f28f069e71b48e8f733680e032f839a379a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / pyroboframes-2.6.2-cp310-abi3-macosx_11_0_arm64.whl

Download URL pyroboframes-2.6.2-cp310-abi3-macosx_11_0_arm64.whl
Size 4.9 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7165397c9c160493f5e100a9555ad6085546357baf6a608a71cc6d026df6b567
BLAKE2b-256 checksum
How to use checksums
a3d09ffec609b9c992bc3e40b7b367107c443bcd133b9b43de44ee36305ac38d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for pyroboframes 2.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page