Run this model with HF Jobs
Run Lemon-03/DP_Aloha_Insertion_test on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Lemon-03/DP_Aloha_Insertion_test. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Lemon-03/DP_Aloha_Insertion_test on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Lemon-03/DP_Aloha_Insertion_test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use Lemon-03/DP_Aloha_Insertion_test with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files12310 unmodified lines1415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128---datasets:- lerobot/aloha_sim_insertion_human10 unmodified lines- benchmark---# Diffusion Policy for Aloha Insertion (200k Steps)**Task**: Aloha Insertion (Simulated, 3D Manipulation)**Algorithm**: [Diffusion Policy](https://huggingface.co/papers/2303.04137) (DDPM)**Training Steps**: 200,000**Author**: Graduate Student, UESTC (University of Electronic Science and Technology of China)This model represents a benchmark experiment for **Diffusion Policy** on the challenging **Aloha Insertion** task (Simulated). It was trained using the [LeRobot](https://github.com/huggingface/lerobot) framework to evaluate the algorithm's performance on complex, high-dimensional 3D manipulation tasks compared to baseline methods (ACT).### 🔬 Benchmark ResultsThis experiment highlights the significant difficulty of the Aloha Insertion task for generative policies under limited compute constraints (Batch Size=8).**Evaluation Metrics (50 Episodes):**| Metric | Value | Note || :--- | :--- | :--- || **Success Rate** | **0.0%** | Task difficulty is extremely high; model struggled to complete final insertion. || **Avg Max Reward** | **0.10** | Indicates partial success in grasping/moving, but failed alignment. || **Avg Sum Reward** | **8.20** | Shows the model learned valid trajectories but lacked precision at the goal state. |**Analysis:**Unlike the 2D Push-T task where Diffusion Policy excelled, the high-dimensional visual input (3 cameras) and precise 3D spatial reasoning required for Aloha Insertion proved challenging. While the ACT baseline achieved a 2% success rate (1/50), Diffusion Policy (at 200k steps) demonstrated trajectory learning but failed to finalize the insertion, suggesting a need for longer training or larger batch sizes for this specific domain.---## Model Details- **Architecture**: ResNet18 (Vision Backbone) + U-Net (Diffusion Head)- **Input**: 3 Camera Views (Top, Left, Right)- **Prediction Horizon**: 16 steps- **Observation History**: 2 steps- **Action Steps**: 8 steps- **Image Resolution**: 480x640 (Cropped to 420x560)- **Total Parameters**: ~263 Million---## How to Use This ModelYou can evaluate this model or visualize its performance using `lerobot`.### 1. Installation```bash# Install LeRobotpip install lerobot````### 2\. Evaluate / VisualizeRun the following command in your terminal to evaluate the model for 50 episodes and save the visualization videos:```bashpython -m lerobot.scripts.lerobot_eval \--policy.type diffusion \--policy.pretrained_path Lemon-03/DP_Aloha_Insertion_test \--eval.n_episodes 50 \--eval.batch_size 8 \--env.type aloha \--env.task AlohaInsertion-v0```-----## Training Configuration (Reference)For reproducibility, here are the key parameters used during the training session:- **Batch Size**: 8 (Limited by 8GB VRAM)- **Optimizer**: Adam (lr=1e-4, betas=[0.95, 0.999])- **Scheduler**: Cosine with warmup (500 steps)- **Vision**: ResNet18 with GroupNorm- **Precision**: Mixed Precision (AMP) enabled<!-- end list -->```bash# Original Training Commandpython -m lerobot.scripts.lerobot_train \--config_path diffusion_aloha.yaml \--env.type aloha \--env.task AlohaInsertion-v0 \--dataset.repo_id lerobot/aloha_sim_insertion_human \--wandb.enable true \--job_name DP_Aloha_Insertion \--policy.repo_id Lemon-03/DP_Aloha_Insertion_test```### Config File (`diffusion_aloha.yaml`) Snippet:```yaml# Trainingsteps: 200000eval_freq: 20000save_freq: 20000batch_size: 8# Policypolicy:type: diffusionvision_backbone: resnet18crop_shape: [420, 560]n_action_steps: 8n_obs_steps: 2horizon: 16num_inference_steps: 100``````---12345678910111210 unmodified lines2324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188没问题!这是一个非常严谨的科研做法。引用参考来源(Acknowledgement)并公开完整的配置文件,能极大地增加你论文和项目的**可信度**与**可复现性**。我把你提供的 `diffusion_aloha.yaml` 完整代码放入了一个**可折叠的详情块**中(这样不会占用太长篇幅,保持页面整洁),并在显眼位置添加了**致谢链接**。请直接**全选复制**下面的内容,覆盖 `Lemon-03/DP_Aloha_Insertion_test` 的 `README.md`。### 📋 最终完美版 (含完整 Config 代码与致谢)````markdown---datasets:- lerobot/aloha_sim_insertion_human10 unmodified lines- benchmark---# 🦾 Diffusion Policy for Aloha Insertion (200k Steps)[](https://github.com/huggingface/lerobot)[](https://huggingface.co/datasets/lerobot/aloha_sim_insertion_human)[](https://www.uestc.edu.cn/)[](https://www.apache.org/licenses/LICENSE-2.0)> **Summary:** This model represents a benchmark experiment for **Diffusion Policy** on the challenging **Aloha Insertion** task (Simulated). It was trained using the [LeRobot](https://github.com/huggingface/lerobot) framework to evaluate the algorithm's performance on complex, high-dimensional 3D manipulation tasks compared to baseline methods.- **🧩 Task**: Aloha Insertion (Simulated, 3D)- **🧠 Algorithm**: [Diffusion Policy](https://huggingface.co/papers/2303.04137) (DDPM)- **🔄 Training Steps**: 200,000- **🎓 Author**: Graduate Student, **UESTC** (University of Electronic Science and Technology of China)---## 🔬 Benchmark Results (vs ACT)This experiment highlights the significant difficulty of the Aloha Insertion task for generative policies under limited compute constraints (Batch Size=8). While the ACT baseline achieved a **2%** success rate (1/50), the Diffusion Policy focused on trajectory learning but struggled with the final insertion alignment.### 📊 Evaluation Metrics (50 Episodes)| Metric | Value | Comparison to ACT Baseline | Status || :--- | :---: | :--- | :---: || **Success Rate** | **0.0%** | **Slightly Lower** (ACT: 2.0%) | 📉 || **Avg Max Reward** | **0.10** | **Partial Success** (Grasping achieved) | 🚧 || **Avg Sum Reward** | **8.20** | **Stable Trajectories** | ✅ |> **Note:** The Aloha Insertion task involves high-dimensional inputs (3 cameras) and precise 3D spatial reasoning. The results indicate that under low batch-size constraints (Batch Size=8), ACT's deterministic policy may converge faster than Diffusion Policy, which likely requires longer training or larger batches for this specific domain.---## ⚙️ Model Details| Parameter | Description || :--- | :--- || **Architecture** | ResNet18 (Vision Backbone) + U-Net (Diffusion Head) || **Input** | 3 Camera Views (Top, Left, Right) || **Prediction Horizon** | 16 steps || **Observation History** | 2 steps || **Action Steps** | 8 steps |---## 🔧 Training ConfigurationFor reproducibility, here are the key parameters used during the training session.- **Source**: Configuration adapted from [CSCSX/LeRobotTutorial-CN](https://github.com/CSCSX/LeRobotTutorial-CN).- **Batch Size**: 8 (Limited by 8GB VRAM)- **Optimizer**: AdamW (`lr=1e-4`)- **Scheduler**: Cosine with warmup- **Vision**: ResNet18 with GroupNorm (Cropped to 420x560)<details><summary>📄 <strong>Click to view full <code>diffusion_aloha.yaml</code> used for training</strong></summary>```yaml# @package _global_# 随机种子seed: 100000job_name: Diffusion-Aloha-Insertion# 训练参数steps: 200000 # 原文件写的是 20万步 (Aloha 比较难练)eval_freq: 20000 # 稍微改频一点,方便看进度save_freq: 20000log_freq: 200batch_size: 8 # ⚠️ 关键:Aloha 必须用小 Batch,否则 8G 显存不够# 数据集dataset:repo_id: lerobot/aloha_sim_insertion_human# 评估设置eval:n_episodes: 50batch_size: 8 # 保持与训练一致# 环境设置env:type: alohatask: AlohaInsertion-v0fps: 50# 策略配置policy:type: diffusion# --- 视觉处理 ---vision_backbone: resnet18# Aloha 的图片是矩形的,这里使用特定的裁剪尺寸crop_shape: [420, 560]crop_is_random: truepretrained_backbone_weights: null # 原配置指定不加载预训练权重use_group_norm: truespatial_softmax_num_keypoints: 32# --- Diffusion 核心架构 (U-Net) ---down_dims: [512, 1024, 2048]kernel_size: 5n_groups: 8diffusion_step_embed_dim: 128use_film_scale_modulation: true# --- 动作预测参数 ---n_action_steps: 8n_obs_steps: 2horizon: 16# --- 噪声调度器 (DDPM) ---noise_scheduler_type: DDPMnum_train_timesteps: 100num_inference_steps: 100beta_schedule: squaredcos_cap_v2beta_start: 0.0001beta_end: 0.02prediction_type: epsilonclip_sample: trueclip_sample_range: 1.0# --- 优化器 ---optimizer_lr: 1e-4optimizer_weight_decay: 1e-6#grad_clip_norm: 10scheduler_name: cosinescheduler_warmup_steps: 500use_amp: true```````\</details\>-----## 🚀 Evaluate (My Evaluation Mode)Run the following command in your terminal to evaluate the model for 50 episodes and save the visualization videos:```bashpython -m lerobot.scripts.lerobot_eval \--policy.type diffusion \--policy.pretrained_path Lemon-03/DP_Aloha_Insertion_test \--eval.n_episodes 50 \--eval.batch_size 8 \--env.type aloha \--env.task AlohaInsertion-v0```To evaluate this model locally, run the following command:```bashpython -m lerobot.scripts.lerobot_eval \--policy.type diffusion \--policy.pretrained_path Lemon-03/DP_Aloha_Insertion_test \--eval.n_episodes 50 \--eval.batch_size 8 \--env.type aloha \--env.task AlohaInsertion-v0```
README.md+135-75