Robotics
LeRobot
Safetensors
diffusion
lukicdarkoo commited on
Commit
b257719
·
verified ·
1 Parent(s): 386f3a5

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 +191 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets: lukicdarkoo/inspect_wire
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
+ python lerobot/scripts/train.py \
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
+ python -m 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
+ "normalization_mapping": {
5
+ "VISUAL": "MEAN_STD",
6
+ "STATE": "MIN_MAX",
7
+ "ACTION": "MIN_MAX"
8
+ },
9
+ "input_features": {
10
+ "observation.state": {
11
+ "type": "STATE",
12
+ "shape": [
13
+ 7
14
+ ]
15
+ },
16
+ "observation.images.gripper": {
17
+ "type": "VISUAL",
18
+ "shape": [
19
+ 3,
20
+ 240,
21
+ 320
22
+ ]
23
+ }
24
+ },
25
+ "output_features": {
26
+ "action": {
27
+ "type": "ACTION",
28
+ "shape": [
29
+ 7
30
+ ]
31
+ }
32
+ },
33
+ "device": "cuda",
34
+ "use_amp": false,
35
+ "push_to_hub": true,
36
+ "repo_id": "lukicdarkoo/inspect_wire_diffusion",
37
+ "private": null,
38
+ "tags": null,
39
+ "license": null,
40
+ "horizon": 16,
41
+ "n_action_steps": 8,
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:537b385f100a9e51c25177938613346d60772b0cdd6b3442dd7e86007731dc3f
3
+ size 1052081132
train_config.json ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "lukicdarkoo/inspect_wire",
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
+ },
67
+ "env": null,
68
+ "policy": {
69
+ "type": "diffusion",
70
+ "n_obs_steps": 2,
71
+ "normalization_mapping": {
72
+ "VISUAL": "MEAN_STD",
73
+ "STATE": "MIN_MAX",
74
+ "ACTION": "MIN_MAX"
75
+ },
76
+ "input_features": {
77
+ "observation.state": {
78
+ "type": "STATE",
79
+ "shape": [
80
+ 7
81
+ ]
82
+ },
83
+ "observation.images.gripper": {
84
+ "type": "VISUAL",
85
+ "shape": [
86
+ 3,
87
+ 240,
88
+ 320
89
+ ]
90
+ }
91
+ },
92
+ "output_features": {
93
+ "action": {
94
+ "type": "ACTION",
95
+ "shape": [
96
+ 7
97
+ ]
98
+ }
99
+ },
100
+ "device": "cuda",
101
+ "use_amp": false,
102
+ "push_to_hub": true,
103
+ "repo_id": "lukicdarkoo/inspect_wire_diffusion",
104
+ "private": null,
105
+ "tags": null,
106
+ "license": null,
107
+ "horizon": 16,
108
+ "n_action_steps": 8,
109
+ "drop_n_last_frames": 7,
110
+ "vision_backbone": "resnet18",
111
+ "crop_shape": [
112
+ 84,
113
+ 84
114
+ ],
115
+ "crop_is_random": true,
116
+ "pretrained_backbone_weights": null,
117
+ "use_group_norm": true,
118
+ "spatial_softmax_num_keypoints": 32,
119
+ "use_separate_rgb_encoder_per_camera": false,
120
+ "down_dims": [
121
+ 512,
122
+ 1024,
123
+ 2048
124
+ ],
125
+ "kernel_size": 5,
126
+ "n_groups": 8,
127
+ "diffusion_step_embed_dim": 128,
128
+ "use_film_scale_modulation": true,
129
+ "noise_scheduler_type": "DDPM",
130
+ "num_train_timesteps": 100,
131
+ "beta_schedule": "squaredcos_cap_v2",
132
+ "beta_start": 0.0001,
133
+ "beta_end": 0.02,
134
+ "prediction_type": "epsilon",
135
+ "clip_sample": true,
136
+ "clip_sample_range": 1.0,
137
+ "num_inference_steps": null,
138
+ "do_mask_loss_for_padding": false,
139
+ "optimizer_lr": 0.0001,
140
+ "optimizer_betas": [
141
+ 0.95,
142
+ 0.999
143
+ ],
144
+ "optimizer_eps": 1e-08,
145
+ "optimizer_weight_decay": 1e-06,
146
+ "scheduler_name": "cosine",
147
+ "scheduler_warmup_steps": 500
148
+ },
149
+ "output_dir": "/home/lukic/spes/wires/models/inspect_wire/diffusion",
150
+ "job_name": "diffusion",
151
+ "resume": false,
152
+ "seed": 1000,
153
+ "num_workers": 4,
154
+ "batch_size": 8,
155
+ "steps": 100000,
156
+ "eval_freq": 20000,
157
+ "log_freq": 200,
158
+ "save_checkpoint": true,
159
+ "save_freq": 20000,
160
+ "use_policy_training_preset": true,
161
+ "optimizer": {
162
+ "type": "adam",
163
+ "lr": 0.0001,
164
+ "weight_decay": 1e-06,
165
+ "grad_clip_norm": 10.0,
166
+ "betas": [
167
+ 0.95,
168
+ 0.999
169
+ ],
170
+ "eps": 1e-08
171
+ },
172
+ "scheduler": {
173
+ "type": "diffuser",
174
+ "num_warmup_steps": 500,
175
+ "name": "cosine"
176
+ },
177
+ "eval": {
178
+ "n_episodes": 50,
179
+ "batch_size": 50,
180
+ "use_async_envs": false
181
+ },
182
+ "wandb": {
183
+ "enable": true,
184
+ "disable_artifact": false,
185
+ "project": "lerobot",
186
+ "entity": null,
187
+ "notes": null,
188
+ "run_id": "ey9zp08l",
189
+ "mode": null
190
+ }
191
+ }