HI commited on
README: bundle contents incl. actaug dataset + config
Browse files
README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# transfer — pi0.5 VACE object-swap training bundle
|
| 2 |
+
|
| 3 |
+
Everything needed to train the **pi0.5** policy on the VACE object-swap augmented
|
| 4 |
+
RoboCasa PickPlaceCounterToCabinet dataset (8 "hard mesh" neg-mesh objects swapped in),
|
| 5 |
+
on 2× A100-80GB.
|
| 6 |
+
|
| 7 |
+
## Contents
|
| 8 |
+
|
| 9 |
+
| path | what it is | size |
|
| 10 |
+
|---|---|---|
|
| 11 |
+
| `code/openpi/` | training codebase (RoboCasa fork of Physical Intelligence `openpi`), trimmed of checkpoints/.git | ~code only |
|
| 12 |
+
| `dataset/lerobot_swap_negmesh256/` | the training dataset — 256 episodes (8 objects × 32), GR00T-LeRobot format. Videos are VACE object-swapped; **state/action/timestamps are byte-identical to the source robocasa episodes**; instructions name the swapped object. | 774 MB |
|
| 13 |
+
| `dataset/lerobot_actaug256_prio/` | **simulator action-augmentation dataset** — 256 episodes (8 SAM3D targets × 32), same LeRobot format; object swapped to the SAM3D mesh with CoACD hulls at GT scale, base/arm replayed, wrist+gripper re-grasped by the 60k policy, successes only, base-static. See `actaug/README.md`. | ~300 MB |
|
| 14 |
+
| `actaug/` | the action-augmentation **generation code**, the **eval protocol** (Table-2 exact-replay bank + driver) and the raw dumps of the 256 episodes | ~340 MB |
|
| 15 |
+
|
| 16 |
+
pi0.5 **init weights are NOT bundled** — the config's `weight_loader` auto-downloads `pi05_base` from
|
| 17 |
+
`gs://openpi-assets/checkpoints/pi05_base/params` on first run (needs internet/GCS), or point it at a local copy.
|
| 18 |
+
| `code/openpi/assets/pi0_fast_robocasa_pretrain_human300/robocasa365_human300/norm_stats.json` | **normalization stats** the config uses (state/action). Required. | tiny |
|
| 19 |
+
| `INSTALL.md` | environment setup | — |
|
| 20 |
+
|
| 21 |
+
## Train
|
| 22 |
+
|
| 23 |
+
To train on the action-augmentation dataset instead, use config
|
| 24 |
+
`pi05_robocasa_target_PickPlaceCounterToCabinet_actaug256` (same hyper-parameters; see `actaug/README.md`).
|
| 25 |
+
|
| 26 |
+
The config is already registered as `pi05_robocasa_target_PickPlaceCounterToCabinet_vace_negmesh`
|
| 27 |
+
in `code/openpi/src/openpi/training/config.py` (full fine-tune, EMA on, nothing frozen,
|
| 28 |
+
batch 64, 30k steps, cosine LR peak 2.5e-5 → 2.5e-6 over 30k, warmup 1k).
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
cd code/openpi
|
| 32 |
+
# init weights: the config's weight_loader auto-downloads pi05_base from gs://openpi-assets on first
|
| 33 |
+
# run (needs internet/GCS). To use a local copy instead, place it at
|
| 34 |
+
# ~/.cache/openpi/openpi-assets/checkpoints/pi05_base/params
|
| 35 |
+
# or edit the weight_loader path in the config entry.
|
| 36 |
+
|
| 37 |
+
# point the config's data_dir at wherever you unpacked the dataset (edit the "path" in the
|
| 38 |
+
# pi05_...vace_negmesh entry of src/openpi/training/config.py if it differs from the bundled path)
|
| 39 |
+
|
| 40 |
+
XLA_PYTHON_CLIENT_MEM_FRACTION=0.9 python scripts/train.py \
|
| 41 |
+
pi05_robocasa_target_PickPlaceCounterToCabinet_vace_negmesh \
|
| 42 |
+
--exp-name=vace_negmesh_bs64_30k \
|
| 43 |
+
--batch-size=64 --num-train-steps=30000
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
- 2× A100-80GB, data-parallel (`fsdp_devices=1`), **no gradient accumulation**. Peak ~69 GiB/GPU.
|
| 47 |
+
- ETA ≈ **31 h** for 30k @ bs64 (~3.6 s/step). bs32 ≈ 16 h.
|
| 48 |
+
- Checkpoints save every 2500 steps under `code/openpi/checkpoints/<config>/<exp-name>/`.
|
| 49 |
+
|
| 50 |
+
## IMPORTANT: modality.json (state/action ordering)
|
| 51 |
+
|
| 52 |
+
`dataset/.../meta/modality.json` is **required** and is already correct — do not drop it.
|
| 53 |
+
The ordering chain is subtle:
|
| 54 |
+
|
| 55 |
+
1. Raw parquet `observation.state` (16) / `action` (12) are **base-first**
|
| 56 |
+
`[base_pos, base_rot, eef_pos, eef_rot, gripper]` (they come from the robocasa hdf5).
|
| 57 |
+
2. `modality.json` is a **name→raw-slice lookup** (`base_position:[0:3]`, `end_effector_position:[5:8]`, …).
|
| 58 |
+
It does **not** by itself reorder; its key order is ignored by the openpi loader.
|
| 59 |
+
3. The exported loader `groot_openpi_dataset.GrootOpenpiSingleDataset.__getitem__` **hardcodes**
|
| 60 |
+
the assembly into **arm-first**:
|
| 61 |
+
- state = `[eef_pos, eef_rot, base_pos, base_rot, gripper]`
|
| 62 |
+
- action = `[eef_pos, eef_rot, gripper, base_motion, control_mode]`
|
| 63 |
+
4. `norm_stats` were computed through this **same** loader (see `scripts/compute_norm_stats_robocasa.py`),
|
| 64 |
+
so training/inference are consistent **arm-first**.
|
| 65 |
+
|
| 66 |
+
Net: keep `modality.json` and `norm_stats.json` as shipped; the model expects **arm-first**, and this
|
| 67 |
+
bundle already produces exactly that. If you serve/eval through a **native GR00T** loader (which
|
| 68 |
+
assembles by modality.json *key order*), reorder the keys to arm-first — but for the openpi path here
|
| 69 |
+
it is already correct.
|
| 70 |
+
|
| 71 |
+
## Provenance
|
| 72 |
+
- Dataset built by `vace_swap_negmesh/build_swap_dataset.py` (stitches 81-frame/stride-80 VACE
|
| 73 |
+
segments → full-length per-cam mp4 @20fps, h264/yuv420p, frame-exact to the parquet; copies
|
| 74 |
+
actions/states verbatim; instruction = swapped object name).
|
| 75 |
+
- Validated: 256 contiguous episodes, 768 videos (decode-count == parquet length), action/state order
|
| 76 |
+
== model-expected (arm-first, exact-equality checked), 2-GPU bs64 smoke trained + checkpointed clean.
|