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