mattdeitke
commited on
Commit
•
db59e0b
1
Parent(s):
99998f9
load_annotations -> get_annotations
Browse files- objaverse_xl/abstract.py +2 -2
- objaverse_xl/github.py +2 -2
- objaverse_xl/objaverse_v1.py +2 -2
- objaverse_xl/smithsonian.py +4 -2
- objaverse_xl/thingiverse.py +4 -3
objaverse_xl/abstract.py
CHANGED
@@ -6,7 +6,7 @@ from typing import Optional, Callable
|
|
6 |
|
7 |
class ObjaverseSource(ABC):
|
8 |
@abstractmethod
|
9 |
-
def
|
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 `
|
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
|
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
|
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
|
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 `
|
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 |
-
|
|
|
|
|
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 `
|
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
|
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 |
-
|
251 |
-
|
|
|
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
|