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.
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 withtorch.from_dlpack/jax.dlpack.from_dlpack). - In-process hardware decode (macOS) — real
VTDecompressionSessionreturning IOSurface-backedCVPixelBuffers; H.264/HEVC (hev1) zero-copy, transparentffmpeg+dav1dfallback 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 clearImportErrorwith 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/ffprobeonPATH). - 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 (nothvc1), the native path has no full B-frame reorder buffer, and AV1 uses softwaredav1dvia subprocess. - CUDA decode downloads frames to host memory — not yet a zero-copy CUDA buffer handoff.
convert_mcaphas an open upstream crash inmcap0.25.0 on malformed input; it is isolated behindcatch_unwindso 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.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyroboframes-2.6.3.tar.gz | 259.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyroboframes-2.6.3-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.3.tar.gz
| Download URL | pyroboframes-2.6.3.tar.gz |
|---|---|
| Size | 259.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
657bf971d03e4ab8030118297044a37cbf19c965db57ac6630dfafd22912f538
|
|
BLAKE2b-256 checksum How to use checksums |
599cf0cd635a5bf4fd86bc0584d17710abf8b16b40880f39ad3f976dca9e0ff4
|
| 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.3-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | pyroboframes-2.6.3-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 |
d9237271bd7d52d1a91d5d872619be3c417fb2a1900e7f5914ae703195177222
|
|
BLAKE2b-256 checksum How to use checksums |
e7f985663af7c36ef78596a3befbe448744574055785dd949424533007eb406b
|
| 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.3
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.