rishabhrj11 commited on
Commit
fb4f317
·
verified ·
1 Parent(s): 06973c3

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +93 -0
  3. model.safetensors +3 -0
  4. train_config.json +223 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: rishabhrj11/gym-xarm-grab-5
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - robotics
9
+ - lerobot
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,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 2,
4
+ "input_features": {
5
+ "action": {
6
+ "type": "ACTION",
7
+ "shape": [
8
+ 4
9
+ ]
10
+ },
11
+ "observation.state": {
12
+ "type": "STATE",
13
+ "shape": [
14
+ 7
15
+ ]
16
+ },
17
+ "observation.image.camera_top": {
18
+ "type": "VISUAL",
19
+ "shape": [
20
+ 3,
21
+ 224,
22
+ 224
23
+ ]
24
+ },
25
+ "observation.image.camera_ef": {
26
+ "type": "VISUAL",
27
+ "shape": [
28
+ 3,
29
+ 224,
30
+ 224
31
+ ]
32
+ }
33
+ },
34
+ "output_features": {
35
+ "action": {
36
+ "type": "ACTION",
37
+ "shape": [
38
+ 4
39
+ ]
40
+ }
41
+ },
42
+ "device": "cuda",
43
+ "use_amp": false,
44
+ "push_to_hub": true,
45
+ "repo_id": "rishabhrj11/gym-xarm-pick-diffusion",
46
+ "private": null,
47
+ "tags": null,
48
+ "license": null,
49
+ "pretrained_path": null,
50
+ "horizon": 16,
51
+ "n_action_steps": 8,
52
+ "normalization_mapping": {
53
+ "VISUAL": "MEAN_STD",
54
+ "STATE": "MIN_MAX",
55
+ "ACTION": "MIN_MAX"
56
+ },
57
+ "drop_n_last_frames": 7,
58
+ "vision_backbone": "resnet18",
59
+ "crop_shape": null,
60
+ "crop_is_random": true,
61
+ "pretrained_backbone_weights": null,
62
+ "use_group_norm": true,
63
+ "spatial_softmax_num_keypoints": 32,
64
+ "use_separate_rgb_encoder_per_camera": true,
65
+ "down_dims": [
66
+ 512,
67
+ 1024,
68
+ 2048
69
+ ],
70
+ "kernel_size": 5,
71
+ "n_groups": 8,
72
+ "diffusion_step_embed_dim": 128,
73
+ "use_film_scale_modulation": true,
74
+ "noise_scheduler_type": "DDPM",
75
+ "num_train_timesteps": 100,
76
+ "beta_schedule": "squaredcos_cap_v2",
77
+ "beta_start": 0.0001,
78
+ "beta_end": 0.02,
79
+ "prediction_type": "epsilon",
80
+ "clip_sample": true,
81
+ "clip_sample_range": 1.0,
82
+ "num_inference_steps": null,
83
+ "do_mask_loss_for_padding": false,
84
+ "optimizer_lr": 0.0001,
85
+ "optimizer_betas": [
86
+ 0.95,
87
+ 0.999
88
+ ],
89
+ "optimizer_eps": 1e-08,
90
+ "optimizer_weight_decay": 1e-06,
91
+ "scheduler_name": "cosine",
92
+ "scheduler_warmup_steps": 500
93
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c24698a7500510b50de7abf745a90c10b688bf78773e792f8b0b3692ed2f89db
3
+ size 1111513944
train_config.json ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "rishabhrj11/gym-xarm-grab-5",
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
+ "affine": {
62
+ "weight": 1.0,
63
+ "type": "RandomAffine",
64
+ "kwargs": {
65
+ "degrees": [
66
+ -5.0,
67
+ 5.0
68
+ ],
69
+ "translate": [
70
+ 0.05,
71
+ 0.05
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ },
77
+ "revision": null,
78
+ "use_imagenet_stats": true,
79
+ "video_backend": "torchcodec",
80
+ "streaming": false
81
+ },
82
+ "env": null,
83
+ "policy": {
84
+ "type": "diffusion",
85
+ "n_obs_steps": 2,
86
+ "input_features": {
87
+ "action": {
88
+ "type": "ACTION",
89
+ "shape": [
90
+ 4
91
+ ]
92
+ },
93
+ "observation.state": {
94
+ "type": "STATE",
95
+ "shape": [
96
+ 7
97
+ ]
98
+ },
99
+ "observation.image.camera_top": {
100
+ "type": "VISUAL",
101
+ "shape": [
102
+ 3,
103
+ 224,
104
+ 224
105
+ ]
106
+ },
107
+ "observation.image.camera_ef": {
108
+ "type": "VISUAL",
109
+ "shape": [
110
+ 3,
111
+ 224,
112
+ 224
113
+ ]
114
+ }
115
+ },
116
+ "output_features": {
117
+ "action": {
118
+ "type": "ACTION",
119
+ "shape": [
120
+ 4
121
+ ]
122
+ }
123
+ },
124
+ "device": "cuda",
125
+ "use_amp": false,
126
+ "push_to_hub": true,
127
+ "repo_id": "rishabhrj11/gym-xarm-pick-diffusion",
128
+ "private": null,
129
+ "tags": null,
130
+ "license": null,
131
+ "pretrained_path": null,
132
+ "horizon": 16,
133
+ "n_action_steps": 8,
134
+ "normalization_mapping": {
135
+ "VISUAL": "MEAN_STD",
136
+ "STATE": "MIN_MAX",
137
+ "ACTION": "MIN_MAX"
138
+ },
139
+ "drop_n_last_frames": 7,
140
+ "vision_backbone": "resnet18",
141
+ "crop_shape": null,
142
+ "crop_is_random": true,
143
+ "pretrained_backbone_weights": null,
144
+ "use_group_norm": true,
145
+ "spatial_softmax_num_keypoints": 32,
146
+ "use_separate_rgb_encoder_per_camera": true,
147
+ "down_dims": [
148
+ 512,
149
+ 1024,
150
+ 2048
151
+ ],
152
+ "kernel_size": 5,
153
+ "n_groups": 8,
154
+ "diffusion_step_embed_dim": 128,
155
+ "use_film_scale_modulation": true,
156
+ "noise_scheduler_type": "DDPM",
157
+ "num_train_timesteps": 100,
158
+ "beta_schedule": "squaredcos_cap_v2",
159
+ "beta_start": 0.0001,
160
+ "beta_end": 0.02,
161
+ "prediction_type": "epsilon",
162
+ "clip_sample": true,
163
+ "clip_sample_range": 1.0,
164
+ "num_inference_steps": null,
165
+ "do_mask_loss_for_padding": false,
166
+ "optimizer_lr": 0.0001,
167
+ "optimizer_betas": [
168
+ 0.95,
169
+ 0.999
170
+ ],
171
+ "optimizer_eps": 1e-08,
172
+ "optimizer_weight_decay": 1e-06,
173
+ "scheduler_name": "cosine",
174
+ "scheduler_warmup_steps": 500
175
+ },
176
+ "output_dir": "../outputs/diffusion/train1",
177
+ "job_name": "diffusion",
178
+ "resume": false,
179
+ "seed": 1000,
180
+ "num_workers": 4,
181
+ "batch_size": 128,
182
+ "steps": 3000,
183
+ "eval_freq": 10000,
184
+ "log_freq": 10,
185
+ "save_checkpoint": true,
186
+ "save_freq": 500,
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-xarm-diffusion",
213
+ "entity": null,
214
+ "notes": null,
215
+ "run_id": "8zknli7x",
216
+ "mode": null
217
+ },
218
+ "checkpoint_path": null,
219
+ "rename_map": {
220
+ "observation.images.camera0": "None",
221
+ "observation.images.camera1": "None"
222
+ }
223
+ }