a1o commited on
Commit
8e94ec9
·
verified ·
1 Parent(s): 08ac624

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +125 -0
  3. model.safetensors +3 -0
  4. train_config.json +235 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: a1o/tac_insert
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - robotics
9
+ - diffusion
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
+ python -m lerobot.scripts.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
+ python -m 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,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 2,
4
+ "normalization_mapping": {
5
+ "VISUAL": "MEAN_STD",
6
+ "STATE": "MIN_MAX",
7
+ "ACTION": "MIN_MAX"
8
+ },
9
+ "input_features": {
10
+ "observation.state": {
11
+ "type": "STATE",
12
+ "shape": [
13
+ 14
14
+ ]
15
+ },
16
+ "observation.effort": {
17
+ "type": "STATE",
18
+ "shape": [
19
+ 14
20
+ ]
21
+ },
22
+ "observation.qvel": {
23
+ "type": "STATE",
24
+ "shape": [
25
+ 14
26
+ ]
27
+ },
28
+ "observation.images.cam_high": {
29
+ "type": "VISUAL",
30
+ "shape": [
31
+ 3,
32
+ 480,
33
+ 640
34
+ ]
35
+ },
36
+ "observation.images.cam_left_wrist": {
37
+ "type": "VISUAL",
38
+ "shape": [
39
+ 3,
40
+ 480,
41
+ 640
42
+ ]
43
+ },
44
+ "observation.images.cam_right_wrist": {
45
+ "type": "VISUAL",
46
+ "shape": [
47
+ 3,
48
+ 480,
49
+ 640
50
+ ]
51
+ },
52
+ "observation.tactile1": {
53
+ "type": "VISUAL",
54
+ "shape": [
55
+ 3,
56
+ 480,
57
+ 640
58
+ ]
59
+ },
60
+ "observation.tactile2": {
61
+ "type": "VISUAL",
62
+ "shape": [
63
+ 3,
64
+ 480,
65
+ 640
66
+ ]
67
+ }
68
+ },
69
+ "output_features": {
70
+ "action": {
71
+ "type": "ACTION",
72
+ "shape": [
73
+ 14
74
+ ]
75
+ }
76
+ },
77
+ "device": "cuda",
78
+ "use_amp": false,
79
+ "push_to_hub": true,
80
+ "repo_id": "a1o/diff_pick_tac_insert_policy",
81
+ "private": null,
82
+ "tags": null,
83
+ "license": null,
84
+ "horizon": 16,
85
+ "n_action_steps": 8,
86
+ "drop_n_last_frames": 7,
87
+ "vision_backbone": "resnet18",
88
+ "crop_shape": [
89
+ 84,
90
+ 84
91
+ ],
92
+ "crop_is_random": true,
93
+ "pretrained_backbone_weights": null,
94
+ "use_group_norm": true,
95
+ "spatial_softmax_num_keypoints": 32,
96
+ "use_separate_rgb_encoder_per_camera": false,
97
+ "down_dims": [
98
+ 512,
99
+ 1024,
100
+ 2048
101
+ ],
102
+ "kernel_size": 5,
103
+ "n_groups": 8,
104
+ "diffusion_step_embed_dim": 128,
105
+ "use_film_scale_modulation": true,
106
+ "noise_scheduler_type": "DDPM",
107
+ "num_train_timesteps": 100,
108
+ "beta_schedule": "squaredcos_cap_v2",
109
+ "beta_start": 0.0001,
110
+ "beta_end": 0.02,
111
+ "prediction_type": "epsilon",
112
+ "clip_sample": true,
113
+ "clip_sample_range": 1.0,
114
+ "num_inference_steps": null,
115
+ "do_mask_loss_for_padding": false,
116
+ "optimizer_lr": 0.0001,
117
+ "optimizer_betas": [
118
+ 0.95,
119
+ 0.999
120
+ ],
121
+ "optimizer_eps": 1e-08,
122
+ "optimizer_weight_decay": 1e-06,
123
+ "scheduler_name": "cosine",
124
+ "scheduler_warmup_steps": 500
125
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea4fc2777535b0e84495423f4c42c46a20e9806b03fc323ceabdf355c0269a69
3
+ size 1112509416
train_config.json ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "a1o/tac_insert",
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": "torchcodec"
66
+ },
67
+ "env": null,
68
+ "policy": {
69
+ "type": "diffusion",
70
+ "n_obs_steps": 2,
71
+ "normalization_mapping": {
72
+ "VISUAL": "MEAN_STD",
73
+ "STATE": "MIN_MAX",
74
+ "ACTION": "MIN_MAX"
75
+ },
76
+ "input_features": {
77
+ "observation.state": {
78
+ "type": "STATE",
79
+ "shape": [
80
+ 14
81
+ ]
82
+ },
83
+ "observation.effort": {
84
+ "type": "STATE",
85
+ "shape": [
86
+ 14
87
+ ]
88
+ },
89
+ "observation.qvel": {
90
+ "type": "STATE",
91
+ "shape": [
92
+ 14
93
+ ]
94
+ },
95
+ "observation.images.cam_high": {
96
+ "type": "VISUAL",
97
+ "shape": [
98
+ 3,
99
+ 480,
100
+ 640
101
+ ]
102
+ },
103
+ "observation.images.cam_left_wrist": {
104
+ "type": "VISUAL",
105
+ "shape": [
106
+ 3,
107
+ 480,
108
+ 640
109
+ ]
110
+ },
111
+ "observation.images.cam_right_wrist": {
112
+ "type": "VISUAL",
113
+ "shape": [
114
+ 3,
115
+ 480,
116
+ 640
117
+ ]
118
+ },
119
+ "observation.tactile1": {
120
+ "type": "VISUAL",
121
+ "shape": [
122
+ 3,
123
+ 480,
124
+ 640
125
+ ]
126
+ },
127
+ "observation.tactile2": {
128
+ "type": "VISUAL",
129
+ "shape": [
130
+ 3,
131
+ 480,
132
+ 640
133
+ ]
134
+ }
135
+ },
136
+ "output_features": {
137
+ "action": {
138
+ "type": "ACTION",
139
+ "shape": [
140
+ 14
141
+ ]
142
+ }
143
+ },
144
+ "device": "cuda",
145
+ "use_amp": false,
146
+ "push_to_hub": true,
147
+ "repo_id": "a1o/diff_pick_tac_insert_policy",
148
+ "private": null,
149
+ "tags": null,
150
+ "license": null,
151
+ "horizon": 16,
152
+ "n_action_steps": 8,
153
+ "drop_n_last_frames": 7,
154
+ "vision_backbone": "resnet18",
155
+ "crop_shape": [
156
+ 84,
157
+ 84
158
+ ],
159
+ "crop_is_random": true,
160
+ "pretrained_backbone_weights": null,
161
+ "use_group_norm": true,
162
+ "spatial_softmax_num_keypoints": 32,
163
+ "use_separate_rgb_encoder_per_camera": false,
164
+ "down_dims": [
165
+ 512,
166
+ 1024,
167
+ 2048
168
+ ],
169
+ "kernel_size": 5,
170
+ "n_groups": 8,
171
+ "diffusion_step_embed_dim": 128,
172
+ "use_film_scale_modulation": true,
173
+ "noise_scheduler_type": "DDPM",
174
+ "num_train_timesteps": 100,
175
+ "beta_schedule": "squaredcos_cap_v2",
176
+ "beta_start": 0.0001,
177
+ "beta_end": 0.02,
178
+ "prediction_type": "epsilon",
179
+ "clip_sample": true,
180
+ "clip_sample_range": 1.0,
181
+ "num_inference_steps": null,
182
+ "do_mask_loss_for_padding": false,
183
+ "optimizer_lr": 0.0001,
184
+ "optimizer_betas": [
185
+ 0.95,
186
+ 0.999
187
+ ],
188
+ "optimizer_eps": 1e-08,
189
+ "optimizer_weight_decay": 1e-06,
190
+ "scheduler_name": "cosine",
191
+ "scheduler_warmup_steps": 500
192
+ },
193
+ "output_dir": "outputs/train/diff_tac_insert",
194
+ "job_name": "diff_piper_tac_insert",
195
+ "resume": true,
196
+ "seed": 1000,
197
+ "num_workers": 4,
198
+ "batch_size": 8,
199
+ "steps": 100000,
200
+ "eval_freq": 20000,
201
+ "log_freq": 200,
202
+ "save_checkpoint": true,
203
+ "save_freq": 20000,
204
+ "use_policy_training_preset": true,
205
+ "optimizer": {
206
+ "type": "adam",
207
+ "lr": 0.0001,
208
+ "weight_decay": 1e-06,
209
+ "grad_clip_norm": 10.0,
210
+ "betas": [
211
+ 0.95,
212
+ 0.999
213
+ ],
214
+ "eps": 1e-08
215
+ },
216
+ "scheduler": {
217
+ "type": "diffuser",
218
+ "num_warmup_steps": 500,
219
+ "name": "cosine"
220
+ },
221
+ "eval": {
222
+ "n_episodes": 50,
223
+ "batch_size": 50,
224
+ "use_async_envs": false
225
+ },
226
+ "wandb": {
227
+ "enable": true,
228
+ "disable_artifact": false,
229
+ "project": "lerobot",
230
+ "entity": null,
231
+ "notes": null,
232
+ "run_id": "ftnu6goz",
233
+ "mode": null
234
+ }
235
+ }