mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-16 12:53:44 +08:00
Make rich console global (#1916)
This commit is contained in:
1 parent
02f449b661
commit
4242a3c982
49 files changed
+44
-150
No files matched your search
@@ -18,16 +18,13 @@ from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Literal, Optional, Tuple
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.process_data import colmap_utils, hloc_utils, process_data_utils
|
||||
from nerfstudio.process_data.base_converter_to_nerfstudio_dataset import (
|
||||
BaseConverterToNerfstudioDataset,
|
||||
)
|
||||
from nerfstudio.process_data.process_data_utils import CAMERA_MODELS
|
||||
from nerfstudio.utils import install_checks
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -25,7 +25,6 @@ import cv2
|
||||
import numpy as np
|
||||
import requests
|
||||
import torch
|
||||
from rich.console import Console
|
||||
from rich.progress import track
|
||||
|
||||
# TODO(1480) use pycolmap instead of colmap_parsing_utils
|
||||
@@ -38,11 +37,9 @@ from nerfstudio.data.utils.colmap_parsing_utils import (
|
||||
)
|
||||
from nerfstudio.process_data.process_data_utils import CameraModel
|
||||
from nerfstudio.utils import colormaps
|
||||
from nerfstudio.utils.rich_utils import status
|
||||
from nerfstudio.utils.rich_utils import CONSOLE, status
|
||||
from nerfstudio.utils.scripts import run_command
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
|
||||
|
||||
def get_colmap_version(colmap_cmd: str, default_version=3.8) -> float:
|
||||
"""Returns the version of COLMAP.
|
||||
|
||||
@@ -23,7 +23,6 @@ import cv2
|
||||
import numpy as np
|
||||
import torch
|
||||
from equilib import Equi2Pers
|
||||
from rich.console import Console
|
||||
from rich.progress import (
|
||||
BarColumn,
|
||||
Progress,
|
||||
@@ -32,9 +31,7 @@ from rich.progress import (
|
||||
TimeRemainingColumn,
|
||||
)
|
||||
|
||||
from nerfstudio.utils.rich_utils import ItersPerSecColumn
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE, ItersPerSecColumn
|
||||
|
||||
|
||||
def _crop_bottom(bound_arr: list, fov: int, crop_factor: float) -> List[float]:
|
||||
|
||||
@@ -23,9 +23,8 @@ import sys
|
||||
from pathlib import Path
|
||||
from typing import Literal
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.process_data.process_data_utils import CameraModel
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
try:
|
||||
# TODO(1480) un-hide pycolmap import
|
||||
@@ -49,8 +48,6 @@ except ImportError:
|
||||
else:
|
||||
_HAS_PIXSFM = True
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
|
||||
|
||||
def run_hloc(
|
||||
image_dir: Path,
|
||||
|
||||
@@ -17,14 +17,11 @@
|
||||
from dataclasses import dataclass
|
||||
from typing import Optional
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.process_data import equirect_utils, process_data_utils
|
||||
from nerfstudio.process_data.colmap_converter_to_nerfstudio_dataset import (
|
||||
ColmapConverterToNerfstudioDataset,
|
||||
)
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -20,11 +20,9 @@ from pathlib import Path
|
||||
from typing import Dict, List
|
||||
|
||||
import numpy as np
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.process_data.process_data_utils import CAMERA_MODELS
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
def _find_param(calib_xml: ET.Element, param_name: str):
|
||||
|
||||
@@ -19,13 +19,10 @@ import sys
|
||||
from pathlib import Path
|
||||
from typing import List, Tuple
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.process_data import process_data_utils
|
||||
from nerfstudio.process_data.process_data_utils import CAMERA_MODELS
|
||||
from nerfstudio.utils import io
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
def polycam_to_json(
|
||||
|
||||
@@ -24,12 +24,10 @@ from typing import List, Literal, Optional, OrderedDict, Tuple
|
||||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.utils.rich_utils import status
|
||||
from nerfstudio.utils.rich_utils import CONSOLE, status
|
||||
from nerfstudio.utils.scripts import run_command
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
POLYCAM_UPSCALING_TIMES = 2
|
||||
|
||||
|
||||
|
||||
@@ -21,11 +21,9 @@ from typing import List
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.process_data.process_data_utils import CAMERA_MODELS
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
def realitycapture_to_json(
|
||||
|
||||
@@ -19,14 +19,11 @@ from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
import numpy as np
|
||||
from rich.console import Console
|
||||
from scipy.spatial.transform import Rotation
|
||||
|
||||
from nerfstudio.process_data.process_data_utils import CAMERA_MODELS
|
||||
from nerfstudio.utils import io
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
|
||||
|
||||
def record3d_to_json(images_paths: List[Path], metadata_path: Path, output_dir: Path, indices: np.ndarray) -> int:
|
||||
"""Converts Record3D's metadata and image paths to a JSON file.
|
||||
|
||||
@@ -17,14 +17,11 @@
|
||||
import shutil
|
||||
from dataclasses import dataclass
|
||||
|
||||
from rich.console import Console
|
||||
|
||||
from nerfstudio.process_data import equirect_utils, process_data_utils
|
||||
from nerfstudio.process_data.colmap_converter_to_nerfstudio_dataset import (
|
||||
ColmapConverterToNerfstudioDataset,
|
||||
)
|
||||
|
||||
CONSOLE = Console(width=120)
|
||||
from nerfstudio.utils.rich_utils import CONSOLE
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
Reference in new issue
Block a user