sra-trajectory-data / README.md
po03087's picture
Document LED pretrained-core requirement
63bd9ee verified
|
Raw
History Blame Contribute Delete
4.11 kB
# SRA — preprocessed data for MID / LED / MoFlow
All arrays are `float32`, layout `(scenes, frames, agents, xy)`, 30 frames @ 5 Hz
= **10 past + 20 future** (4.0 s horizon).
```
nba/original/nba_train.npy (32500, 30, 11, 2) 85.8 MB
nba/original/nba_test.npy (12500, 30, 11, 2) 33.0 MB
sport/soccer/train.npy (7164, 30, 23, 2) 79.1 MB
sport/soccer/val.npy (1785, 30, 23, 2) 19.7 MB
sport/football/train.npy (37859, 30, 23, 2) 209.0 MB
sport/football/val.npy (1000, 30, 23, 2) 5.5 MB
LED_pretrained_core/base_diffusion_model.p 63.2 MB # NBA
LED_pretrained_core/base_diffusion_model_football.p 26.4 MB # football
LED_pretrained_core/base_diffusion_model_soccer_psnorm.p 26.4 MB # soccer (used by cfg)
LED_pretrained_core/base_diffusion_model_soccer.p 26.4 MB # soccer (older, non-psnorm)
```
## ⚠️ LED additionally requires a pretrained core denoising model
**MID and MoFlow train from scratch — the `.npy` files are all they need.**
**LED does not.** Its leapfrog design trains an initializer on top of a *frozen, pretrained
diffusion core*, and both `trainer/train_led_graph.py` and `trainer/train_sport_led.py` hard-load
it (`torch.load(...)``model.load_state_dict(cp['model_dict'])`). Training will crash without it.
Install to `LED/results/checkpoints/`, keeping the exact filenames — the paths are baked into the
configs:
```bash
mkdir -p LED/results/checkpoints
cp LED_pretrained_core/*.p LED/results/checkpoints/
```
| Config | expects |
|---|---|
| `cfg/nba/led_augment.yml` | `./results/checkpoints/base_diffusion_model.p` |
| `cfg/sport/football.yml` | `./results/checkpoints/base_diffusion_model_football.p` |
| `cfg/sport/soccer.yml` | `./results/checkpoints/base_diffusion_model_soccer_psnorm.p` |
Each checkpoint contains `model_dict` (94 tensors) — verified loadable.
> Two soccer cores are included. The configs use the **`_psnorm`** one; `base_diffusion_model_soccer.p`
> is an earlier non-psnorm core kept for reference. They are **not** interchangeable — swapping
> them changes the LED-soccer baseline.
**All three hosts (MID, LED, MoFlow) use the same NBA scenes: 32 500 train / 12 500 test.**
> Note: the LED repo ships a larger raw `nba_train.npy` / `nba_test.npy` (40 000 / 47 940 scenes),
> but `LED/data/dataloader_nba.py` slices `[:32500]` / `[:12500]`, and those slices are
> **byte-identical** to the files here (verified: `maxdiff = 0.0`). The extra scenes are never
> used, so the files below are sufficient for all three hosts.
The evaluation set for every reported NBA number is the **12 500**-scene test split
(matches the E5 per-scene counts: 12 500 NBA / 1 785 soccer / 1 000 football).
## Where to put it
| Host | Dataset | Install to | Pass as |
|---|---|---|---|
| MoFlow | NBA | `MoFlow/data/nba/original/` | `--data_dir ./data/nba` ¹ |
| MID | NBA | reuse the same copy | `--data_dir <…>/nba/original` ² |
| LED | NBA | copy into `LED/data/files/` | path is hardcoded ³ |
| MoFlow / MID | soccer, football | anywhere | `--data_dir <…>/sport/football` |
| LED | soccer, football | anywhere | set `data_dir` in the YAML ⁴ |
¹ MoFlow's NBA loader appends `original/` itself — point `--data_dir` at the **parent**.
² MID's NBA script takes the `original/` directory **directly** (opposite convention to MoFlow).
³ `LED/data/dataloader_nba.py` hardcodes `./data/files/nba_{train,test}.npy`, so copy the two
NBA files there and launch from the `LED/` directory:
`mkdir -p LED/data/files && cp nba/original/nba_*.npy LED/data/files/`
LED also rescales internally by `94/28` — do not pre-scale the files.
⁴ LED sport reads `data_dir` from `LED/cfg/sport/{soccer,football}.yml`, not the CLI.
Sport loaders expect `train.npy` and `val.npy` in the given directory.
## Provenance
NBA: player-tracking (SportVU) data as preprocessed by prior trajectory-prediction work.
Soccer / football: multi-agent sports tracking data (23 agents). Consult the original data
sources for licensing and terms of use before redistributing.