SynthesizeAIWS25 / scripts /download_aiws.py
tancilon's picture
add cameraintrinsics.txt,scripts
0160c62
raw
history blame contribute delete
979 Bytes
"""
Download all files for the SynthesizeAIWS25 dataset using a mainland China mirror by default.
Usage:
uv run python scripts/download_aiws_full.py
Override endpoint (e.g., official HF) if needed:
HF_ENDPOINT=https://huggingface.co uv run python scripts/download_aiws_full.py
"""
import os
from pathlib import Path
from huggingface_hub import snapshot_download
repo_id = "tancilon/SynthesizeAIWS25"
project_root = Path(__file__).resolve().parent.parent
local_dir = project_root / "data" / "SynthesizeAIWS25"
cache_dir = project_root / ".hf_cache"
# Prefer mainland mirror; allow override via HF_ENDPOINT.
hf_endpoint = os.environ.get("HF_ENDPOINT", "https://hf-mirror.com")
local_dir.mkdir(parents=True, exist_ok=True)
cache_dir.mkdir(parents=True, exist_ok=True)
snapshot_download(
repo_id=repo_id,
repo_type="dataset",
local_dir=local_dir,
cache_dir=cache_dir,
local_dir_use_symlinks=False,
max_workers=18,
endpoint=hf_endpoint,
)