ellisbrown commited on
Commit
9087d8d
·
verified ·
1 Parent(s): 4cabe1f

Update unpack.py

Browse files
Files changed (1) hide show
  1. unpack.py +12 -12
unpack.py CHANGED
@@ -1,6 +1,6 @@
1
  #!/usr/bin/env python3
2
  """
3
- Download and unpack the objaverse_vida dataset from HuggingFace.
4
 
5
  This script downloads the dataset and extracts all tar archives to restore
6
  the original directory structure expected by downstream consumers.
@@ -9,8 +9,8 @@ Usage:
9
  python unpack.py [target_directory]
10
 
11
  Example:
12
- python unpack.py ./objaverse_vida
13
- python unpack.py /data/datasets/objaverse_vida
14
  """
15
 
16
  import os
@@ -19,7 +19,7 @@ import tarfile
19
  from pathlib import Path
20
 
21
 
22
- def unpack_dataset(target_dir: str = "./objaverse_vida"):
23
  """Download and unpack the dataset to the target directory."""
24
 
25
  # Import here to give helpful error if not installed
@@ -40,7 +40,7 @@ def unpack_dataset(target_dir: str = "./objaverse_vida"):
40
  print("\n[1/3] Downloading dataset from HuggingFace...")
41
  print(" (This may take a while for ~30GB)")
42
  snapshot_download(
43
- repo_id="spatial-training/objaverse_vida",
44
  repo_type="dataset",
45
  local_dir=str(target),
46
  local_dir_use_symlinks=False
@@ -48,7 +48,7 @@ def unpack_dataset(target_dir: str = "./objaverse_vida"):
48
  print(" Done!")
49
 
50
  # Unpack processed shards
51
- processed_dir = target / "processed_2023_07_28"
52
  if processed_dir.exists():
53
  print("\n[2/3] Unpacking processed objects...")
54
  shards = sorted(processed_dir.glob("shard_*.tar"))
@@ -68,7 +68,7 @@ def unpack_dataset(target_dir: str = "./objaverse_vida"):
68
  print("\n[2/3] Skipping processed objects (directory not found)")
69
 
70
  # Unpack houses individual files
71
- houses_dir = target / "houses_2023_07_28"
72
  if houses_dir.exists():
73
  print("\n[3/3] Unpacking house files...")
74
  for split in ["train", "test", "val"]:
@@ -90,10 +90,10 @@ def unpack_dataset(target_dir: str = "./objaverse_vida"):
90
  print("=" * 60)
91
  print(f"\nLocation: {target}")
92
  print("\nStructure:")
93
- print(" processed_2023_07_28/ - ~40K 3D object directories")
94
- print(" houses_2023_07_28/ - train/test/val house layouts")
95
- print(" procthor_databases_2023_07_28/ - asset databases")
96
- print(" 0.json - sample house")
97
 
98
 
99
  def main():
@@ -103,7 +103,7 @@ def main():
103
  sys.exit(0)
104
  target = sys.argv[1]
105
  else:
106
- target = "./objaverse_vida"
107
 
108
  unpack_dataset(target)
109
 
 
1
  #!/usr/bin/env python3
2
  """
3
+ Download and unpack the objaverse_sims dataset from HuggingFace.
4
 
5
  This script downloads the dataset and extracts all tar archives to restore
6
  the original directory structure expected by downstream consumers.
 
9
  python unpack.py [target_directory]
10
 
11
  Example:
12
+ python unpack.py ./objaverse_sims
13
+ python unpack.py /data/datasets/objaverse_sims
14
  """
15
 
16
  import os
 
19
  from pathlib import Path
20
 
21
 
22
+ def unpack_dataset(target_dir: str = "./objaverse_sims"):
23
  """Download and unpack the dataset to the target directory."""
24
 
25
  # Import here to give helpful error if not installed
 
40
  print("\n[1/3] Downloading dataset from HuggingFace...")
41
  print(" (This may take a while for ~30GB)")
42
  snapshot_download(
43
+ repo_id="ellisbrown/objaverse_sims",
44
  repo_type="dataset",
45
  local_dir=str(target),
46
  local_dir_use_symlinks=False
 
48
  print(" Done!")
49
 
50
  # Unpack processed shards
51
+ processed_dir = target / "processed"
52
  if processed_dir.exists():
53
  print("\n[2/3] Unpacking processed objects...")
54
  shards = sorted(processed_dir.glob("shard_*.tar"))
 
68
  print("\n[2/3] Skipping processed objects (directory not found)")
69
 
70
  # Unpack houses individual files
71
+ houses_dir = target / "houses"
72
  if houses_dir.exists():
73
  print("\n[3/3] Unpacking house files...")
74
  for split in ["train", "test", "val"]:
 
90
  print("=" * 60)
91
  print(f"\nLocation: {target}")
92
  print("\nStructure:")
93
+ print(" processed/ - ~40K 3D object directories")
94
+ print(" houses/ - train/test/val house layouts")
95
+ print(" procthor_databases/ - asset databases")
96
+ print(" 0.json - sample house")
97
 
98
 
99
  def main():
 
103
  sys.exit(0)
104
  target = sys.argv[1]
105
  else:
106
+ target = "./objaverse_sims"
107
 
108
  unpack_dataset(target)
109