Robotics
LeRobot
Safetensors
diffusion
cnboonhan-htx commited on
Commit
d740300
·
verified ·
1 Parent(s): 2afbdda

Upload policy weights, train config and readme

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