Datasets:

Languages:
English
ArXiv:
License:
mattdeitke commited on
Commit
db59e0b
1 Parent(s): 99998f9

load_annotations -> get_annotations

Browse files
objaverse_xl/abstract.py CHANGED
@@ -6,7 +6,7 @@ from typing import Optional, Callable
6
 
7
  class ObjaverseSource(ABC):
8
  @abstractmethod
9
- def load_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
10
  """Loads the 3D object metadata as a Pandas DataFrame.
11
 
12
  Args:
@@ -35,7 +35,7 @@ class ObjaverseSource(ABC):
35
 
36
  Args:
37
  objects (pd.DataFrame): Objects to download. Must have columns for
38
- the object "fileIdentifier" and "sha256". Use the `load_annotations`
39
  function to get the metadata.
40
  processes (Optional[int], optional): Number of processes to use for
41
  downloading. If None, will use the number of CPUs on the machine.
 
6
 
7
  class ObjaverseSource(ABC):
8
  @abstractmethod
9
+ def get_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
10
  """Loads the 3D object metadata as a Pandas DataFrame.
11
 
12
  Args:
 
35
 
36
  Args:
37
  objects (pd.DataFrame): Objects to download. Must have columns for
38
+ the object "fileIdentifier" and "sha256". Use the `get_annotations`
39
  function to get the metadata.
40
  processes (Optional[int], optional): Number of processes to use for
41
  downloading. If None, will use the number of CPUs on the machine.
objaverse_xl/github.py CHANGED
@@ -37,7 +37,7 @@ FILE_EXTENSIONS = [
37
  class GitHubDownloader(ObjaverseSource):
38
  """Script to download objects from GitHub."""
39
 
40
- def load_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
41
  """Loads the GitHub 3D object metadata as a Pandas DataFrame.
42
 
43
  Args:
@@ -404,7 +404,7 @@ class GitHubDownloader(ObjaverseSource):
404
 
405
  Args:
406
  objects (pd.DataFrame): GitHub objects to download. Must have columns for
407
- the object "fileIdentifier" and "sha256". Use the load_github_metadata
408
  function to get the metadata.
409
  download_dir (str, optional): Directory to download the GitHub objects to.
410
  Supports all file systems supported by fsspec. Defaults to
 
37
  class GitHubDownloader(ObjaverseSource):
38
  """Script to download objects from GitHub."""
39
 
40
+ def get_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
41
  """Loads the GitHub 3D object metadata as a Pandas DataFrame.
42
 
43
  Args:
 
404
 
405
  Args:
406
  objects (pd.DataFrame): GitHub objects to download. Must have columns for
407
+ the object "fileIdentifier" and "sha256". Use the `get_annotations`
408
  function to get the metadata.
409
  download_dir (str, optional): Directory to download the GitHub objects to.
410
  Supports all file systems supported by fsspec. Defaults to
objaverse_xl/objaverse_v1.py CHANGED
@@ -21,7 +21,7 @@ from tqdm import tqdm
21
  class SketchfabDownloader(ObjaverseSource):
22
  """A class for downloading and processing Objaverse 1.0."""
23
 
24
- def load_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
25
  """Load the annotations from the given directory.
26
 
27
  Args:
@@ -333,7 +333,7 @@ class SketchfabDownloader(ObjaverseSource):
333
 
334
  Args:
335
  objects (pd.DataFrame): Objects to download. Must have columns for
336
- the object "fileIdentifier" and "sha256". Use the `load_annotations`
337
  function to get the metadata.
338
  download_dir (Optional[str], optional): The base directory to download the
339
  object to. Supports all file systems supported by fsspec. If None, the
 
21
  class SketchfabDownloader(ObjaverseSource):
22
  """A class for downloading and processing Objaverse 1.0."""
23
 
24
+ def get_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
25
  """Load the annotations from the given directory.
26
 
27
  Args:
 
333
 
334
  Args:
335
  objects (pd.DataFrame): Objects to download. Must have columns for
336
+ the object "fileIdentifier" and "sha256". Use the `get_annotations`
337
  function to get the metadata.
338
  download_dir (Optional[str], optional): The base directory to download the
339
  object to. Supports all file systems supported by fsspec. If None, the
objaverse_xl/smithsonian.py CHANGED
@@ -17,7 +17,9 @@ from objaverse_xl.abstract import ObjaverseSource
17
 
18
 
19
  class SmithsonianDownloader(ObjaverseSource):
20
- def load_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
 
 
21
  """Loads the Smithsonian Object Metadata dataset as a Pandas DataFrame.
22
 
23
  Args:
@@ -188,7 +190,7 @@ class SmithsonianDownloader(ObjaverseSource):
188
 
189
  Args:
190
  objects (pd.DataFrmae): Objects to download. Must have columns for
191
- the object "fileIdentifier" and "sha256". Use the `load_annotations`
192
  function to get the metadata.
193
  download_dir (Optional[str], optional): Directory to download the
194
  Smithsonian Objects to. Supports all file systems supported by fsspec.
 
17
 
18
 
19
  class SmithsonianDownloader(ObjaverseSource):
20
+ """Script to download objects from the Smithsonian Institute."""
21
+
22
+ def get_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
23
  """Loads the Smithsonian Object Metadata dataset as a Pandas DataFrame.
24
 
25
  Args:
 
190
 
191
  Args:
192
  objects (pd.DataFrmae): Objects to download. Must have columns for
193
+ the object "fileIdentifier" and "sha256". Use the `get_annotations`
194
  function to get the metadata.
195
  download_dir (Optional[str], optional): Directory to download the
196
  Smithsonian Objects to. Supports all file systems supported by fsspec.
objaverse_xl/thingiverse.py CHANGED
@@ -19,7 +19,7 @@ from tqdm import tqdm
19
  class ThingiverseDownloader(ObjaverseSource):
20
  """Script to download objects from Thingiverse."""
21
 
22
- def load_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
23
  """Load the annotations from the given directory.
24
 
25
  Args:
@@ -247,8 +247,9 @@ class ThingiverseDownloader(ObjaverseSource):
247
  """Download the objects from the given list of things and files.
248
 
249
  Args:
250
- file_ids (Optional[List[str]]): The list of file IDs to download. If None,
251
- downloads all files. Defaults to None.
 
252
  processes (int, optional): The number of processes to use. If None, maps to
253
  use all available CPUs using multiprocessing.cpu_count(). Defaults to None.
254
  download_dir (str, optional): The directory to save the files to. Supports all
 
19
  class ThingiverseDownloader(ObjaverseSource):
20
  """Script to download objects from Thingiverse."""
21
 
22
+ def get_annotations(self, download_dir: str = "~/.objaverse") -> pd.DataFrame:
23
  """Load the annotations from the given directory.
24
 
25
  Args:
 
247
  """Download the objects from the given list of things and files.
248
 
249
  Args:
250
+ objects (pd.DataFrame): Thingiverse objects to download. Must have columns
251
+ for the object "fileIdentifier" and "sha256". Use the `get_annotations`
252
+ function to get the metadata.
253
  processes (int, optional): The number of processes to use. If None, maps to
254
  use all available CPUs using multiprocessing.cpu_count(). Defaults to None.
255
  download_dir (str, optional): The directory to save the files to. Supports all