y1y2y3 commited on
Commit
24e9a04
·
verified ·
1 Parent(s): 79765d6

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +90 -0
  3. model.safetensors +3 -0
  4. train_config.json +200 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: y1y2y3/so101_test8
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - lerobot
9
+ - robotics
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,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ 6
14
+ ]
15
+ },
16
+ "observation.images.handeye": {
17
+ "type": "VISUAL",
18
+ "shape": [
19
+ 3,
20
+ 360,
21
+ 640
22
+ ]
23
+ },
24
+ "observation.images.fixed": {
25
+ "type": "VISUAL",
26
+ "shape": [
27
+ 3,
28
+ 360,
29
+ 640
30
+ ]
31
+ }
32
+ },
33
+ "output_features": {
34
+ "action": {
35
+ "type": "ACTION",
36
+ "shape": [
37
+ 6
38
+ ]
39
+ }
40
+ },
41
+ "device": "cuda",
42
+ "pretrained_path": "outputs/so101_test8_diffusion200k_augmented100_n/checkpoints/last/pretrained_model",
43
+ "use_amp": false,
44
+ "push_to_hub": true,
45
+ "repo_id": "y1y2y3/so101_test8_diffusion200k_augmented100_n",
46
+ "private": null,
47
+ "tags": null,
48
+ "license": null,
49
+ "horizon": 16,
50
+ "n_action_steps": 8,
51
+ "drop_n_last_frames": 7,
52
+ "vision_backbone": "resnet18",
53
+ "crop_shape": [
54
+ 84,
55
+ 84
56
+ ],
57
+ "crop_is_random": true,
58
+ "pretrained_backbone_weights": null,
59
+ "use_group_norm": true,
60
+ "spatial_softmax_num_keypoints": 32,
61
+ "use_separate_rgb_encoder_per_camera": false,
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
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12d3934e69d7764affdfc868b2f082ffd58aff14a25f62a4fd27006604a1ce42
3
+ size 1066517744
train_config.json ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "y1y2y3/so101_test8",
4
+ "root": null,
5
+ "episodes": null,
6
+ "image_transforms": {
7
+ "enable": true,
8
+ "max_num_transforms": 100,
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
+ 6
81
+ ]
82
+ },
83
+ "observation.images.handeye": {
84
+ "type": "VISUAL",
85
+ "shape": [
86
+ 3,
87
+ 360,
88
+ 640
89
+ ]
90
+ },
91
+ "observation.images.fixed": {
92
+ "type": "VISUAL",
93
+ "shape": [
94
+ 3,
95
+ 360,
96
+ 640
97
+ ]
98
+ }
99
+ },
100
+ "output_features": {
101
+ "action": {
102
+ "type": "ACTION",
103
+ "shape": [
104
+ 6
105
+ ]
106
+ }
107
+ },
108
+ "device": "cuda",
109
+ "pretrained_path": "outputs/so101_test8_diffusion200k_augmented100_n/checkpoints/last/pretrained_model",
110
+ "use_amp": false,
111
+ "push_to_hub": true,
112
+ "repo_id": "y1y2y3/so101_test8_diffusion200k_augmented100_n",
113
+ "private": null,
114
+ "tags": null,
115
+ "license": null,
116
+ "horizon": 16,
117
+ "n_action_steps": 8,
118
+ "drop_n_last_frames": 7,
119
+ "vision_backbone": "resnet18",
120
+ "crop_shape": [
121
+ 84,
122
+ 84
123
+ ],
124
+ "crop_is_random": true,
125
+ "pretrained_backbone_weights": null,
126
+ "use_group_norm": true,
127
+ "spatial_softmax_num_keypoints": 32,
128
+ "use_separate_rgb_encoder_per_camera": false,
129
+ "down_dims": [
130
+ 512,
131
+ 1024,
132
+ 2048
133
+ ],
134
+ "kernel_size": 5,
135
+ "n_groups": 8,
136
+ "diffusion_step_embed_dim": 128,
137
+ "use_film_scale_modulation": true,
138
+ "noise_scheduler_type": "DDPM",
139
+ "num_train_timesteps": 100,
140
+ "beta_schedule": "squaredcos_cap_v2",
141
+ "beta_start": 0.0001,
142
+ "beta_end": 0.02,
143
+ "prediction_type": "epsilon",
144
+ "clip_sample": true,
145
+ "clip_sample_range": 1.0,
146
+ "num_inference_steps": null,
147
+ "do_mask_loss_for_padding": false,
148
+ "optimizer_lr": 0.0001,
149
+ "optimizer_betas": [
150
+ 0.95,
151
+ 0.999
152
+ ],
153
+ "optimizer_eps": 1e-08,
154
+ "optimizer_weight_decay": 1e-06,
155
+ "scheduler_name": "cosine",
156
+ "scheduler_warmup_steps": 500
157
+ },
158
+ "output_dir": "outputs/so101_test8_diffusion200k_augmented100_n",
159
+ "job_name": "so101_test8_diffusion200k_augmented100_n",
160
+ "resume": true,
161
+ "seed": 1000,
162
+ "num_workers": 4,
163
+ "batch_size": 4,
164
+ "steps": 200000,
165
+ "eval_freq": 20000,
166
+ "log_freq": 200,
167
+ "save_checkpoint": true,
168
+ "save_freq": 20000,
169
+ "use_policy_training_preset": true,
170
+ "optimizer": {
171
+ "type": "adam",
172
+ "lr": 0.0001,
173
+ "weight_decay": 1e-06,
174
+ "grad_clip_norm": 10.0,
175
+ "betas": [
176
+ 0.95,
177
+ 0.999
178
+ ],
179
+ "eps": 1e-08
180
+ },
181
+ "scheduler": {
182
+ "type": "diffuser",
183
+ "num_warmup_steps": 500,
184
+ "name": "cosine"
185
+ },
186
+ "eval": {
187
+ "n_episodes": 50,
188
+ "batch_size": 50,
189
+ "use_async_envs": false
190
+ },
191
+ "wandb": {
192
+ "enable": true,
193
+ "disable_artifact": false,
194
+ "project": "lerobot",
195
+ "entity": null,
196
+ "notes": null,
197
+ "run_id": "ev45vk4i",
198
+ "mode": null
199
+ }
200
+ }