File size: 998 Bytes
9df3263
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env bash
# 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