Robotics
LeRobot
Safetensors
diffusion
pc011235 commited on
Commit
8af04a3
·
verified ·
1 Parent(s): 68d6b91

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