Download scripts/common/dataset_labels.py from xiaohaoy/ViewingSoundPAQ: direct link, hf CLI and curl.
- Browser
- Download file 1.6 kB
-
https://huggingface.co/xiaohaoy/ViewingSoundPAQ/resolve/main/scripts/common/dataset_labels.py
- Command line
-
hf download hf://xiaohaoy/ViewingSoundPAQ/scripts/common/dataset_labels.py
-
curl -L -o dataset_labels.py https://huggingface.co/xiaohaoy/ViewingSoundPAQ/resolve/main/scripts/common/dataset_labels.py
1.6 kB
| """Dataset label aliases used for training and scoring (levels, pairing and splits are untouched). | |
| michigan = local_ann_arbor_detroit + seasonal_local (user decision 2026-11-12). Each keeps its own level | |
| correction, and seasonal stays training-only, so validation/test rows are unchanged; only per-dataset | |
| scores, dataset-mean baselines and sampling weights see one 'michigan' dataset. | |
| The original label is kept in column original_training_dataset. | |
| """ | |
| import sys as _sys | |
| from pathlib import Path as _Path | |
| _SCRIPTS = next(_p for _p in _Path(__file__).resolve().parents if _p.name == "scripts") | |
| _sys.path[:0] = [str(_SCRIPTS.parent), str(_SCRIPTS.parent / "models")] + [str(_d) for _d in sorted(_SCRIPTS.rglob("*")) if _d.is_dir() and _d.name != "__pycache__"] | |
| # Datasets left out of training AND scoring by default (override with --exclude-dataset). | |
| # binaural_perception_outdoor: user decision 2026-11-12 (lowest score; only 24% of target variance between | |
| # scenes, static camera with near-identical frames, place-oracle ceiling 0.37). | |
| DEFAULT_EXCLUDED = ["supplied_sipset", "binaural_perception_outdoor", "qoevave_outdoor"] | |
| ALIASES = {"local_ann_arbor_detroit": "michigan", "seasonal_local": "michigan"} | |
| def apply_aliases(frame, enabled=True): | |
| # Own column name: manifests already carry an unrelated, partly empty "source_dataset" column. | |
| if "original_training_dataset" not in frame: | |
| frame["original_training_dataset"] = frame["training_dataset"].astype(str) | |
| if enabled: | |
| frame["training_dataset"] = frame["original_training_dataset"].replace(ALIASES) | |
| return frame | |