Robotics
LeRobot
Safetensors
diffusion
leledeyuan commited on
Commit
69f3fe5
·
verified ·
1 Parent(s): faa6696

Upload policy weights, train config and readme

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