Robotics
LeRobot
Safetensors
diffusion
so101
lichtphyz commited on
Commit
506b7a5
·
verified ·
1 Parent(s): bf4f4dd

Model card: eval 8/10, training details, run instructions

Browse files
Files changed (1) hide show
  1. README.md +45 -66
README.md CHANGED
@@ -1,5 +1,7 @@
1
  ---
2
- datasets: lichtphyz/so101_block_to_bin_v3
 
 
3
  library_name: lerobot
4
  license: apache-2.0
5
  model_name: diffusion
@@ -8,38 +10,25 @@ tags:
8
  - robotics
9
  - lerobot
10
  - diffusion
 
11
  ---
12
 
13
- # Model Card for diffusion
14
 
15
- <!-- Provide a quick summary of what the model is/does. -->
 
 
16
 
17
-
18
- [Diffusion Policy](https://huggingface.co/papers/2303.04137) treats visuomotor control as a generative diffusion process, producing smooth, multi-step action trajectories that excel at contact-rich manipulation.
19
-
20
-
21
-
22
-
23
- <!-- A short demo is worth more than any description! Record a GIF/video of the policy
24
- running on your robot, upload it to this repo, and embed it here:
25
- <p align="center">
26
- <img src="https://huggingface.co/<hf_user>/<policy_repo_id>/resolve/main/demo.gif" width="60%"/>
27
- </p>
28
- -->
29
-
30
- This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
31
-
32
- See the [full LeRobot documentation](https://huggingface.co/docs/lerobot/index).
33
-
34
-
35
- ---
36
 
37
  ## Model Details
38
 
39
  - **License:** apache-2.0
40
- - **Robot type:** `so_follower`
41
- - **Cameras:** `front`, `wrist`
42
-
43
 
44
  ## Inputs & Outputs
45
 
@@ -74,14 +63,22 @@ The policy consumes these observation features and produces these action feature
74
  </a>
75
 
76
 
 
 
 
 
77
  ## Training Configuration
78
 
79
  | Setting | Value |
80
  | --- | --- |
81
- | Training steps | 60000 |
82
  | Batch size | 32 |
83
- | Optimizer | adam |
84
- | Learning rate | 0.0001 |
 
 
 
 
85
  | Seed | 1000 |
86
  | LeRobot version | 0.6.2 |
87
 
@@ -89,63 +86,45 @@ The policy consumes these observation features and produces these action feature
89
 
90
  ## How to Get Started with the Model
91
 
92
- New to LeRobot? These guides cover the full workflow:
93
-
94
- - **[Install LeRobot](https://huggingface.co/docs/lerobot/main/en/installation)** — set up the `lerobot` package.
95
- - **[Hardware setup](https://huggingface.co/docs/lerobot/main/en/hardware_guide)** — assemble, wire, and calibrate your robot and cameras.
96
- - **[Record data & train a policy](https://huggingface.co/docs/lerobot/en/il_robots)** — the end-to-end imitation-learning walkthrough.
97
- - **[CLI cheat-sheet](https://huggingface.co/docs/lerobot/main/en/cheat-sheet)** — quick reference for the `lerobot-*` commands.
98
-
99
- The short version to run and train this policy:
100
-
101
- ### Run the policy on your robot
102
 
103
  ```bash
104
  lerobot-rollout \
105
  --strategy.type=base \
106
- --robot.type=so_follower \
107
- --robot.port=<your_robot_port> \
108
- --robot.cameras="{ <camera_1>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}, <camera_2>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}}" \
109
  --policy.path=lichtphyz/diffusion_v3_desktop \
 
 
 
 
 
110
  --task="Put the block in the bin." \
111
  --duration=60
112
  ```
113
 
114
- Replace the remaining `<...>` placeholders with your own values: `--robot.port` and the camera names/indices are specific to your machine, and the camera names must match the observation keys this policy was trained on.
115
-
116
- When `--strategy.type=base` is used the script doesn't record the episodes. Skipping duration will make the policy run indefinitely. For more information look at [rollout documentation](https://huggingface.co/docs/lerobot/main/en/inference).
117
-
118
- ### Train your own policy
119
-
120
- ```bash
121
- lerobot-train \
122
- --dataset.repo_id=${HF_USER}/<dataset> \
123
- --policy.type=diffusion \
124
- --output_dir=outputs/train/<policy_repo_id> \
125
- --job_name=lerobot_training \
126
- --policy.device=cuda \
127
- --policy.repo_id=${HF_USER}/<policy_repo_id> \
128
- --wandb.enable=true
129
- ```
130
-
131
- _Writes checkpoints to `outputs/train/<policy_repo_id>/checkpoints/`._
132
 
133
  ---
134
 
135
  ## Evaluation
136
 
137
- <!-- Report real-robot results here: run the policy several times per task and count the
138
- successes. Delete the "No evaluation results" line and fill in this table instead:
139
 
140
  | Task | Trials | Successes | Success rate |
141
  | ---- | ------ | --------- | ------------ |
142
- | pick the lego brick | 10 | 8 | 80% |
143
 
144
- Also worth noting: anything that affects difficulty (new object positions, lighting,
145
- distractors, a different robot of the same type, ...).
146
- -->
 
147
 
148
- _No evaluation results have been provided for this policy yet._
 
 
 
149
 
150
  ---
151
 
 
1
  ---
2
+ datasets:
3
+ - lichtphyz/so101_block_to_bin_v3
4
+ - lichtphyz/rollout_diffusion_v3_desktop
5
  library_name: lerobot
6
  license: apache-2.0
7
  model_name: diffusion
 
10
  - robotics
11
  - lerobot
12
  - diffusion
13
+ - so101
14
  ---
15
 
16
+ # Diffusion Policy: SO-101 block to bin
17
 
18
+ A [Diffusion Policy](https://huggingface.co/papers/2303.04137) for a single **SO-101** arm that picks up a wooden block
19
+ and drops it into a bin, using a front (workspace) camera and a wrist camera. Trained with
20
+ [LeRobot](https://github.com/huggingface/lerobot) on 125 teleoperated episodes.
21
 
22
+ **Real-robot result: 8/10 successes** (DDIM, 5 denoising steps); see [Evaluation](#evaluation).
23
+ All 10 evaluation episodes, including camera video, are public:
24
+ [lichtphyz/rollout_diffusion_v3_desktop](https://huggingface.co/spaces/lerobot/visualize_dataset?path=lichtphyz/rollout_diffusion_v3_desktop).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
  ## Model Details
27
 
28
  - **License:** apache-2.0
29
+ - **Robot:** SO-101 follower (`so_follower`), 6 joints (5 + gripper), STS3215 12V servos
30
+ - **Cameras:** `front` (fixed workspace view) and `wrist`, both 640×480 @ 30 fps
31
+ - **Task string:** "Put the block in the bin."
32
 
33
  ## Inputs & Outputs
34
 
 
63
  </a>
64
 
65
 
66
+ The 125 training episodes are 100 block-to-bin demonstrations (the block grid-aligned, two block lengths,
67
+ hover-then-descend approach), 15 "idle" episodes (empty table or block already in the bin: the arm stays at rest), and
68
+ 10 recovery episodes (missed grasp → regrasp → bin).
69
+
70
  ## Training Configuration
71
 
72
  | Setting | Value |
73
  | --- | --- |
74
+ | Training steps | 60,000 (≈11 h 20 min on one RTX 4080) |
75
  | Batch size | 32 |
76
+ | Optimizer / LR | Adam, 1e-4, cosine schedule |
77
+ | Vision backbone | ResNet-18 (ImageNet weights, BatchNorm) |
78
+ | Image size | resized to 320×240, random crop 304×228 (crop ratio 0.95) |
79
+ | Observation steps / horizon / action steps | 2 / 64 / 32 |
80
+ | Training noise schedule | DDPM, 100 timesteps |
81
+ | Image augmentation | brightness, contrast, saturation, hue, sharpness, small affine |
82
  | Seed | 1000 |
83
  | LeRobot version | 0.6.2 |
84
 
 
86
 
87
  ## How to Get Started with the Model
88
 
89
+ Run it on an SO-101 with the settings used in the evaluation (DDIM with 5 denoising steps makes action planning fast
90
+ enough to avoid visible pauses):
 
 
 
 
 
 
 
 
91
 
92
  ```bash
93
  lerobot-rollout \
94
  --strategy.type=base \
 
 
 
95
  --policy.path=lichtphyz/diffusion_v3_desktop \
96
+ --policy.noise_scheduler_type=DDIM \
97
+ --policy.num_inference_steps=5 \
98
+ --robot.type=so101_follower \
99
+ --robot.port=<your_robot_port> \
100
+ --robot.cameras="{ front: {type: opencv, index_or_path: <path>, width: 640, height: 480, fps: 30, fourcc: MJPG}, wrist: {type: opencv, index_or_path: <path>, width: 640, height: 480, fps: 30, fourcc: MJPG}}" \
101
  --task="Put the block in the bin." \
102
  --duration=60
103
  ```
104
 
105
+ The camera names must be `front` and `wrist`. The policy will only work with a camera placement and workspace close to
106
+ the training data; see the dataset visualizer links above.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
 
108
  ---
109
 
110
  ## Evaluation
111
 
112
+ Real-robot evaluation with `lerobot-rollout --strategy.type=episodic`: 10 episodes of up to 30 s each, the block reset
113
+ by hand between episodes, inference with DDIM and 5 denoising steps.
114
 
115
  | Task | Trials | Successes | Success rate |
116
  | ---- | ------ | --------- | ------------ |
117
+ | Put the block in the bin | 10 | 8 | 80% |
118
 
119
+ - One of the two failures was a partial recovery: after a missed grasp the policy regrasped the block, but hit the
120
+ edge of the bin and dropped it.
121
+ - All 10 episodes (both camera streams, joint states and actions) are in
122
+ [lichtphyz/rollout_diffusion_v3_desktop](https://huggingface.co/datasets/lichtphyz/rollout_diffusion_v3_desktop).
123
 
124
+ <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=lichtphyz/rollout_diffusion_v3_desktop">
125
+ <img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl.svg"/>
126
+ <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl-dark.svg"/>
127
+ </a>
128
 
129
  ---
130