Robotics
LeRobot
Safetensors
diffusion
robododo commited on
Commit
864cbb0
·
verified ·
1 Parent(s): 3197aa6

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +163 -0
  2. config.json +93 -0
  3. model.safetensors +3 -0
  4. train_config.json +244 -0
README.md ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: robododo/place-yellow-rectangle_20260702_200850
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - robotics
9
+ - diffusion
10
+ - lerobot
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`, `overhead`
42
+
43
+
44
+ ## Inputs & Outputs
45
+
46
+ The policy consumes these observation features and produces these action features.
47
+
48
+ **Inputs**
49
+
50
+ | Feature | Type | Shape |
51
+ | --- | --- | --- |
52
+ | `observation.state` | STATE | `(6,)` |
53
+ | `observation.images.front` | VISUAL | `(3, 480, 640)` |
54
+ | `observation.images.overhead` | VISUAL | `(3, 480, 640)` |
55
+
56
+ **Outputs**
57
+
58
+ | Feature | Type | Shape |
59
+ | --- | --- | --- |
60
+ | `action` | ACTION | `(6,)` |
61
+
62
+
63
+ ## Training Dataset
64
+
65
+ - **Repository:** [robododo/place-yellow-rectangle_20260702_200850](https://huggingface.co/datasets/robododo/place-yellow-rectangle_20260702_200850)
66
+ - **Episodes:** 81
67
+ - **Frames:** 48600
68
+ - **Frame rate:** 30 FPS
69
+ - **Task(s):** "Place Yellow Rectangle in Box"
70
+
71
+ <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=robododo/place-yellow-rectangle_20260702_200850">
72
+ <img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl.svg"/>
73
+ <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl-dark.svg"/>
74
+ </a>
75
+
76
+
77
+ ## Training Configuration
78
+
79
+ | Setting | Value |
80
+ | --- | --- |
81
+ | Training steps | 30000 |
82
+ | Batch size | 8 |
83
+ | Optimizer | adam |
84
+ | Learning rate | 0.0001 |
85
+ | Seed | 1000 |
86
+ | LeRobot version | 0.5.2 |
87
+
88
+ ---
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=robododo/place_yellow_rectangle_diffusion_small_v1 \
110
+ --task="Place Yellow Rectangle in Box" \
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
+
152
+ ## Citation
153
+
154
+ If you use this policy, please cite the method linked in the description above, along with LeRobot:
155
+
156
+ ```bibtex
157
+ @misc{cadene2024lerobot,
158
+ author = {Cadene, Remi and Alibert, Simon and Soare, Alexander and Gallouedec, Quentin and Zouitine, Adil and Palma, Steven and Kooijmans, Pepijn and Aractingi, Michel and Shukor, Mustafa and Aubakirova, Dana and Russi, Martino and Capuano, Francesco and Pascal, Caroline and Choghari, Jade and Moss, Jess and Wolf, Thomas},
159
+ title = {LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch},
160
+ howpublished = "\url{https://github.com/huggingface/lerobot}",
161
+ year = {2024}
162
+ }
163
+ ```
config.json ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 1,
4
+ "input_features": {
5
+ "observation.state": {
6
+ "type": "STATE",
7
+ "shape": [
8
+ 6
9
+ ]
10
+ },
11
+ "observation.images.front": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ },
19
+ "observation.images.overhead": {
20
+ "type": "VISUAL",
21
+ "shape": [
22
+ 3,
23
+ 480,
24
+ 640
25
+ ]
26
+ }
27
+ },
28
+ "output_features": {
29
+ "action": {
30
+ "type": "ACTION",
31
+ "shape": [
32
+ 6
33
+ ]
34
+ }
35
+ },
36
+ "device": "cuda",
37
+ "use_amp": false,
38
+ "use_peft": false,
39
+ "push_to_hub": true,
40
+ "repo_id": "robododo/place_yellow_rectangle_diffusion_small_v1",
41
+ "private": null,
42
+ "tags": null,
43
+ "license": null,
44
+ "pretrained_path": null,
45
+ "pretrained_revision": null,
46
+ "horizon": 16,
47
+ "n_action_steps": 8,
48
+ "normalization_mapping": {
49
+ "VISUAL": "MEAN_STD",
50
+ "STATE": "MIN_MAX",
51
+ "ACTION": "MIN_MAX"
52
+ },
53
+ "drop_n_last_frames": 7,
54
+ "vision_backbone": "resnet18",
55
+ "resize_shape": null,
56
+ "crop_ratio": 1.0,
57
+ "crop_shape": null,
58
+ "crop_is_random": true,
59
+ "pretrained_backbone_weights": "ResNet18_Weights.IMAGENET1K_V1",
60
+ "use_group_norm": false,
61
+ "spatial_softmax_num_keypoints": 32,
62
+ "use_separate_rgb_encoder_per_camera": true,
63
+ "down_dims": [
64
+ 64,
65
+ 128,
66
+ 256
67
+ ],
68
+ "kernel_size": 5,
69
+ "n_groups": 8,
70
+ "diffusion_step_embed_dim": 128,
71
+ "use_film_scale_modulation": true,
72
+ "noise_scheduler_type": "DDIM",
73
+ "num_train_timesteps": 100,
74
+ "beta_schedule": "squaredcos_cap_v2",
75
+ "beta_start": 0.0001,
76
+ "beta_end": 0.02,
77
+ "prediction_type": "epsilon",
78
+ "clip_sample": true,
79
+ "clip_sample_range": 1.0,
80
+ "num_inference_steps": 10,
81
+ "compile_model": false,
82
+ "compile_mode": "reduce-overhead",
83
+ "do_mask_loss_for_padding": false,
84
+ "optimizer_lr": 0.0001,
85
+ "optimizer_betas": [
86
+ 0.95,
87
+ 0.999
88
+ ],
89
+ "optimizer_eps": 1e-08,
90
+ "optimizer_weight_decay": 1e-06,
91
+ "scheduler_name": "cosine",
92
+ "scheduler_warmup_steps": 500
93
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8bb2bb107d22a08a5c83af33d21fa819740d4a845d05b83628ad510cd6d11b2f
3
+ size 109298536
train_config.json ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "robododo/place-yellow-rectangle_20260702_200850",
4
+ "root": null,
5
+ "episodes": null,
6
+ "image_transforms": {
7
+ "enable": false,
8
+ "max_num_transforms": 3,
9
+ "random_order": false,
10
+ "tfs": {
11
+ "brightness": {
12
+ "weight": 1.0,
13
+ "type": "ColorJitter",
14
+ "kwargs": {
15
+ "brightness": [
16
+ 0.8,
17
+ 1.2
18
+ ]
19
+ }
20
+ },
21
+ "contrast": {
22
+ "weight": 1.0,
23
+ "type": "ColorJitter",
24
+ "kwargs": {
25
+ "contrast": [
26
+ 0.8,
27
+ 1.2
28
+ ]
29
+ }
30
+ },
31
+ "saturation": {
32
+ "weight": 1.0,
33
+ "type": "ColorJitter",
34
+ "kwargs": {
35
+ "saturation": [
36
+ 0.5,
37
+ 1.5
38
+ ]
39
+ }
40
+ },
41
+ "hue": {
42
+ "weight": 1.0,
43
+ "type": "ColorJitter",
44
+ "kwargs": {
45
+ "hue": [
46
+ -0.05,
47
+ 0.05
48
+ ]
49
+ }
50
+ },
51
+ "sharpness": {
52
+ "weight": 1.0,
53
+ "type": "SharpnessJitter",
54
+ "kwargs": {
55
+ "sharpness": [
56
+ 0.5,
57
+ 1.5
58
+ ]
59
+ }
60
+ },
61
+ "affine": {
62
+ "weight": 1.0,
63
+ "type": "RandomAffine",
64
+ "kwargs": {
65
+ "degrees": [
66
+ -5.0,
67
+ 5.0
68
+ ],
69
+ "translate": [
70
+ 0.05,
71
+ 0.05
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "revision": null,
78
+ "use_imagenet_stats": true,
79
+ "video_backend": "torchcodec",
80
+ "return_uint8": false,
81
+ "depth_output_unit": "mm",
82
+ "streaming": false,
83
+ "eval_split": 0.0
84
+ },
85
+ "env": null,
86
+ "policy": {
87
+ "type": "diffusion",
88
+ "n_obs_steps": 1,
89
+ "input_features": {
90
+ "observation.state": {
91
+ "type": "STATE",
92
+ "shape": [
93
+ 6
94
+ ]
95
+ },
96
+ "observation.images.front": {
97
+ "type": "VISUAL",
98
+ "shape": [
99
+ 3,
100
+ 480,
101
+ 640
102
+ ]
103
+ },
104
+ "observation.images.overhead": {
105
+ "type": "VISUAL",
106
+ "shape": [
107
+ 3,
108
+ 480,
109
+ 640
110
+ ]
111
+ }
112
+ },
113
+ "output_features": {
114
+ "action": {
115
+ "type": "ACTION",
116
+ "shape": [
117
+ 6
118
+ ]
119
+ }
120
+ },
121
+ "device": "cuda",
122
+ "use_amp": false,
123
+ "use_peft": false,
124
+ "push_to_hub": true,
125
+ "repo_id": "robododo/place_yellow_rectangle_diffusion_small_v1",
126
+ "private": null,
127
+ "tags": null,
128
+ "license": null,
129
+ "pretrained_path": null,
130
+ "pretrained_revision": null,
131
+ "horizon": 16,
132
+ "n_action_steps": 8,
133
+ "normalization_mapping": {
134
+ "VISUAL": "MEAN_STD",
135
+ "STATE": "MIN_MAX",
136
+ "ACTION": "MIN_MAX"
137
+ },
138
+ "drop_n_last_frames": 7,
139
+ "vision_backbone": "resnet18",
140
+ "resize_shape": null,
141
+ "crop_ratio": 1.0,
142
+ "crop_shape": null,
143
+ "crop_is_random": true,
144
+ "pretrained_backbone_weights": "ResNet18_Weights.IMAGENET1K_V1",
145
+ "use_group_norm": false,
146
+ "spatial_softmax_num_keypoints": 32,
147
+ "use_separate_rgb_encoder_per_camera": true,
148
+ "down_dims": [
149
+ 64,
150
+ 128,
151
+ 256
152
+ ],
153
+ "kernel_size": 5,
154
+ "n_groups": 8,
155
+ "diffusion_step_embed_dim": 128,
156
+ "use_film_scale_modulation": true,
157
+ "noise_scheduler_type": "DDIM",
158
+ "num_train_timesteps": 100,
159
+ "beta_schedule": "squaredcos_cap_v2",
160
+ "beta_start": 0.0001,
161
+ "beta_end": 0.02,
162
+ "prediction_type": "epsilon",
163
+ "clip_sample": true,
164
+ "clip_sample_range": 1.0,
165
+ "num_inference_steps": 10,
166
+ "compile_model": false,
167
+ "compile_mode": "reduce-overhead",
168
+ "do_mask_loss_for_padding": false,
169
+ "optimizer_lr": 0.0001,
170
+ "optimizer_betas": [
171
+ 0.95,
172
+ 0.999
173
+ ],
174
+ "optimizer_eps": 1e-08,
175
+ "optimizer_weight_decay": 1e-06,
176
+ "scheduler_name": "cosine",
177
+ "scheduler_warmup_steps": 500
178
+ },
179
+ "reward_model": null,
180
+ "output_dir": "outputs/train/place_yellow_rectangle_diffusion_small_v1",
181
+ "job_name": "place_yellow_rectangle_diffusion_small_v1",
182
+ "resume": false,
183
+ "seed": 1000,
184
+ "cudnn_deterministic": false,
185
+ "num_workers": 4,
186
+ "batch_size": 8,
187
+ "prefetch_factor": 4,
188
+ "persistent_workers": true,
189
+ "steps": 30000,
190
+ "env_eval_freq": 20000,
191
+ "log_freq": 200,
192
+ "eval_steps": 0,
193
+ "max_eval_samples": 0,
194
+ "tolerance_s": 0.0001,
195
+ "save_checkpoint": true,
196
+ "save_freq": 20000,
197
+ "use_policy_training_preset": true,
198
+ "optimizer": {
199
+ "type": "adam",
200
+ "lr": 0.0001,
201
+ "weight_decay": 1e-06,
202
+ "grad_clip_norm": 10.0,
203
+ "betas": [
204
+ 0.95,
205
+ 0.999
206
+ ],
207
+ "eps": 1e-08
208
+ },
209
+ "scheduler": {
210
+ "type": "diffuser",
211
+ "num_warmup_steps": 500,
212
+ "name": "cosine"
213
+ },
214
+ "eval": {
215
+ "n_episodes": 50,
216
+ "batch_size": 16,
217
+ "use_async_envs": true,
218
+ "recording": false,
219
+ "recording_repo_id": null,
220
+ "recording_private": false
221
+ },
222
+ "wandb": {
223
+ "enable": true,
224
+ "disable_artifact": false,
225
+ "project": "lerobot",
226
+ "entity": null,
227
+ "notes": null,
228
+ "run_id": "kp2ujxkd",
229
+ "mode": null,
230
+ "add_tags": true
231
+ },
232
+ "peft": null,
233
+ "job": {
234
+ "target": null,
235
+ "image": "huggingface/lerobot-gpu:latest",
236
+ "timeout": "2d",
237
+ "detach": false,
238
+ "tags": []
239
+ },
240
+ "save_checkpoint_to_hub": false,
241
+ "sample_weighting": null,
242
+ "rename_map": {},
243
+ "checkpoint_path": null
244
+ }