From 4d7442b97d2553c2ecb322894577b2939672877b Mon Sep 17 00:00:00 2001 From: Vasu Agrawal Date: Tue, 12 Dec 2023 16:53:16 -0800 Subject: [PATCH] Reset a few files back to original state --- .vscode/launch.json | 41 ++++--------------- nerfstudio/process_data/metashape_utils.py | 2 +- nerfstudio/process_data/process_data_utils.py | 4 +- nerfstudio/scripts/process_data.py | 4 +- 4 files changed, 12 insertions(+), 39 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index bdb161fd206..6e4dc7c4a99 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -44,9 +44,7 @@ "request": "launch", "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", - "args": [ - "instant_ngp" - ] + "args": ["instant_ngp"] }, { "name": "Python: train ngp nerfstudio", @@ -93,9 +91,7 @@ "request": "launch", "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", - "args": [ - "semantic_nerf" - ] + "args": ["semantic_nerf"] }, { "name": "Python: NeuS on Replica", @@ -104,9 +100,7 @@ "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": { - "CUDA_VISIBLE_DEVICES": "0" - }, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus", "--pipeline.model.sdf-field.inside-outside=True", @@ -125,9 +119,7 @@ "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": { - "CUDA_VISIBLE_DEVICES": "0" - }, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus-facto", "--pipeline.model.sdf-field.inside-outside=True", @@ -146,9 +138,7 @@ "program": "nerfstudio/scripts/train.py", "console": "integratedTerminal", "justMyCode": false, - "env": { - "CUDA_VISIBLE_DEVICES": "0" - }, + "env": { "CUDA_VISIBLE_DEVICES": "0" }, "args": [ "neus-facto", "--pipeline.model.sdf-field.inside-outside=False", @@ -158,23 +148,6 @@ "--include_mono_prior=False", "--auto-orient=True" ] - }, - { - "name": "Python: process metashape", - "type": "python", - "request": "launch", - "program": "nerfstudio/scripts/process_data.py", - "args": [ - "metashape", - "--data", - "data/eyefultower/apartment/images-jpeg-2k", - "--xml", - "data/eyefultower/apartment/cameras.xml", - "--output-dir", - "processed3", - ], - "console": "integratedTerminal", - "justMyCode": false, - }, + } ] -} \ No newline at end of file +} diff --git a/nerfstudio/process_data/metashape_utils.py b/nerfstudio/process_data/metashape_utils.py index fad2445ed06..8bea8707cb8 100644 --- a/nerfstudio/process_data/metashape_utils.py +++ b/nerfstudio/process_data/metashape_utils.py @@ -17,7 +17,7 @@ import json import xml.etree.ElementTree as ET from pathlib import Path -from typing import Dict, List, Optional +from typing import Dict, List import numpy as np diff --git a/nerfstudio/process_data/process_data_utils.py b/nerfstudio/process_data/process_data_utils.py index 1523baf6674..334dab4de0e 100644 --- a/nerfstudio/process_data/process_data_utils.py +++ b/nerfstudio/process_data/process_data_utils.py @@ -57,12 +57,12 @@ def list_images(data: Path) -> List[Path]: """Lists all supported images in a directory Args: - data: Path to the directory of images. Nested folders are searched as well. + data: Path to the directory of images. Returns: Paths to images contained in the directory """ allowed_exts = [".jpg", ".jpeg", ".png", ".tif", ".tiff"] + ALLOWED_RAW_EXTS - image_paths = sorted([p for p in data.glob("**/[!.]*") if p.suffix.lower() in allowed_exts]) + image_paths = sorted([p for p in data.glob("[!.]*") if p.suffix.lower() in allowed_exts]) return image_paths diff --git a/nerfstudio/scripts/process_data.py b/nerfstudio/scripts/process_data.py index 22125973bcd..83cdcca473f 100644 --- a/nerfstudio/scripts/process_data.py +++ b/nerfstudio/scripts/process_data.py @@ -20,7 +20,7 @@ import zipfile from dataclasses import dataclass from pathlib import Path -from typing import Optional, Union +from typing import Union import numpy as np import tyro @@ -28,11 +28,11 @@ from nerfstudio.process_data import ( metashape_utils, - odm_utils, polycam_utils, process_data_utils, realitycapture_utils, record3d_utils, + odm_utils, ) from nerfstudio.process_data.colmap_converter_to_nerfstudio_dataset import BaseConverterToNerfstudioDataset from nerfstudio.process_data.images_to_nerfstudio_dataset import ImagesToNerfstudioDataset