refresh the published scripts and USAGE.md from the repo
Browse files
USAGE.md
CHANGED
|
@@ -310,6 +310,7 @@ assume a rate.
|
|
| 310 |
| `toolbox/synth_actions.py` | generate the synthetic single-axis probes |
|
| 311 |
| `toolbox/probe_eval.py` | project ground truth, overlay it, score a rollout |
|
| 312 |
| `toolbox/world_frame.py` | declare and verify which world frame a pose array is in |
|
|
|
|
| 313 |
| `toolbox/splits.py` | build / read the held-out interval split |
|
| 314 |
| `toolbox/calib_epoch.py` | which calibration epoch and world transform a session uses |
|
| 315 |
|
|
@@ -340,6 +341,70 @@ So **agreement within about 6 px is as good as this rig can tell.** Do not read
|
|
| 340 |
a 3 px difference as a result. `rollout_error` gives millimetres *and* pixels,
|
| 341 |
because the same millimetre is more pixels up close.
|
| 342 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 343 |
## 7. Known problems, stated rather than hidden
|
| 344 |
|
| 345 |
**2026-05-19's world frame.** Its OptiTrack calibration was re-run
|
|
|
|
| 310 |
| `toolbox/synth_actions.py` | generate the synthetic single-axis probes |
|
| 311 |
| `toolbox/probe_eval.py` | project ground truth, overlay it, score a rollout |
|
| 312 |
| `toolbox/world_frame.py` | declare and verify which world frame a pose array is in |
|
| 313 |
+
| `toolbox/conformance.py` | check **your** poses against this release's conventions — see §6b |
|
| 314 |
| `toolbox/splits.py` | build / read the held-out interval split |
|
| 315 |
| `toolbox/calib_epoch.py` | which calibration epoch and world transform a session uses |
|
| 316 |
|
|
|
|
| 341 |
a 3 px difference as a result. `rollout_error` gives millimetres *and* pixels,
|
| 342 |
because the same millimetre is more pixels up close.
|
| 343 |
|
| 344 |
+
## 6b. Checking your own usage
|
| 345 |
+
|
| 346 |
+
Every other test here validates the dataset. This one validates *your* use of
|
| 347 |
+
it, which is the half that goes wrong. The data can be perfect and still be
|
| 348 |
+
read in millimetres, or with `w` first, or paired with extrinsics from the
|
| 349 |
+
other up-axis. **None of those raise.** They shift every projection and leave
|
| 350 |
+
your own self-consistency checks green, because the same wrong assumption both
|
| 351 |
+
draws and re-verifies.
|
| 352 |
+
|
| 353 |
+
```
|
| 354 |
+
python -m react_toolbox.conformance --release data/motherboard \
|
| 355 |
+
--task motherboard --episode 2026-05-10/episode_000
|
| 356 |
+
```
|
| 357 |
+
|
| 358 |
+
```
|
| 359 |
+
conformance: PASS
|
| 360 |
+
ok quaternion norm deviates by at most 2.22e-16 from 1
|
| 361 |
+
ok median |position| = 0.435; expected metres, not millimetres
|
| 362 |
+
ok 6890 poses given, episode has 6890 valid rows
|
| 363 |
+
ok worst-camera fingerprint error 0.00 px (tolerance 6)
|
| 364 |
+
would read: other up-axis 364 px, quaternion as wxyz 55 px
|
| 365 |
+
```
|
| 366 |
+
|
| 367 |
+
Exit code 0 on pass, 1 on failure, so it drops into CI. Pass `--poses my.npy`
|
| 368 |
+
to check an array your own pipeline produced, or call `check_poses(...)` and
|
| 369 |
+
read `Report.failures`.
|
| 370 |
+
|
| 371 |
+
**A passing report still prints what each mistake would have read.** A
|
| 372 |
+
validator that only ever says "ok" tells you nothing about whether it *can*
|
| 373 |
+
say anything else.
|
| 374 |
+
|
| 375 |
+
### Is there a standard process for this?
|
| 376 |
+
|
| 377 |
+
Yes, and it has a name: a **conformance suite** over a **golden fixture**. The
|
| 378 |
+
same shape appears in
|
| 379 |
+
[BIDS](https://bids-standard.github.io/bids-validator/) for neuroimaging,
|
| 380 |
+
[Frictionless](https://framework.frictionlessdata.io/) for tabular data, and
|
| 381 |
+
[Croissant](https://mlcommons.org/croissant/) for ML dataset metadata. Four
|
| 382 |
+
parts, and where each one lives here:
|
| 383 |
+
|
| 384 |
+
| part | here |
|
| 385 |
+
|---|---|
|
| 386 |
+
| **1. Machine-readable declaration** of every convention | `up_axis` in each calibration JSON and in each parquet's `twm.world_frame` |
|
| 387 |
+
| **2. Golden values** the consumer recomputes | the projection fingerprint in that same blob — stored pixels you reproduce from your own poses |
|
| 388 |
+
| **3. A validator the consumer runs on their own code** | `python -m react_toolbox.conformance` |
|
| 389 |
+
| **4. Negative controls** — it must fail when you are wrong | printed on every report, and asserted by `scripts/test_conformance.py` |
|
| 390 |
+
|
| 391 |
+
Part 4 is the one usually skipped, and it is the one that matters. This
|
| 392 |
+
project shipped a self-consistency check that returned `0.0` for every input,
|
| 393 |
+
and an overlay test that was 153 px wrong with all its checks green. A check
|
| 394 |
+
nobody has watched fail is not evidence.
|
| 395 |
+
|
| 396 |
+
So `test_conformance.py` feeds the checker each classic mistake and requires
|
| 397 |
+
it to object, by name: millimetres, `wxyz`, the recorded Y-up convention,
|
| 398 |
+
unnormalised quaternions, and a row subset. Measured, those read 11,732 px,
|
| 399 |
+
55 px, 364 px, a norm error of 0.4, and 10.4 px respectively — against 0.00 px
|
| 400 |
+
for correct input.
|
| 401 |
+
|
| 402 |
+
That last one is not a mistake in your data, it is a mistake in how you *call*
|
| 403 |
+
the checker: the fingerprint is a median over the whole episode, so a subset
|
| 404 |
+
shifts it by real motion. The checker refuses the subset instead of reporting
|
| 405 |
+
a frame error that is not there. Pass `rows=` with your indices and it
|
| 406 |
+
compares row-wise against the release instead.
|
| 407 |
+
|
| 408 |
## 7. Known problems, stated rather than hidden
|
| 409 |
|
| 410 |
**2026-05-19's world frame.** Its OptiTrack calibration was re-run
|