mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-30 12:59:40 +08:00
1 parent
d547279a92
commit
ef9e00e614
2 files changed
+11
No files matched your search
@@ -39,3 +39,11 @@ def check_colmap_installed():
|
|||||||
CONSOLE.print("[bold red]Could not find COLMAP. Please install COLMAP.")
|
CONSOLE.print("[bold red]Could not find COLMAP. Please install COLMAP.")
|
||||||
print("See https://colmap.github.io/install.html for installation instructions.")
|
print("See https://colmap.github.io/install.html for installation instructions.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
def check_curl_installed():
|
||||||
|
"""Checks if curl is installed."""
|
||||||
|
curl_path = shutil.which("curl")
|
||||||
|
if curl_path is None:
|
||||||
|
CONSOLE.print("[bold red]Could not find [yellow]curl[red], Please install [yellow]curl")
|
||||||
|
sys.exit(1)
|
||||||
@@ -15,6 +15,7 @@ from rich.console import Console
|
|||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
|
|
||||||
from nerfstudio.configs.base_config import PrintableConfig
|
from nerfstudio.configs.base_config import PrintableConfig
|
||||||
|
from nerfstudio.utils import install_checks
|
||||||
from nerfstudio.utils.scripts import run_command
|
from nerfstudio.utils.scripts import run_command
|
||||||
|
|
||||||
CONSOLE = Console(width=120)
|
CONSOLE = Console(width=120)
|
||||||
@@ -212,6 +213,7 @@ class DNerfDownload(DatasetDownload):
|
|||||||
"""Download the D-NeRF dataset (https://github.com/albertpumarola/D-NeRF)."""
|
"""Download the D-NeRF dataset (https://github.com/albertpumarola/D-NeRF)."""
|
||||||
# TODO: give this code the same structure as download_nerfstudio
|
# TODO: give this code the same structure as download_nerfstudio
|
||||||
|
|
||||||
|
install_checks.check_curl_installed()
|
||||||
final_path = save_dir / Path("dnerf")
|
final_path = save_dir / Path("dnerf")
|
||||||
if os.path.exists(final_path):
|
if os.path.exists(final_path):
|
||||||
shutil.rmtree(str(final_path))
|
shutil.rmtree(str(final_path))
|
||||||
@@ -253,6 +255,7 @@ class PhototourismDownload(DatasetDownload):
|
|||||||
def download(self, save_dir: Path):
|
def download(self, save_dir: Path):
|
||||||
"""Download a PhotoTourism dataset: https://www.cs.ubc.ca/~kmyi/imw2020/data.html"""
|
"""Download a PhotoTourism dataset: https://www.cs.ubc.ca/~kmyi/imw2020/data.html"""
|
||||||
|
|
||||||
|
install_checks.check_curl_installed()
|
||||||
if self.capture_name == "all":
|
if self.capture_name == "all":
|
||||||
for capture_name in phototourism_downloads:
|
for capture_name in phototourism_downloads:
|
||||||
if capture_name != "all":
|
if capture_name != "all":
|
||||||
|
|||||||
Reference in new issue
Block a user