←新闻详情

MarkTechPost更新于 10月13日 00:30

如何用 NVIDIA Cosmos3-DROID 构建流式机器人学习流水线

Building a Streaming Robotics Learning Pipeline Using NVIDIA Cosmos3-DROID - MarkTechPost

AI 导读

教程演示了围绕 NVIDIA Cosmos3-DROID 数据集构建端到端流式机器人学习流水线,无需下载其 707 GB 仓库:通过 HTTP byte-range 与 PyArrow 按行组、列读取 Parquet,并用基于 seek 的 PyAV/FFmpeg 只解码所需 AV1 视频窗口。随后将 episode 转为状态-动作轨迹,用数据集统计量归一化,构建 ACT 风格分块 PyTorch 数据集并训练多模态行为克隆策略。最后以开环 rollout 和时间集成评估,报告逐关节 MSE 与 R^2 并保存策略 checkpoint。

正文

当前显示原文,中文全文译文尚未就绪。

In this tutorial, we design an end-to-end streaming robotics learning pipeline around the NVIDIA Cosmos3-DROID dataset without downloading its 707 GB repository locally. We first introspect the LeRobotDataset v3.0 structure and construct a metadata graph from info.json, task metadata, episode tables, and dataset statistics, then use HTTP byte-range access with PyArrow to selectively read Parquet row groups and columns. We convert individual episodes into state-action trajectories and analyze joint motion, gripper events, Cartesian end-effector paths, and action-frequency spectra before decoding only the required AV1 video windows through seek-based PyAV/FFmpeg access. We then normalize observations and actions using dataset statistics, construct an ACT-style chunked PyTorch dataset with optional visual conditioning, and train a multimodal behavior-cloning policy. Finally, we evaluate the learned policy through open-loop rollout with temporally ensembled action chunks, report per-joint MSE and R^2 against a mean-action baseline, visualize predicted versus ground-truth actions, and save the complete policy checkpoint for downstream use.

We initialize the Colab environment, install the required libraries, and configure the Cosmos3-DROID dataset, episode, video, and training parameters. We inspect the repository structure and identify the available data, video, and metadata shards without downloading the complete dataset. We then load the core metadata and task descriptions to understand the dataset schema, available state/action features, and episode organization.

We implement a byte-range Parquet reader that accesses only the required row groups and columns directly through the Hugging Face filesystem. We identify episode boundaries within a data shard and convert selected state and action fields into NumPy trajectories. We then visualize joint positions, gripper activity, Cartesian motion, action distributions, frequency spectra, and episode-duration statistics.

We build a seek-based video pipeline that retrieves only the required temporal window from an episode, rather than downloading an entire video shard. We support both PyAV and FFmpeg decoding paths to handle AV1 video efficiently and resize selected frames for lightweight processing. We also load dataset-level normalization statistics from stats.json, with an empirical fallback when those statistics are unavailable.

We load a configurable collection of episodes and optionally cache synchronized visual observations for a small subset to keep training computationally manageable. We construct an ACT-style PyTorch dataset that combines observation history and optional images with normalized future action chunks. We then define a chunked policy architecture that combines an MLP state encoder with an optional CNN vision encoder and predicts a sequence of future actions.

We initialize the chunked policy and optimize it with AdamW, OneCycle learning-rate scheduling, mixed-precision execution, gradient scaling, and gradient clipping. We use a Smooth L1 loss to make behavior cloning more robust to noisy or variable teleoperation actions. We train the policy for the configured number of epochs while tracking both training and validation losses to monitor learning behavior.

We evaluate the trained policy through open-loop rollout and combine overlapping action predictions using exponentially weighted temporal ensembling. We compute per-joint MSE, baseline error, and R^2, and plot predicted actions against ground-truth trajectories, along with the training/validation loss curves. Finally, we save the trained model with normalization statistics and configuration metadata so we can reuse the policy in subsequent experiments.

In conclusion, we showed how to turn a massive real-world robot dataset into a learning pipeline while keeping storage and data-transfer requirements extremely low. We used metadata-driven episode discovery, column- and row-group-level Parquet projection, and seek-based video decoding to access only the information required for analysis and training rather than materializing the full dataset. We combined proprioceptive state history with optional visual observations to train a chunked behavior-cloning policy and used temporal ensembling to obtain smoother action predictions during open-loop evaluation. The resulting workflow gives us a compact but extensible foundation that we can scale across additional shards, failure demonstrations, camera views, language instructions, or alternative action representations for more sophisticated robotics and vision-language-action experiments.

Sana Hassan

Sana Hassan, a consulting intern at Marktechpost and dual-degree student at IIT Madras, is passionate about applying technology and AI to address real-world challenges. With a keen interest in solving practical problems, he brings a fresh perspective to the intersection of AI and real-life solutions.

来源

MarkTechPost