Robotics
LeRobot
Safetensors
diffusion
Louislerikiki commited on
Commit
a411c7f
·
verified ·
1 Parent(s): ff7a72c

Upload policy weights, train config and readme

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