Jefferzn commited on
Commit
a457ce4
·
verified ·
1 Parent(s): e70a199

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