Robotics
LeRobot
Safetensors
diffusion
bananaburp commited on
Commit
67dadc0
·
verified ·
1 Parent(s): 3f499d3

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