mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-17 13:23:46 +08:00
small update
This commit is contained in:
1 parent
975b541eb5
commit
4a85c5a4f7
2 files changed
+22
-15
No files matched your search
@@ -354,6 +354,7 @@ class VanillaPipeline(Pipeline):
|
||||
raise ValueError(
|
||||
"You must set datamanager.camera_optimizer.mode to optimize to optimize the camera poses."
|
||||
)
|
||||
# TODO: make this a parameter
|
||||
num_pose_iters = 100
|
||||
for i in range(num_pose_iters):
|
||||
print("pose iter: ", i)
|
||||
@@ -369,6 +370,7 @@ class VanillaPipeline(Pipeline):
|
||||
|
||||
# optimize appearance on half image
|
||||
if self.config.eval_optimize_appearance:
|
||||
# TODO: make this a parameter
|
||||
num_appearance_iters = 100
|
||||
side = random.choice([0, 1])
|
||||
half_width = width // 2
|
||||
|
||||
@@ -29,15 +29,17 @@ from nerfstudio.utils.scripts import run_command
|
||||
# mipnerf 360 experiments
|
||||
|
||||
splits = ["bicycle", "garden", "stump", "room", "counter", "kitchen", "bonsai"] # 7 splits
|
||||
gpus = [0, 1, 3, 4, 5, 6, 7]
|
||||
# method = "nerfacto"
|
||||
method = "instant-ngp"
|
||||
gpus = [0, 3, 6, 7, 8, 9, 3]
|
||||
|
||||
commands = []
|
||||
for split, gpu in zip(splits, gpus):
|
||||
wandb_name = f"mipnerf360-{split}"
|
||||
wandb_name = f"mipnerf360-{split}-{method}"
|
||||
command = " ".join(
|
||||
(
|
||||
f"CUDA_VISIBLE_DEVICES={gpu}",
|
||||
"ns-train nerfacto",
|
||||
f"ns-train {method}",
|
||||
"--vis wandb",
|
||||
f"--wandb-name {wandb_name}",
|
||||
f"--data data/_prep/images/mipnerf360/processed/{split}",
|
||||
@@ -51,16 +53,19 @@ for split, gpu in zip(splits, gpus):
|
||||
)
|
||||
print(command)
|
||||
commands.append(command)
|
||||
# import subprocess
|
||||
# import sys
|
||||
# def f(cmd):
|
||||
# out = subprocess.run(cmd, capture_output=False, shell=True, check=False)
|
||||
# if out.returncode != 0:
|
||||
# print(f"Error running command: {cmd}")
|
||||
# sys.exit(1)
|
||||
# if out.stdout is not None:
|
||||
# return out.stdout.decode("utf-8")
|
||||
import subprocess
|
||||
import sys
|
||||
def f(cmd):
|
||||
out = subprocess.run(cmd, capture_output=False, shell=True, check=False)
|
||||
if out.returncode != 0:
|
||||
print(f"Error running command: {cmd}")
|
||||
sys.exit(1)
|
||||
if out.stdout is not None:
|
||||
return out.stdout.decode("utf-8")
|
||||
|
||||
# from multiprocessing import Pool
|
||||
# with Pool() as p:
|
||||
# print(p.map(f, commands))
|
||||
from multiprocessing import Pool
|
||||
with Pool() as p:
|
||||
print(p.map(f, commands))
|
||||
|
||||
|
||||
# evaluation...
|
||||
Reference in new issue
Block a user