Robotics
LeRobot
Safetensors
diffusion
masondx commited on
Commit
8132564
·
verified ·
1 Parent(s): f3227a5

Upload policy weights, train config and readme

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