Robotics
LeRobot
Safetensors
diffusion
inaas commited on
Commit
8ac7b0d
·
verified ·
1 Parent(s): badde00

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +62 -0
  2. config.json +87 -0
  3. model.safetensors +3 -0
  4. train_config.json +176 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: inaas/dual_needle_psm1_static
3
+ library_name: lerobot
4
+ license: apache-2.0
5
+ model_name: diffusion
6
+ pipeline_tag: robotics
7
+ tags:
8
+ - diffusion
9
+ - robotics
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,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "diffusion",
3
+ "n_obs_steps": 2,
4
+ "input_features": {
5
+ "observation.image.cam0": {
6
+ "type": "VISUAL",
7
+ "shape": [
8
+ 3,
9
+ 240,
10
+ 320
11
+ ]
12
+ },
13
+ "observation.state": {
14
+ "type": "STATE",
15
+ "shape": [
16
+ 3
17
+ ]
18
+ }
19
+ },
20
+ "output_features": {
21
+ "action": {
22
+ "type": "ACTION",
23
+ "shape": [
24
+ 10
25
+ ]
26
+ }
27
+ },
28
+ "device": "cuda",
29
+ "use_amp": false,
30
+ "push_to_hub": true,
31
+ "repo_id": "inaas/dual_needle_psm1_static_v2",
32
+ "private": null,
33
+ "tags": null,
34
+ "license": null,
35
+ "pretrained_path": null,
36
+ "horizon": 32,
37
+ "n_action_steps": 8,
38
+ "normalization_mapping": {
39
+ "VISUAL": "MEAN_STD",
40
+ "STATE": "MIN_MAX",
41
+ "ACTION": "MIN_MAX"
42
+ },
43
+ "drop_n_last_frames": 7,
44
+ "vision_backbone": "resnet18",
45
+ "crop_shape": [
46
+ 228,
47
+ 304
48
+ ],
49
+ "crop_is_random": true,
50
+ "pretrained_backbone_weights": null,
51
+ "use_group_norm": true,
52
+ "spatial_softmax_num_keypoints": 32,
53
+ "use_separate_rgb_encoder_per_camera": true,
54
+ "use_vit_encoder": false,
55
+ "vit_embed_dim": 512,
56
+ "vit_depth": 6,
57
+ "vit_num_heads": 8,
58
+ "vit_dropout": 0.1,
59
+ "down_dims": [
60
+ 256,
61
+ 512,
62
+ 1024
63
+ ],
64
+ "kernel_size": 5,
65
+ "n_groups": 8,
66
+ "diffusion_step_embed_dim": 128,
67
+ "use_film_scale_modulation": true,
68
+ "noise_scheduler_type": "DDIM",
69
+ "num_train_timesteps": 100,
70
+ "beta_schedule": "squaredcos_cap_v2",
71
+ "beta_start": 0.0001,
72
+ "beta_end": 0.02,
73
+ "prediction_type": "epsilon",
74
+ "clip_sample": true,
75
+ "clip_sample_range": 1.0,
76
+ "num_inference_steps": 100,
77
+ "do_mask_loss_for_padding": false,
78
+ "optimizer_lr": 0.0001,
79
+ "optimizer_betas": [
80
+ 0.95,
81
+ 0.999
82
+ ],
83
+ "optimizer_eps": 1e-08,
84
+ "optimizer_weight_decay": 1e-06,
85
+ "scheduler_name": "cosine",
86
+ "scheduler_warmup_steps": 500
87
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54175b71e6237a85497f5f9bbc6c1a9bcb19e4c03c4a6a655d6831372a1f4e2d
3
+ size 304479696
train_config.json ADDED
@@ -0,0 +1,176 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "inaas/dual_needle_psm1_static",
4
+ "root": null,
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": 1.0,
13
+ "type": "ColorJitter",
14
+ "kwargs": {
15
+ "brightness": 0.3,
16
+ "contrast": 0.4,
17
+ "saturation": 0.5
18
+ }
19
+ },
20
+ "affine": {
21
+ "weight": 1.0,
22
+ "type": "RandomAffine",
23
+ "kwargs": {
24
+ "degrees": [
25
+ -5.0,
26
+ 5.0
27
+ ]
28
+ }
29
+ }
30
+ }
31
+ },
32
+ "revision": null,
33
+ "use_imagenet_stats": true,
34
+ "video_backend": "torchcodec",
35
+ "streaming": false
36
+ },
37
+ "env": null,
38
+ "policy": {
39
+ "type": "diffusion",
40
+ "n_obs_steps": 2,
41
+ "input_features": {
42
+ "observation.image.cam0": {
43
+ "type": "VISUAL",
44
+ "shape": [
45
+ 3,
46
+ 240,
47
+ 320
48
+ ]
49
+ },
50
+ "observation.state": {
51
+ "type": "STATE",
52
+ "shape": [
53
+ 3
54
+ ]
55
+ }
56
+ },
57
+ "output_features": {
58
+ "action": {
59
+ "type": "ACTION",
60
+ "shape": [
61
+ 10
62
+ ]
63
+ }
64
+ },
65
+ "device": "cuda",
66
+ "use_amp": false,
67
+ "push_to_hub": true,
68
+ "repo_id": "inaas/dual_needle_psm1_static_v2",
69
+ "private": null,
70
+ "tags": null,
71
+ "license": null,
72
+ "pretrained_path": null,
73
+ "horizon": 32,
74
+ "n_action_steps": 8,
75
+ "normalization_mapping": {
76
+ "VISUAL": "MEAN_STD",
77
+ "STATE": "MIN_MAX",
78
+ "ACTION": "MIN_MAX"
79
+ },
80
+ "drop_n_last_frames": 7,
81
+ "vision_backbone": "resnet18",
82
+ "crop_shape": [
83
+ 228,
84
+ 304
85
+ ],
86
+ "crop_is_random": true,
87
+ "pretrained_backbone_weights": null,
88
+ "use_group_norm": true,
89
+ "spatial_softmax_num_keypoints": 32,
90
+ "use_separate_rgb_encoder_per_camera": true,
91
+ "use_vit_encoder": false,
92
+ "vit_embed_dim": 512,
93
+ "vit_depth": 6,
94
+ "vit_num_heads": 8,
95
+ "vit_dropout": 0.1,
96
+ "down_dims": [
97
+ 256,
98
+ 512,
99
+ 1024
100
+ ],
101
+ "kernel_size": 5,
102
+ "n_groups": 8,
103
+ "diffusion_step_embed_dim": 128,
104
+ "use_film_scale_modulation": true,
105
+ "noise_scheduler_type": "DDIM",
106
+ "num_train_timesteps": 100,
107
+ "beta_schedule": "squaredcos_cap_v2",
108
+ "beta_start": 0.0001,
109
+ "beta_end": 0.02,
110
+ "prediction_type": "epsilon",
111
+ "clip_sample": true,
112
+ "clip_sample_range": 1.0,
113
+ "num_inference_steps": 100,
114
+ "do_mask_loss_for_padding": false,
115
+ "optimizer_lr": 0.0001,
116
+ "optimizer_betas": [
117
+ 0.95,
118
+ 0.999
119
+ ],
120
+ "optimizer_eps": 1e-08,
121
+ "optimizer_weight_decay": 1e-06,
122
+ "scheduler_name": "cosine",
123
+ "scheduler_warmup_steps": 500
124
+ },
125
+ "output_dir": "/scratch/inaas/inaas/runs/lerobot/13025525/checkpoints",
126
+ "job_name": "diffusion",
127
+ "resume": false,
128
+ "seed": 1000,
129
+ "num_workers": 4,
130
+ "batch_size": 64,
131
+ "steps": 100000,
132
+ "eval_freq": 20000,
133
+ "log_freq": 200,
134
+ "tolerance_s": 0.0001,
135
+ "save_checkpoint": true,
136
+ "save_freq": 20000,
137
+ "use_policy_training_preset": true,
138
+ "optimizer": {
139
+ "type": "adam",
140
+ "lr": 0.0001,
141
+ "weight_decay": 1e-06,
142
+ "grad_clip_norm": 10.0,
143
+ "betas": [
144
+ 0.95,
145
+ 0.999
146
+ ],
147
+ "eps": 1e-08
148
+ },
149
+ "scheduler": {
150
+ "type": "diffuser",
151
+ "num_warmup_steps": 500,
152
+ "name": "cosine"
153
+ },
154
+ "eval": {
155
+ "n_episodes": 50,
156
+ "batch_size": 50,
157
+ "use_async_envs": false
158
+ },
159
+ "wandb": {
160
+ "enable": false,
161
+ "disable_artifact": false,
162
+ "project": "lerobot",
163
+ "entity": null,
164
+ "notes": null,
165
+ "run_id": null,
166
+ "mode": null
167
+ },
168
+ "use_rabc": false,
169
+ "rabc_progress_path": null,
170
+ "rabc_kappa": 0.01,
171
+ "rabc_epsilon": 1e-06,
172
+ "rabc_head_mode": "sparse",
173
+ "use_umi_relative_actions": false,
174
+ "rename_map": {},
175
+ "checkpoint_path": null
176
+ }