Datasets:
Download scripts/prepare_data.sh from hljiang/DA360: direct link, hf CLI and curl.
- Browser
- Download file 998 Bytes
-
https://huggingface.co/datasets/hljiang/DA360/resolve/main/scripts/prepare_data.sh
- Command line
-
hf download hf://datasets/hljiang/DA360/scripts/prepare_data.sh
-
curl -L -o prepare_data.sh https://huggingface.co/datasets/hljiang/DA360/resolve/main/scripts/prepare_data.sh
998 Bytes
| # Download DA360 test benchmarks from Hugging Face and lay out ./data/ for official eval. | |
| set -euo pipefail | |
| REPO_ID="${DA360_HF_DATASET:-hljiang/DA360}" | |
| OUT="${1:-./data}" | |
| if ! command -v python3 >/dev/null 2>&1; then | |
| echo "python3 is required" >&2 | |
| exit 1 | |
| fi | |
| python3 - "$OUT" "$REPO_ID" <<'PY' | |
| import sys | |
| import zipfile | |
| from pathlib import Path | |
| from huggingface_hub import hf_hub_download | |
| out = Path(sys.argv[1]).resolve() | |
| repo = sys.argv[2] | |
| out.mkdir(parents=True, exist_ok=True) | |
| for name in ("Metropolis", "Stanford2D3D", "Matterport3D"): | |
| print(f"Downloading archives/{name}.zip …") | |
| zpath = Path( | |
| hf_hub_download( | |
| repo_id=repo, | |
| repo_type="dataset", | |
| filename=f"archives/{name}.zip", | |
| ) | |
| ) | |
| print(f"Extracting to {out} …") | |
| with zipfile.ZipFile(zpath) as zf: | |
| zf.extractall(out) | |
| print(f"Ready: {out}") | |
| print("Expected: Metropolis/, Matterport3D/, Stanford2D3D/ under that directory.") | |
| PY | |