mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-15 12:23:46 +08:00
Bump minimum Python version to 3.8 (#1876)
* Bump minimum Python version to 3.8 * typing_extensions.Literal -> typing.Literal * ns-dev-test * typing_extensions.get_args => typing.get_args * Format with older version of black * Bump `black` * Run black
This commit is contained in:
1 parent
7537551f38
commit
63c6303736
58 files changed
+70
-117
No files matched your search
@@ -16,10 +16,9 @@
|
||||
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Tuple
|
||||
from typing import Dict, List, Literal, Optional, Tuple
|
||||
|
||||
from rich.console import Console
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.process_data import colmap_utils, hloc_utils, process_data_utils
|
||||
from nerfstudio.process_data.base_converter_to_nerfstudio_dataset import (
|
||||
@@ -182,7 +181,11 @@ class ColmapConverterToNerfstudioDataset(BaseConverterToNerfstudioDataset):
|
||||
"""
|
||||
self.absolute_colmap_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
(sfm_tool, feature_type, matcher_type,) = process_data_utils.find_tool_feature_matcher_combination(
|
||||
(
|
||||
sfm_tool,
|
||||
feature_type,
|
||||
matcher_type,
|
||||
) = process_data_utils.find_tool_feature_matcher_combination(
|
||||
self.sfm_tool, self.feature_type, self.matcher_type
|
||||
)
|
||||
# check that sfm_tool is hloc if using refine_pixsfm
|
||||
|
||||
@@ -18,7 +18,7 @@ Tools supporting the execution of COLMAP and preparation of COLMAP-based dataset
|
||||
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Optional
|
||||
from typing import Any, Dict, Literal, Optional
|
||||
|
||||
import appdirs
|
||||
import cv2
|
||||
@@ -27,7 +27,6 @@ import requests
|
||||
import torch
|
||||
from rich.console import Console
|
||||
from rich.progress import track
|
||||
from typing_extensions import Literal
|
||||
|
||||
# TODO(1480) use pycolmap instead of colmap_parsing_utils
|
||||
# import pycolmap
|
||||
@@ -115,9 +114,7 @@ def run_colmap(
|
||||
colmap_version = get_colmap_version(colmap_cmd)
|
||||
|
||||
colmap_database_path = colmap_dir / "database.db"
|
||||
if colmap_database_path.exists():
|
||||
# Can't use missing_ok argument because of Python 3.7 compatibility.
|
||||
colmap_database_path.unlink()
|
||||
colmap_database_path.unlink(missing_ok=True)
|
||||
|
||||
# Feature extraction
|
||||
feature_extractor_cmd = [
|
||||
|
||||
@@ -21,9 +21,9 @@ Requires hloc module from : https://github.com/cvg/Hierarchical-Localization
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Literal
|
||||
|
||||
from rich.console import Console
|
||||
from typing_extensions import Literal
|
||||
|
||||
from nerfstudio.process_data.process_data_utils import CameraModel
|
||||
|
||||
|
||||
@@ -20,12 +20,11 @@ import shutil
|
||||
import sys
|
||||
from enum import Enum
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Tuple
|
||||
from typing import List, Literal, Optional, OrderedDict, Tuple
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from rich.console import Console
|
||||
from typing_extensions import Literal, OrderedDict
|
||||
|
||||
from nerfstudio.utils.rich_utils import status
|
||||
from nerfstudio.utils.scripts import run_command
|
||||
|
||||
Reference in new issue
Block a user