Robotics
LeRobot
Safetensors
diffusion
pc011235 commited on
Commit
28e6f18
·
verified ·
1 Parent(s): e9f4c44

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +91 -0
  3. model.safetensors +3 -0
  4. train_config.json +326 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: pc011235/so101_lego_cup_v2_100
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - lerobot
9
+ - diffusion
10
+ - robotics
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
+ This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
22
+ See the full documentation at [LeRobot Docs](https://huggingface.co/docs/lerobot/index).
23
+
24
+ ---
25
+
26
+ ## How to Get Started with the Model
27
+
28
+ For a complete walkthrough, see the [training guide](https://huggingface.co/docs/lerobot/il_robots#train-a-policy).
29
+ Below is the short version on how to train and run inference/eval:
30
+
31
+ ### Train from scratch
32
+
33
+ ```bash
34
+ lerobot-train \
35
+ --dataset.repo_id=${HF_USER}/<dataset> \
36
+ --policy.type=act \
37
+ --output_dir=outputs/train/<desired_policy_repo_id> \
38
+ --job_name=lerobot_training \
39
+ --policy.device=cuda \
40
+ --policy.repo_id=${HF_USER}/<desired_policy_repo_id>
41
+ --wandb.enable=true
42
+ ```
43
+
44
+ _Writes checkpoints to `outputs/train/<desired_policy_repo_id>/checkpoints/`._
45
+
46
+ ### Evaluate the policy/run inference
47
+
48
+ ```bash
49
+ lerobot-record \
50
+ --robot.type=so100_follower \
51
+ --dataset.repo_id=<hf_user>/eval_<dataset> \
52
+ --policy.path=<hf_user>/<desired_policy_repo_id> \
53
+ --episodes=10
54
+ ```
55
+
56
+ Prefix the dataset repo with **eval\_** and supply `--policy.path` pointing to a local or hub checkpoint.
57
+
58
+ ---
59
+
60
+ ## Model Details
61
+
62
+ - **License:** apache-2.0
config.json ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 2,
4
+ "input_features": {
5
+ "observation.state": {
6
+ "type": "STATE",
7
+ "shape": [
8
+ 6
9
+ ]
10
+ },
11
+ "observation.images.wrist": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ },
19
+ "observation.images.top": {
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": true,
38
+ "use_peft": false,
39
+ "push_to_hub": true,
40
+ "repo_id": "pc011235/diff_v2_first100",
41
+ "private": null,
42
+ "tags": null,
43
+ "license": null,
44
+ "pretrained_path": null,
45
+ "horizon": 16,
46
+ "n_action_steps": 8,
47
+ "normalization_mapping": {
48
+ "VISUAL": "MEAN_STD",
49
+ "STATE": "MIN_MAX",
50
+ "ACTION": "MIN_MAX"
51
+ },
52
+ "drop_n_last_frames": 7,
53
+ "vision_backbone": "resnet18",
54
+ "crop_shape": [
55
+ 84,
56
+ 84
57
+ ],
58
+ "crop_is_random": true,
59
+ "pretrained_backbone_weights": null,
60
+ "use_group_norm": true,
61
+ "spatial_softmax_num_keypoints": 32,
62
+ "use_separate_rgb_encoder_per_camera": false,
63
+ "down_dims": [
64
+ 512,
65
+ 1024,
66
+ 2048
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": "DDPM",
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": null,
81
+ "do_mask_loss_for_padding": false,
82
+ "optimizer_lr": 0.0001,
83
+ "optimizer_betas": [
84
+ 0.95,
85
+ 0.999
86
+ ],
87
+ "optimizer_eps": 1e-08,
88
+ "optimizer_weight_decay": 1e-06,
89
+ "scheduler_name": "cosine",
90
+ "scheduler_warmup_steps": 500
91
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:710d9bb511e9d50072d4358871d3ab10cfdbbd6feca62ea67ebef8c1a6066346
3
+ size 1066516384
train_config.json ADDED
@@ -0,0 +1,326 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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,
77
+ 71,
78
+ 72,
79
+ 73,
80
+ 74,
81
+ 75,
82
+ 76,
83
+ 77,
84
+ 78,
85
+ 79,
86
+ 80,
87
+ 81,
88
+ 82,
89
+ 83,
90
+ 84,
91
+ 85,
92
+ 86,
93
+ 87,
94
+ 88,
95
+ 89,
96
+ 90,
97
+ 91,
98
+ 92,
99
+ 93,
100
+ 94,
101
+ 95,
102
+ 96,
103
+ 97,
104
+ 98,
105
+ 99
106
+ ],
107
+ "image_transforms": {
108
+ "enable": false,
109
+ "max_num_transforms": 3,
110
+ "random_order": false,
111
+ "tfs": {
112
+ "brightness": {
113
+ "weight": 1.0,
114
+ "type": "ColorJitter",
115
+ "kwargs": {
116
+ "brightness": [
117
+ 0.8,
118
+ 1.2
119
+ ]
120
+ }
121
+ },
122
+ "contrast": {
123
+ "weight": 1.0,
124
+ "type": "ColorJitter",
125
+ "kwargs": {
126
+ "contrast": [
127
+ 0.8,
128
+ 1.2
129
+ ]
130
+ }
131
+ },
132
+ "saturation": {
133
+ "weight": 1.0,
134
+ "type": "ColorJitter",
135
+ "kwargs": {
136
+ "saturation": [
137
+ 0.5,
138
+ 1.5
139
+ ]
140
+ }
141
+ },
142
+ "hue": {
143
+ "weight": 1.0,
144
+ "type": "ColorJitter",
145
+ "kwargs": {
146
+ "hue": [
147
+ -0.05,
148
+ 0.05
149
+ ]
150
+ }
151
+ },
152
+ "sharpness": {
153
+ "weight": 1.0,
154
+ "type": "SharpnessJitter",
155
+ "kwargs": {
156
+ "sharpness": [
157
+ 0.5,
158
+ 1.5
159
+ ]
160
+ }
161
+ },
162
+ "affine": {
163
+ "weight": 1.0,
164
+ "type": "RandomAffine",
165
+ "kwargs": {
166
+ "degrees": [
167
+ -5.0,
168
+ 5.0
169
+ ],
170
+ "translate": [
171
+ 0.05,
172
+ 0.05
173
+ ]
174
+ }
175
+ }
176
+ }
177
+ },
178
+ "revision": "main",
179
+ "use_imagenet_stats": true,
180
+ "video_backend": "pyav",
181
+ "streaming": false
182
+ },
183
+ "env": null,
184
+ "policy": {
185
+ "type": "diffusion",
186
+ "n_obs_steps": 2,
187
+ "input_features": {
188
+ "observation.state": {
189
+ "type": "STATE",
190
+ "shape": [
191
+ 6
192
+ ]
193
+ },
194
+ "observation.images.wrist": {
195
+ "type": "VISUAL",
196
+ "shape": [
197
+ 3,
198
+ 480,
199
+ 640
200
+ ]
201
+ },
202
+ "observation.images.top": {
203
+ "type": "VISUAL",
204
+ "shape": [
205
+ 3,
206
+ 480,
207
+ 640
208
+ ]
209
+ }
210
+ },
211
+ "output_features": {
212
+ "action": {
213
+ "type": "ACTION",
214
+ "shape": [
215
+ 6
216
+ ]
217
+ }
218
+ },
219
+ "device": "cuda",
220
+ "use_amp": true,
221
+ "use_peft": false,
222
+ "push_to_hub": true,
223
+ "repo_id": "pc011235/diff_v2_first100",
224
+ "private": null,
225
+ "tags": null,
226
+ "license": null,
227
+ "pretrained_path": null,
228
+ "horizon": 16,
229
+ "n_action_steps": 8,
230
+ "normalization_mapping": {
231
+ "VISUAL": "MEAN_STD",
232
+ "STATE": "MIN_MAX",
233
+ "ACTION": "MIN_MAX"
234
+ },
235
+ "drop_n_last_frames": 7,
236
+ "vision_backbone": "resnet18",
237
+ "crop_shape": [
238
+ 84,
239
+ 84
240
+ ],
241
+ "crop_is_random": true,
242
+ "pretrained_backbone_weights": null,
243
+ "use_group_norm": true,
244
+ "spatial_softmax_num_keypoints": 32,
245
+ "use_separate_rgb_encoder_per_camera": false,
246
+ "down_dims": [
247
+ 512,
248
+ 1024,
249
+ 2048
250
+ ],
251
+ "kernel_size": 5,
252
+ "n_groups": 8,
253
+ "diffusion_step_embed_dim": 128,
254
+ "use_film_scale_modulation": true,
255
+ "noise_scheduler_type": "DDPM",
256
+ "num_train_timesteps": 100,
257
+ "beta_schedule": "squaredcos_cap_v2",
258
+ "beta_start": 0.0001,
259
+ "beta_end": 0.02,
260
+ "prediction_type": "epsilon",
261
+ "clip_sample": true,
262
+ "clip_sample_range": 1.0,
263
+ "num_inference_steps": null,
264
+ "do_mask_loss_for_padding": false,
265
+ "optimizer_lr": 0.0001,
266
+ "optimizer_betas": [
267
+ 0.95,
268
+ 0.999
269
+ ],
270
+ "optimizer_eps": 1e-08,
271
+ "optimizer_weight_decay": 1e-06,
272
+ "scheduler_name": "cosine",
273
+ "scheduler_warmup_steps": 500
274
+ },
275
+ "output_dir": "outputs/train/diff_first100",
276
+ "job_name": "diff_first100",
277
+ "resume": false,
278
+ "seed": 1000,
279
+ "num_workers": 8,
280
+ "batch_size": 32,
281
+ "steps": 60000,
282
+ "eval_freq": 20000,
283
+ "log_freq": 200,
284
+ "tolerance_s": 0.0001,
285
+ "save_checkpoint": true,
286
+ "save_freq": 10000,
287
+ "use_policy_training_preset": true,
288
+ "optimizer": {
289
+ "type": "adam",
290
+ "lr": 0.0001,
291
+ "weight_decay": 1e-06,
292
+ "grad_clip_norm": 10.0,
293
+ "betas": [
294
+ 0.95,
295
+ 0.999
296
+ ],
297
+ "eps": 1e-08
298
+ },
299
+ "scheduler": {
300
+ "type": "diffuser",
301
+ "num_warmup_steps": 500,
302
+ "name": "cosine"
303
+ },
304
+ "eval": {
305
+ "n_episodes": 50,
306
+ "batch_size": 50,
307
+ "use_async_envs": false
308
+ },
309
+ "wandb": {
310
+ "enable": false,
311
+ "disable_artifact": false,
312
+ "project": "lerobot",
313
+ "entity": null,
314
+ "notes": null,
315
+ "run_id": null,
316
+ "mode": null
317
+ },
318
+ "peft": null,
319
+ "use_rabc": false,
320
+ "rabc_progress_path": null,
321
+ "rabc_kappa": 0.01,
322
+ "rabc_epsilon": 1e-06,
323
+ "rabc_head_mode": "sparse",
324
+ "rename_map": {},
325
+ "checkpoint_path": null
326
+ }