Building a Streaming Robotics Learning Pipeline Using NVIDIA Cosmos3-DROID
https://www.marktechpost.com/2026/10/05/building-a-streaming-robotics-learning-pipeline-using-nvidia-cosmos3-droid/📌 不下載 707GB 資料集,也能訓練機器人策略
TL;DR:用 byte-range 讀取與 seek-based 解碼,直接在雲端串流訓練 ACT 風格的行為複製策略。
707GB 的機器人資料集,多數人的第一反應是先找地方塞硬碟。這篇教學示範的做法完全相反:一行都不下載,照樣跑完整個訓練與評估流程。
🤔 大型機器人資料集的現實問題
NVIDIA Cosmos3-DROID 是一個完整的 LeRobotDataset v3.0 格式機器人資料集,但完整倉庫高達 707GB。這篇教學的目標是設計一套端到端的串流式機器人學習流程,全程不需要把整個資料集下載到本機。
🧩 用中繼資料圖取代整包下載
整體設計思路是:先建構中繼資料圖,再按需讀取實際內容。
- 讀取 info.json、task metadata、episode tables 與 dataset statistics,先建立資料集結構的中繼資料圖,搞清楚 schema、可用的 state/action 欄位與 episode 組織方式。
- 透過 HTTP byte-range 存取搭配 PyArrow,只讀取需要的 Parquet row group 與欄位,而非整張表。
- 從 Parquet 資料中識別 episode 邊界,把選定的 state 與 action 欄位轉換成 NumPy 格式的軌跡,進而分析關節運動、gripper 事件、笛卡爾座標下的末端執行器路徑,以及動作頻率的頻譜。
- 影片部分同樣走 seek-based 存取:只解碼一個 episode 中真正需要的時間窗口,而非整個影片 shard,並支援 PyAV 與 FFmpeg 兩種解碼路徑來處理 AV1 編碼影片。
- 用 stats.json 中的資料集層級統計量做 observation 與 action 的正規化,若統計量不存在則有一套 empirical fallback 機制。
🧩 ACT 風格的 chunked 行為複製策略
資料處理完成後,流程會載入一組可設定數量的 episode,並選擇性地快取一小部分的同步視覺觀測,以控制訓練的運算量。接著建構一個結合觀測歷史與選用影像的 PyTorch dataset,預測未來一段正規化的 action chunk。策略架構則是 MLP 狀態編碼器搭配一個可選的 CNN 視覺編碼器,輸出未來的動作序列。
訓練設定上使用 AdamW 最佳化器、OneCycle 學習率排程、混合精度運算,並加上梯度縮放與梯度裁剪。損失函式選用 Smooth L1 Loss,目的是讓行為複製對噪訊較大或變化較多的遙控操作動作更穩健。
📊 用時間集成做開迴路評估
訓練完成後,流程透過開迴路 rollout 評估策略,並用指數加權的時間集成(temporal ensembling)合併重疊的動作預測,讓結果更平滑。評估指標包括逐關節的 MSE 與 R^2(相對於平均動作基線),並將預測動作與真實軌跡、訓練/驗證損失曲線一併視覺化呈現。最後把訓練好的模型連同正規化統計量與設定中繼資料一起存檔,方便後續實驗重複使用。
⚠️ 這只是基礎版本
教學本身聚焦在單一模態(state + 選用影像)與單一動作表示法上,並只載入部分 episode 與少量視覺快取以控制運算量,並非對整個 707GB 資料集的完整訓練。
🎯 實務啟示
對於正在處理大型多模態機器人資料集的團隊,這套「中繼資料驅動 + 欄位/row group 層級投影 + seek-based 影片解碼」的組合值得參考:它把「只拿需要的資料」做到了 Parquet 與影片兩個層次,大幅降低儲存與傳輸成本。這個架構也容易延伸到更多 shard、失敗示範、多鏡位視角或語言指令等更複雜的 vision-language-action 實驗。
🔗 來源
- 標題:Building a Streaming Robotics Learning Pipeline Using NVIDIA Cosmos3-DROID
- 作者/機構:Sana Hassan, MarkTechPost
- 連結:https://www.marktechpost.com/2026/10/05/building-a-streaming-robotics-learning-pipeline-using-nvidia-cosmos3-droid/
#Robotics #BehaviorCloning #NVIDIA #LeRobot #PyTorch #DataEngineering #ActionChunking #VisionLanguageAction #StreamingData #MachineLearning
原始資料 MarkTechPost · 收集於 2026-10-05
摘要原文
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. Check out the FULL CODES here . All credit goes to the researcher of this project. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter . Wait! are you on telegram? now you can join us on telegram as well. Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us The post Building a Streaming Robotics Learning Pipeline Using NVIDIA Cosmos3-DROID appeared first on MarkTechPost .
由 claude-code/sonnet 自動生成