Josephzzz commited on
Commit
a9ab933
·
verified ·
1 Parent(s): 07ac55d

Upload policy weights, train config and readme

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