Download dataset/baselines.py from LLDDSS/Stereo_Depth: direct link, hf CLI and curl.
- Browser
- Download file 925 Bytes
-
https://huggingface.co/LLDDSS/Stereo_Depth/resolve/main/dataset/baselines.py
- Command line
-
hf download hf://LLDDSS/Stereo_Depth/dataset/baselines.py
-
curl -L -o baselines.py https://huggingface.co/LLDDSS/Stereo_Depth/resolve/main/dataset/baselines.py
925 Bytes
| """Canonical naming for the stereo baselines swept in this experiment. | |
| The generated views are stored under directory names that are NOT spelled | |
| consistently across the tree ("0.10" vs "0.2"), and the annotation files use a | |
| third spelling again ("0.20" for the correspondence, "0.2" for the image). All | |
| of that is normalised here to a single canonical key: the baseline formatted | |
| with two decimals ("0.00", "0.05", "0.10", "0.15", "0.20", "0.25"), which is | |
| also what the result directories and the analysis are keyed by. | |
| """ | |
| BASELINES = ["0.00", "0.05", "0.10", "0.15", "0.20", "0.25"] | |
| def canonical(baseline): | |
| """Any spelling of a baseline ("0", 0.2, "0.20", "0.2/") -> "0.20".""" | |
| return f"{float(str(baseline).strip().strip('/')):.2f}" | |
| def by_baseline(mapping): | |
| """Re-key a {baseline_spelling: value} dict by the canonical baseline.""" | |
| return {canonical(key): value for key, value in mapping.items()} | |