Robotics
LeRobot
Safetensors
diffusion
pc011235 commited on
Commit
a795a9e
·
verified ·
1 Parent(s): 4c1f63c

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 +276 -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
+ - robotics
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
+ 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_first50",
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:cfe0f0a66fe905c596505ea42b2e42d940e2b0f20825691e8025ebddd317c8cc
3
+ size 1066516384
train_config.json ADDED
@@ -0,0 +1,276 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "pc011235/so101_lego_cup_v2_100",
4
+ "root": null,
5
+ "episodes": [
6
+ 0,
7
+ 1,
8
+ 2,
9
+ 3,
10
+ 4,
11
+ 5,
12
+ 6,
13
+ 7,
14
+ 8,
15
+ 9,
16
+ 10,
17
+ 11,
18
+ 12,
19
+ 13,
20
+ 14,
21
+ 15,
22
+ 16,
23
+ 17,
24
+ 18,
25
+ 19,
26
+ 20,
27
+ 21,
28
+ 22,
29
+ 23,
30
+ 24,
31
+ 25,
32
+ 26,
33
+ 27,
34
+ 28,
35
+ 29,
36
+ 30,
37
+ 31,
38
+ 32,
39
+ 33,
40
+ 34,
41
+ 35,
42
+ 36,
43
+ 37,
44
+ 38,
45
+ 39,
46
+ 40,
47
+ 41,
48
+ 42,
49
+ 43,
50
+ 44,
51
+ 45,
52
+ 46,
53
+ 47,
54
+ 48,
55
+ 49
56
+ ],
57
+ "image_transforms": {
58
+ "enable": false,
59
+ "max_num_transforms": 3,
60
+ "random_order": false,
61
+ "tfs": {
62
+ "brightness": {
63
+ "weight": 1.0,
64
+ "type": "ColorJitter",
65
+ "kwargs": {
66
+ "brightness": [
67
+ 0.8,
68
+ 1.2
69
+ ]
70
+ }
71
+ },
72
+ "contrast": {
73
+ "weight": 1.0,
74
+ "type": "ColorJitter",
75
+ "kwargs": {
76
+ "contrast": [
77
+ 0.8,
78
+ 1.2
79
+ ]
80
+ }
81
+ },
82
+ "saturation": {
83
+ "weight": 1.0,
84
+ "type": "ColorJitter",
85
+ "kwargs": {
86
+ "saturation": [
87
+ 0.5,
88
+ 1.5
89
+ ]
90
+ }
91
+ },
92
+ "hue": {
93
+ "weight": 1.0,
94
+ "type": "ColorJitter",
95
+ "kwargs": {
96
+ "hue": [
97
+ -0.05,
98
+ 0.05
99
+ ]
100
+ }
101
+ },
102
+ "sharpness": {
103
+ "weight": 1.0,
104
+ "type": "SharpnessJitter",
105
+ "kwargs": {
106
+ "sharpness": [
107
+ 0.5,
108
+ 1.5
109
+ ]
110
+ }
111
+ },
112
+ "affine": {
113
+ "weight": 1.0,
114
+ "type": "RandomAffine",
115
+ "kwargs": {
116
+ "degrees": [
117
+ -5.0,
118
+ 5.0
119
+ ],
120
+ "translate": [
121
+ 0.05,
122
+ 0.05
123
+ ]
124
+ }
125
+ }
126
+ }
127
+ },
128
+ "revision": "main",
129
+ "use_imagenet_stats": true,
130
+ "video_backend": "pyav",
131
+ "streaming": false
132
+ },
133
+ "env": null,
134
+ "policy": {
135
+ "type": "diffusion",
136
+ "n_obs_steps": 2,
137
+ "input_features": {
138
+ "observation.state": {
139
+ "type": "STATE",
140
+ "shape": [
141
+ 6
142
+ ]
143
+ },
144
+ "observation.images.wrist": {
145
+ "type": "VISUAL",
146
+ "shape": [
147
+ 3,
148
+ 480,
149
+ 640
150
+ ]
151
+ },
152
+ "observation.images.top": {
153
+ "type": "VISUAL",
154
+ "shape": [
155
+ 3,
156
+ 480,
157
+ 640
158
+ ]
159
+ }
160
+ },
161
+ "output_features": {
162
+ "action": {
163
+ "type": "ACTION",
164
+ "shape": [
165
+ 6
166
+ ]
167
+ }
168
+ },
169
+ "device": "cuda",
170
+ "use_amp": true,
171
+ "use_peft": false,
172
+ "push_to_hub": true,
173
+ "repo_id": "pc011235/diff_v2_first50",
174
+ "private": null,
175
+ "tags": null,
176
+ "license": null,
177
+ "pretrained_path": null,
178
+ "horizon": 16,
179
+ "n_action_steps": 8,
180
+ "normalization_mapping": {
181
+ "VISUAL": "MEAN_STD",
182
+ "STATE": "MIN_MAX",
183
+ "ACTION": "MIN_MAX"
184
+ },
185
+ "drop_n_last_frames": 7,
186
+ "vision_backbone": "resnet18",
187
+ "crop_shape": [
188
+ 84,
189
+ 84
190
+ ],
191
+ "crop_is_random": true,
192
+ "pretrained_backbone_weights": null,
193
+ "use_group_norm": true,
194
+ "spatial_softmax_num_keypoints": 32,
195
+ "use_separate_rgb_encoder_per_camera": false,
196
+ "down_dims": [
197
+ 512,
198
+ 1024,
199
+ 2048
200
+ ],
201
+ "kernel_size": 5,
202
+ "n_groups": 8,
203
+ "diffusion_step_embed_dim": 128,
204
+ "use_film_scale_modulation": true,
205
+ "noise_scheduler_type": "DDPM",
206
+ "num_train_timesteps": 100,
207
+ "beta_schedule": "squaredcos_cap_v2",
208
+ "beta_start": 0.0001,
209
+ "beta_end": 0.02,
210
+ "prediction_type": "epsilon",
211
+ "clip_sample": true,
212
+ "clip_sample_range": 1.0,
213
+ "num_inference_steps": null,
214
+ "do_mask_loss_for_padding": false,
215
+ "optimizer_lr": 0.0001,
216
+ "optimizer_betas": [
217
+ 0.95,
218
+ 0.999
219
+ ],
220
+ "optimizer_eps": 1e-08,
221
+ "optimizer_weight_decay": 1e-06,
222
+ "scheduler_name": "cosine",
223
+ "scheduler_warmup_steps": 500
224
+ },
225
+ "output_dir": "outputs/train/diff_first50",
226
+ "job_name": "diff_first50",
227
+ "resume": false,
228
+ "seed": 1000,
229
+ "num_workers": 8,
230
+ "batch_size": 32,
231
+ "steps": 60000,
232
+ "eval_freq": 20000,
233
+ "log_freq": 200,
234
+ "tolerance_s": 0.0001,
235
+ "save_checkpoint": true,
236
+ "save_freq": 10000,
237
+ "use_policy_training_preset": true,
238
+ "optimizer": {
239
+ "type": "adam",
240
+ "lr": 0.0001,
241
+ "weight_decay": 1e-06,
242
+ "grad_clip_norm": 10.0,
243
+ "betas": [
244
+ 0.95,
245
+ 0.999
246
+ ],
247
+ "eps": 1e-08
248
+ },
249
+ "scheduler": {
250
+ "type": "diffuser",
251
+ "num_warmup_steps": 500,
252
+ "name": "cosine"
253
+ },
254
+ "eval": {
255
+ "n_episodes": 50,
256
+ "batch_size": 50,
257
+ "use_async_envs": false
258
+ },
259
+ "wandb": {
260
+ "enable": false,
261
+ "disable_artifact": false,
262
+ "project": "lerobot",
263
+ "entity": null,
264
+ "notes": null,
265
+ "run_id": null,
266
+ "mode": null
267
+ },
268
+ "peft": null,
269
+ "use_rabc": false,
270
+ "rabc_progress_path": null,
271
+ "rabc_kappa": 0.01,
272
+ "rabc_epsilon": 1e-06,
273
+ "rabc_head_mode": "sparse",
274
+ "rename_map": {},
275
+ "checkpoint_path": null
276
+ }