the-future-dev commited on
Commit
cbaf2f6
·
verified ·
1 Parent(s): bca6792

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