tancilon commited on
Commit
0160c62
·
1 Parent(s): 8bfc2cd

add cameraintrinsics.txt,scripts

Browse files
cameraintrinsics.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ fx: 577.5
2
+ fy: 577.5
3
+ cx: 319.5
4
+ cy: 239.5
5
+ width: 640
6
+ height: 480
scripts/download_aiws.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Download all files for the SynthesizeAIWS25 dataset using a mainland China mirror by default.
3
+
4
+ Usage:
5
+ uv run python scripts/download_aiws_full.py
6
+ Override endpoint (e.g., official HF) if needed:
7
+ HF_ENDPOINT=https://huggingface.co uv run python scripts/download_aiws_full.py
8
+ """
9
+
10
+ import os
11
+ from pathlib import Path
12
+
13
+ from huggingface_hub import snapshot_download
14
+
15
+
16
+ repo_id = "tancilon/SynthesizeAIWS25"
17
+
18
+ project_root = Path(__file__).resolve().parent.parent
19
+ local_dir = project_root / "data" / "SynthesizeAIWS25"
20
+ cache_dir = project_root / ".hf_cache"
21
+
22
+ # Prefer mainland mirror; allow override via HF_ENDPOINT.
23
+ hf_endpoint = os.environ.get("HF_ENDPOINT", "https://hf-mirror.com")
24
+
25
+ local_dir.mkdir(parents=True, exist_ok=True)
26
+ cache_dir.mkdir(parents=True, exist_ok=True)
27
+
28
+ snapshot_download(
29
+ repo_id=repo_id,
30
+ repo_type="dataset",
31
+ local_dir=local_dir,
32
+ cache_dir=cache_dir,
33
+ local_dir_use_symlinks=False,
34
+ max_workers=18,
35
+ endpoint=hf_endpoint,
36
+ )
scripts/unpack_dataset.py CHANGED
@@ -26,6 +26,16 @@ def extract_archive(archive: Path, dest: Path, *, dry_run: bool) -> None:
26
  print(f"extracted {archive} -> {dest}")
27
 
28
 
 
 
 
 
 
 
 
 
 
 
29
  def main() -> int:
30
  parser = argparse.ArgumentParser(
31
  description="Extract tar archives under train/ and val/ directories."
@@ -59,6 +69,11 @@ def main() -> int:
59
  for archive in archives:
60
  extract_archive(archive, archive.parent, dry_run=args.dry_run)
61
 
 
 
 
 
 
62
  return 0
63
 
64
 
 
26
  print(f"extracted {archive} -> {dest}")
27
 
28
 
29
+ def remove_dot_underscore_files(root: Path) -> None:
30
+ """Remove macOS resource fork files like ._foo."""
31
+ for path in root.rglob("._*"):
32
+ try:
33
+ path.unlink()
34
+ print(f"removed {path}")
35
+ except FileNotFoundError:
36
+ continue
37
+
38
+
39
  def main() -> int:
40
  parser = argparse.ArgumentParser(
41
  description="Extract tar archives under train/ and val/ directories."
 
69
  for archive in archives:
70
  extract_archive(archive, archive.parent, dry_run=args.dry_run)
71
 
72
+ if not args.dry_run:
73
+ for target in targets:
74
+ if target.is_dir():
75
+ remove_dot_underscore_files(target)
76
+
77
  return 0
78
 
79