Robotics
LeRobot
Safetensors
diffusion
the-future-dev commited on
Commit
f1e8378
·
verified ·
1 Parent(s): 5dda3a1

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +98 -0
  3. model.safetensors +3 -0
  4. train_config.json +256 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: the-future-dev/pusht_image_keypoints
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,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 2,
4
+ "input_features": {
5
+ "observation.image": {
6
+ "type": "VISUAL",
7
+ "shape": [
8
+ 3,
9
+ 96,
10
+ 96
11
+ ]
12
+ },
13
+ "observation.state": {
14
+ "type": "STATE",
15
+ "shape": [
16
+ 2
17
+ ]
18
+ },
19
+ "observation.environment_state": {
20
+ "type": "ENV",
21
+ "shape": [
22
+ 16
23
+ ]
24
+ }
25
+ },
26
+ "output_features": {
27
+ "action": {
28
+ "type": "ACTION",
29
+ "shape": [
30
+ 2
31
+ ]
32
+ }
33
+ },
34
+ "device": "cuda",
35
+ "use_amp": false,
36
+ "push_to_hub": true,
37
+ "repo_id": "the-future-dev/pusht_diffusion_dropout",
38
+ "private": null,
39
+ "tags": null,
40
+ "license": null,
41
+ "pretrained_path": null,
42
+ "horizon": 16,
43
+ "n_action_steps": 8,
44
+ "normalization_mapping": {
45
+ "VISUAL": "MEAN_STD",
46
+ "STATE": "MIN_MAX",
47
+ "ENV": "MIN_MAX",
48
+ "ACTION": "MIN_MAX"
49
+ },
50
+ "drop_n_last_frames": 7,
51
+ "vision_backbone": "resnet18",
52
+ "crop_shape": [
53
+ 84,
54
+ 84
55
+ ],
56
+ "crop_is_random": true,
57
+ "pretrained_backbone_weights": null,
58
+ "use_group_norm": true,
59
+ "spatial_softmax_num_keypoints": 32,
60
+ "use_separate_rgb_encoder_per_camera": false,
61
+ "state_encoder": "mlp",
62
+ "state_encoder_out_dim": 64,
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
+ "privileged": "dropout",
92
+ "privileged_dropout_p": 0.6,
93
+ "add_rgb_prediction_head": false,
94
+ "priv_encoder_output_shape": 0,
95
+ "rgb_encoder_checkpoint": null,
96
+ "pretrained_unet_path": null,
97
+ "pretrained_state_encoder_path": null
98
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76e97f55711cfb145b447de50bb637ffd8678adc5c9aadbf7a7907cb1313f7f3
3
+ size 1065583664
train_config.json ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "the-future-dev/pusht_image_keypoints",
4
+ "root": null,
5
+ "episodes": null,
6
+ "image_transforms": {
7
+ "enable": true,
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
+ }
62
+ },
63
+ "revision": null,
64
+ "use_imagenet_stats": true,
65
+ "video_backend": "pyav",
66
+ "streaming": false
67
+ },
68
+ "env": {
69
+ "type": "pusht",
70
+ "task": "PushT-v0",
71
+ "fps": 10,
72
+ "features": {
73
+ "action": {
74
+ "type": "ACTION",
75
+ "shape": [
76
+ 2
77
+ ]
78
+ },
79
+ "agent_pos": {
80
+ "type": "STATE",
81
+ "shape": [
82
+ 2
83
+ ]
84
+ },
85
+ "pixels": {
86
+ "type": "VISUAL",
87
+ "shape": [
88
+ 96,
89
+ 96,
90
+ 3
91
+ ]
92
+ },
93
+ "environment_state": {
94
+ "type": "ENV",
95
+ "shape": [
96
+ 16
97
+ ]
98
+ }
99
+ },
100
+ "features_map": {
101
+ "action": "action",
102
+ "agent_pos": "observation.state",
103
+ "pixels": "observation.image",
104
+ "environment_state": "observation.environment_state"
105
+ },
106
+ "max_parallel_tasks": 1,
107
+ "disable_env_checker": true,
108
+ "episode_length": 300,
109
+ "obs_type": "pixels_agent_pos",
110
+ "render_mode": "rgb_array",
111
+ "visualization_width": 384,
112
+ "visualization_height": 384,
113
+ "observation_height": 96,
114
+ "observation_width": 96
115
+ },
116
+ "policy": {
117
+ "type": "diffusion",
118
+ "n_obs_steps": 2,
119
+ "input_features": {
120
+ "observation.image": {
121
+ "type": "VISUAL",
122
+ "shape": [
123
+ 3,
124
+ 96,
125
+ 96
126
+ ]
127
+ },
128
+ "observation.state": {
129
+ "type": "STATE",
130
+ "shape": [
131
+ 2
132
+ ]
133
+ },
134
+ "observation.environment_state": {
135
+ "type": "ENV",
136
+ "shape": [
137
+ 16
138
+ ]
139
+ }
140
+ },
141
+ "output_features": {
142
+ "action": {
143
+ "type": "ACTION",
144
+ "shape": [
145
+ 2
146
+ ]
147
+ }
148
+ },
149
+ "device": "cuda",
150
+ "use_amp": false,
151
+ "push_to_hub": true,
152
+ "repo_id": "the-future-dev/pusht_diffusion_dropout",
153
+ "private": null,
154
+ "tags": null,
155
+ "license": null,
156
+ "pretrained_path": null,
157
+ "horizon": 16,
158
+ "n_action_steps": 8,
159
+ "normalization_mapping": {
160
+ "VISUAL": "MEAN_STD",
161
+ "STATE": "MIN_MAX",
162
+ "ENV": "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
+ "state_encoder": "mlp",
177
+ "state_encoder_out_dim": 64,
178
+ "down_dims": [
179
+ 512,
180
+ 1024,
181
+ 2048
182
+ ],
183
+ "kernel_size": 5,
184
+ "n_groups": 8,
185
+ "diffusion_step_embed_dim": 128,
186
+ "use_film_scale_modulation": true,
187
+ "noise_scheduler_type": "DDPM",
188
+ "num_train_timesteps": 100,
189
+ "beta_schedule": "squaredcos_cap_v2",
190
+ "beta_start": 0.0001,
191
+ "beta_end": 0.02,
192
+ "prediction_type": "epsilon",
193
+ "clip_sample": true,
194
+ "clip_sample_range": 1.0,
195
+ "num_inference_steps": null,
196
+ "do_mask_loss_for_padding": false,
197
+ "optimizer_lr": 0.0001,
198
+ "optimizer_betas": [
199
+ 0.95,
200
+ 0.999
201
+ ],
202
+ "optimizer_eps": 1e-08,
203
+ "optimizer_weight_decay": 1e-06,
204
+ "scheduler_name": "cosine",
205
+ "scheduler_warmup_steps": 500,
206
+ "privileged": "dropout",
207
+ "privileged_dropout_p": 0.6,
208
+ "add_rgb_prediction_head": false,
209
+ "priv_encoder_output_shape": 0,
210
+ "rgb_encoder_checkpoint": null,
211
+ "pretrained_unet_path": null,
212
+ "pretrained_state_encoder_path": null
213
+ },
214
+ "output_dir": "outputs/train/_pusht_diffusion_dropout",
215
+ "job_name": "_pusht_diffusion_dropout",
216
+ "resume": false,
217
+ "seed": 100000,
218
+ "num_workers": 4,
219
+ "batch_size": 64,
220
+ "steps": 300,
221
+ "eval_freq": 300,
222
+ "log_freq": 200,
223
+ "save_checkpoint": true,
224
+ "save_freq": 300,
225
+ "use_policy_training_preset": true,
226
+ "optimizer": {
227
+ "type": "adam",
228
+ "lr": 0.0001,
229
+ "weight_decay": 1e-06,
230
+ "grad_clip_norm": 10.0,
231
+ "betas": [
232
+ 0.95,
233
+ 0.999
234
+ ],
235
+ "eps": 1e-08
236
+ },
237
+ "scheduler": {
238
+ "type": "diffuser",
239
+ "num_warmup_steps": 500,
240
+ "name": "cosine"
241
+ },
242
+ "eval": {
243
+ "n_episodes": 50,
244
+ "batch_size": 50,
245
+ "use_async_envs": false
246
+ },
247
+ "wandb": {
248
+ "enable": true,
249
+ "disable_artifact": false,
250
+ "project": "lerobot-pusht",
251
+ "entity": null,
252
+ "notes": null,
253
+ "run_id": "5dl4k2c6",
254
+ "mode": null
255
+ }
256
+ }