nerfacto experiments code

This commit is contained in:
Ethan Weber committed 2023-01-09 23:19:05 +00:00
1 parent 8fd7ea13fe
commit 2f3a7e82c9
4 files changed
+326 -55

No files matched your search

+20
View File
@@ -79,6 +79,25 @@ class FriendsDownload(DatasetDownload):
os.remove(download_path)
@dataclass
class Mipnerf360Download(DatasetDownload):
"""Download the friends dataset."""
def download(self, save_dir: Path):
"""Download the friends dataset."""
# https://drive.google.com/file/d/1sgKr0ZO7BQC0FYinAnRSxobIWNucAST5/view?usp=sharing
friends_file_id = "1sgKr0ZO7BQC0FYinAnRSxobIWNucAST5"
# Download the files
url = "https://data.nerf.studio/nerfstudio-data-mipnerf360.zip"
download_path = str(save_dir / "nerfstudio-data-mipnerf360.zip")
gdown.download(url, output=download_path)
with zipfile.ZipFile(download_path, "r") as zip_ref:
zip_ref.extractall(str(save_dir))
os.remove(download_path)
def grab_file_id(zip_url: str) -> str:
"""Get the file id from the google drive zip url."""
s = zip_url.split("/d/")[1]
@@ -306,6 +325,7 @@ class PhototourismDownload(DatasetDownload):
Commands = Union[
Annotated[BlenderDownload, tyro.conf.subcommand(name="blender")],
Annotated[FriendsDownload, tyro.conf.subcommand(name="friends")],
Annotated[Mipnerf360Download, tyro.conf.subcommand(name="mipnerf360")],
Annotated[NerfstudioDownload, tyro.conf.subcommand(name="nerfstudio")],
Annotated[Record3dDownload, tyro.conf.subcommand(name="record3d")],
Annotated[DNerfDownload, tyro.conf.subcommand(name="dnerf")],