Robotics
LeRobot
Safetensors
pi05
justintiensmith commited on
Commit
8c85e60
·
verified ·
1 Parent(s): 8ba88cb

Upload policy weights, train config and readme

Browse files
Files changed (4) hide show
  1. README.md +168 -0
  2. config.json +107 -0
  3. model.safetensors +3 -0
  4. train_config.json +245 -0
README.md ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: lerobot/pi05_base
3
+ datasets: justintiensmith/SP_Counting
4
+ library_name: lerobot
5
+ license: apache-2.0
6
+ model_name: pi05
7
+ pipeline_tag: robotics
8
+ tags:
9
+ - robotics
10
+ - lerobot
11
+ - pi05
12
+ ---
13
+
14
+ # Model Card for pi05
15
+
16
+ <!-- Provide a quick summary of what the model is/does. -->
17
+
18
+
19
+ [π₀.₅ (Pi05)](https://www.physicalintelligence.company/blog/pi05) is a Vision-Language-Action model from Physical Intelligence designed for open-world generalization: it evolves π₀ to generalize to entirely new environments and situations that were never seen during training. The LeRobot implementation is adapted from their open-source OpenPI repository.
20
+
21
+
22
+
23
+
24
+ <!-- A short demo is worth more than any description! Record a GIF/video of the policy
25
+ running on your robot, upload it to this repo, and embed it here:
26
+ <p align="center">
27
+ <img src="https://huggingface.co/<hf_user>/<policy_repo_id>/resolve/main/demo.gif" width="60%"/>
28
+ </p>
29
+ -->
30
+
31
+ This policy has been trained and pushed to the Hub using [LeRobot](https://github.com/huggingface/lerobot).
32
+
33
+ Learn how to train and run it in the [LeRobot pi05 guide](https://huggingface.co/docs/lerobot/main/en/pi05), or browse the [full documentation](https://huggingface.co/docs/lerobot/index).
34
+
35
+
36
+ ---
37
+
38
+ ## Model Details
39
+
40
+ - **License:** apache-2.0
41
+ - **Fine-tuned from:** [lerobot/pi05_base](https://huggingface.co/lerobot/pi05_base)
42
+ - **Robot type:** `so_follower`
43
+ - **Cameras:** `wrist`, `middle`, `above`, `right`, `left`
44
+
45
+
46
+ ## Inputs & Outputs
47
+
48
+ The policy consumes these observation features and produces these action features.
49
+
50
+ **Inputs**
51
+
52
+ | Feature | Type | Shape |
53
+ | --- | --- | --- |
54
+ | `observation.state` | STATE | `(6,)` |
55
+ | `observation.images.wrist` | VISUAL | `(3, 480, 640)` |
56
+ | `observation.images.middle` | VISUAL | `(3, 480, 640)` |
57
+ | `observation.images.above` | VISUAL | `(3, 480, 640)` |
58
+
59
+ **Outputs**
60
+
61
+ | Feature | Type | Shape |
62
+ | --- | --- | --- |
63
+ | `action` | ACTION | `(6,)` |
64
+
65
+
66
+ ## Training Dataset
67
+
68
+ - **Repository:** [justintiensmith/SP_Counting](https://huggingface.co/datasets/justintiensmith/SP_Counting)
69
+ - **Episodes:** 50
70
+ - **Frames:** 37501
71
+ - **Frame rate:** 30 FPS
72
+ - **Task(s):** "Make it such that there are 0 objects on the piece of paper.", "Make it such that there is 1 object on the piece of paper.", "Make it such that there are 2 objects on the piece of paper.", "Make it such that there are 3 objects on the piece of paper.", "Make it such that there are 4 objects on the piece of paper."
73
+
74
+ <a class="flex" href="https://huggingface.co/spaces/lerobot/visualize_dataset?path=justintiensmith/SP_Counting">
75
+ <img class="block dark:hidden" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl.svg"/>
76
+ <img class="hidden dark:block" src="https://huggingface.co/datasets/huggingface/badges/resolve/main/visualize-this-dataset-xl-dark.svg"/>
77
+ </a>
78
+
79
+
80
+ ## Training Configuration
81
+
82
+ | Setting | Value |
83
+ | --- | --- |
84
+ | Training steps | 1000 |
85
+ | Batch size | 16 |
86
+ | Optimizer | adamw |
87
+ | Learning rate | 2.5e-05 |
88
+ | Seed | 1000 |
89
+ | LeRobot version | 0.5.2 |
90
+
91
+ ---
92
+
93
+ ## How to Get Started with the Model
94
+
95
+ New to LeRobot? These guides cover the full workflow:
96
+
97
+ - **[Install LeRobot](https://huggingface.co/docs/lerobot/main/en/installation)** — set up the `lerobot` package.
98
+ - **[Hardware setup](https://huggingface.co/docs/lerobot/main/en/hardware_guide)** — assemble, wire, and calibrate your robot and cameras.
99
+ - **[Record data & train a policy](https://huggingface.co/docs/lerobot/en/il_robots)** — the end-to-end imitation-learning walkthrough.
100
+ - **[CLI cheat-sheet](https://huggingface.co/docs/lerobot/main/en/cheat-sheet)** — quick reference for the `lerobot-*` commands.
101
+
102
+ The short version to run and train this policy:
103
+
104
+ ### Run the policy on your robot
105
+
106
+ ```bash
107
+ lerobot-rollout \
108
+ --strategy.type=base \
109
+ --robot.type=so_follower \
110
+ --robot.port=<your_robot_port> \
111
+ --robot.cameras="{ <camera_1>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}, <camera_2>: {type: opencv, index_or_path: <index_or_path>, width: 640, height: 480, fps: 30}}" \
112
+ --policy.path=justintiensmith/pi05_SP_Counting \
113
+ --task="Make it such that there are 0 objects on the piece of paper." \
114
+ --duration=60
115
+ ```
116
+
117
+ Replace the remaining `<...>` placeholders with your own values: `--robot.port` and the camera names/indices are specific to your machine, and the camera names must match the observation keys this policy was trained on.
118
+
119
+ When `--strategy.type=base` is used the script doesn't record the episodes. Skipping duration will make the policy run indefinitely. For more information look at [rollout documentation](https://huggingface.co/docs/lerobot/main/en/inference).
120
+
121
+ ### Train your own policy
122
+
123
+ This policy type is usually fine-tuned from the pretrained base model [lerobot/pi05_base](https://huggingface.co/lerobot/pi05_base):
124
+
125
+ ```bash
126
+ lerobot-train \
127
+ --dataset.repo_id=${HF_USER}/<dataset> \
128
+ --policy.path=lerobot/pi05_base \
129
+ --output_dir=outputs/train/<policy_repo_id> \
130
+ --job_name=lerobot_training \
131
+ --policy.device=cuda \
132
+ --policy.repo_id=${HF_USER}/<policy_repo_id> \
133
+ --wandb.enable=true
134
+ ```
135
+
136
+ _Writes checkpoints to `outputs/train/<policy_repo_id>/checkpoints/`._
137
+
138
+ ---
139
+
140
+ ## Evaluation
141
+
142
+ <!-- Report real-robot results here: run the policy several times per task and count the
143
+ successes. Delete the "No evaluation results" line and fill in this table instead:
144
+
145
+ | Task | Trials | Successes | Success rate |
146
+ | ---- | ------ | --------- | ------------ |
147
+ | pick the lego brick | 10 | 8 | 80% |
148
+
149
+ Also worth noting: anything that affects difficulty (new object positions, lighting,
150
+ distractors, a different robot of the same type, ...).
151
+ -->
152
+
153
+ _No evaluation results have been provided for this policy yet._
154
+
155
+ ---
156
+
157
+ ## Citation
158
+
159
+ If you use this policy, please cite the method linked in the description above, along with LeRobot:
160
+
161
+ ```bibtex
162
+ @misc{cadene2024lerobot,
163
+ author = {Cadene, Remi and Alibert, Simon and Soare, Alexander and Gallouedec, Quentin and Zouitine, Adil and Palma, Steven and Kooijmans, Pepijn and Aractingi, Michel and Shukor, Mustafa and Aubakirova, Dana and Russi, Martino and Capuano, Francesco and Pascal, Caroline and Choghari, Jade and Moss, Jess and Wolf, Thomas},
164
+ title = {LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch},
165
+ howpublished = "\url{https://github.com/huggingface/lerobot}",
166
+ year = {2024}
167
+ }
168
+ ```
config.json ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "type": "pi05",
3
+ "n_obs_steps": 1,
4
+ "input_features": {
5
+ "observation.state": {
6
+ "type": "STATE",
7
+ "shape": [
8
+ 6
9
+ ]
10
+ },
11
+ "observation.images.wrist": {
12
+ "type": "VISUAL",
13
+ "shape": [
14
+ 3,
15
+ 480,
16
+ 640
17
+ ]
18
+ },
19
+ "observation.images.middle": {
20
+ "type": "VISUAL",
21
+ "shape": [
22
+ 3,
23
+ 480,
24
+ 640
25
+ ]
26
+ },
27
+ "observation.images.above": {
28
+ "type": "VISUAL",
29
+ "shape": [
30
+ 3,
31
+ 480,
32
+ 640
33
+ ]
34
+ }
35
+ },
36
+ "output_features": {
37
+ "action": {
38
+ "type": "ACTION",
39
+ "shape": [
40
+ 6
41
+ ]
42
+ }
43
+ },
44
+ "device": "cuda",
45
+ "use_amp": false,
46
+ "use_peft": false,
47
+ "push_to_hub": true,
48
+ "repo_id": "justintiensmith/pi05_SP_Counting",
49
+ "private": null,
50
+ "tags": null,
51
+ "license": null,
52
+ "pretrained_path": "lerobot/pi05_base",
53
+ "paligemma_variant": "gemma_2b",
54
+ "action_expert_variant": "gemma_300m",
55
+ "dtype": "bfloat16",
56
+ "chunk_size": 50,
57
+ "n_action_steps": 50,
58
+ "max_state_dim": 32,
59
+ "max_action_dim": 32,
60
+ "num_inference_steps": 10,
61
+ "time_sampling_beta_alpha": 1.5,
62
+ "time_sampling_beta_beta": 1.0,
63
+ "time_sampling_scale": 0.999,
64
+ "time_sampling_offset": 0.001,
65
+ "min_period": 0.004,
66
+ "max_period": 4.0,
67
+ "use_relative_actions": false,
68
+ "relative_exclude_joints": [
69
+ "gripper"
70
+ ],
71
+ "action_feature_names": [
72
+ "shoulder_pan.pos",
73
+ "shoulder_lift.pos",
74
+ "elbow_flex.pos",
75
+ "wrist_flex.pos",
76
+ "wrist_roll.pos",
77
+ "gripper.pos"
78
+ ],
79
+ "rtc_config": null,
80
+ "image_resolution": [
81
+ 224,
82
+ 224
83
+ ],
84
+ "empty_cameras": 0,
85
+ "tokenizer_max_length": 200,
86
+ "normalization_mapping": {
87
+ "ACTION": "QUANTILES",
88
+ "STATE": "QUANTILES",
89
+ "VISUAL": "IDENTITY"
90
+ },
91
+ "gradient_checkpointing": true,
92
+ "compile_model": false,
93
+ "compile_mode": "max-autotune",
94
+ "freeze_vision_encoder": false,
95
+ "train_expert_only": false,
96
+ "optimizer_lr": 2.5e-05,
97
+ "optimizer_betas": [
98
+ 0.9,
99
+ 0.95
100
+ ],
101
+ "optimizer_eps": 1e-08,
102
+ "optimizer_weight_decay": 0.01,
103
+ "optimizer_grad_clip_norm": 1.0,
104
+ "scheduler_warmup_steps": 1000,
105
+ "scheduler_decay_steps": 30000,
106
+ "scheduler_decay_lr": 2.5e-06
107
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4f31dc02c842a4ac9b1acbcef35585744d715e03b911fa091134bbfb466bddd
3
+ size 9354050752
train_config.json ADDED
@@ -0,0 +1,245 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dataset": {
3
+ "repo_id": "justintiensmith/SP_Counting",
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
+ "return_uint8": false,
81
+ "streaming": false
82
+ },
83
+ "env": null,
84
+ "policy": {
85
+ "type": "pi05",
86
+ "n_obs_steps": 1,
87
+ "input_features": {
88
+ "observation.state": {
89
+ "type": "STATE",
90
+ "shape": [
91
+ 6
92
+ ]
93
+ },
94
+ "observation.images.wrist": {
95
+ "type": "VISUAL",
96
+ "shape": [
97
+ 3,
98
+ 480,
99
+ 640
100
+ ]
101
+ },
102
+ "observation.images.middle": {
103
+ "type": "VISUAL",
104
+ "shape": [
105
+ 3,
106
+ 480,
107
+ 640
108
+ ]
109
+ },
110
+ "observation.images.above": {
111
+ "type": "VISUAL",
112
+ "shape": [
113
+ 3,
114
+ 480,
115
+ 640
116
+ ]
117
+ }
118
+ },
119
+ "output_features": {
120
+ "action": {
121
+ "type": "ACTION",
122
+ "shape": [
123
+ 6
124
+ ]
125
+ }
126
+ },
127
+ "device": "cuda",
128
+ "use_amp": false,
129
+ "use_peft": false,
130
+ "push_to_hub": true,
131
+ "repo_id": "justintiensmith/pi05_SP_Counting",
132
+ "private": null,
133
+ "tags": null,
134
+ "license": null,
135
+ "pretrained_path": "lerobot/pi05_base",
136
+ "paligemma_variant": "gemma_2b",
137
+ "action_expert_variant": "gemma_300m",
138
+ "dtype": "bfloat16",
139
+ "chunk_size": 50,
140
+ "n_action_steps": 50,
141
+ "max_state_dim": 32,
142
+ "max_action_dim": 32,
143
+ "num_inference_steps": 10,
144
+ "time_sampling_beta_alpha": 1.5,
145
+ "time_sampling_beta_beta": 1.0,
146
+ "time_sampling_scale": 0.999,
147
+ "time_sampling_offset": 0.001,
148
+ "min_period": 0.004,
149
+ "max_period": 4.0,
150
+ "use_relative_actions": false,
151
+ "relative_exclude_joints": [
152
+ "gripper"
153
+ ],
154
+ "action_feature_names": [
155
+ "shoulder_pan.pos",
156
+ "shoulder_lift.pos",
157
+ "elbow_flex.pos",
158
+ "wrist_flex.pos",
159
+ "wrist_roll.pos",
160
+ "gripper.pos"
161
+ ],
162
+ "rtc_config": null,
163
+ "image_resolution": [
164
+ 224,
165
+ 224
166
+ ],
167
+ "empty_cameras": 0,
168
+ "tokenizer_max_length": 200,
169
+ "normalization_mapping": {
170
+ "ACTION": "QUANTILES",
171
+ "STATE": "QUANTILES",
172
+ "VISUAL": "IDENTITY"
173
+ },
174
+ "gradient_checkpointing": true,
175
+ "compile_model": false,
176
+ "compile_mode": "max-autotune",
177
+ "freeze_vision_encoder": false,
178
+ "train_expert_only": false,
179
+ "optimizer_lr": 2.5e-05,
180
+ "optimizer_betas": [
181
+ 0.9,
182
+ 0.95
183
+ ],
184
+ "optimizer_eps": 1e-08,
185
+ "optimizer_weight_decay": 0.01,
186
+ "optimizer_grad_clip_norm": 1.0,
187
+ "scheduler_warmup_steps": 1000,
188
+ "scheduler_decay_steps": 30000,
189
+ "scheduler_decay_lr": 2.5e-06
190
+ },
191
+ "reward_model": null,
192
+ "output_dir": "/vol/dissolve/justin/outputs/pi05_SP_Counting",
193
+ "job_name": "pi05_SP_Counting",
194
+ "resume": false,
195
+ "seed": 1000,
196
+ "cudnn_deterministic": false,
197
+ "num_workers": 8,
198
+ "batch_size": 16,
199
+ "prefetch_factor": 4,
200
+ "persistent_workers": true,
201
+ "steps": 1000,
202
+ "eval_freq": 20000,
203
+ "log_freq": 200,
204
+ "tolerance_s": 0.0001,
205
+ "save_checkpoint": true,
206
+ "save_freq": 1000,
207
+ "use_policy_training_preset": true,
208
+ "optimizer": {
209
+ "type": "adamw",
210
+ "lr": 2.5e-05,
211
+ "weight_decay": 0.01,
212
+ "grad_clip_norm": 1.0,
213
+ "betas": [
214
+ 0.9,
215
+ 0.95
216
+ ],
217
+ "eps": 1e-08
218
+ },
219
+ "scheduler": {
220
+ "type": "cosine_decay_with_warmup",
221
+ "num_warmup_steps": 1000,
222
+ "num_decay_steps": 30000,
223
+ "peak_lr": 2.5e-05,
224
+ "decay_lr": 2.5e-06
225
+ },
226
+ "eval": {
227
+ "n_episodes": 50,
228
+ "batch_size": 44,
229
+ "use_async_envs": true
230
+ },
231
+ "wandb": {
232
+ "enable": true,
233
+ "disable_artifact": true,
234
+ "project": "lerobot",
235
+ "entity": null,
236
+ "notes": null,
237
+ "run_id": "f03gfnhu",
238
+ "mode": null,
239
+ "add_tags": true
240
+ },
241
+ "peft": null,
242
+ "sample_weighting": null,
243
+ "rename_map": {},
244
+ "checkpoint_path": null
245
+ }