mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-12-07 00:09:14 +08:00
update benchmarking for better practice (#107)
This commit is contained in:
1 parent
c3fa92b8c8
commit
5e9d064db6
2 files changed
+15
-15
No files matched your search
@@ -2,17 +2,22 @@
|
|||||||
|
|
||||||
DATASETS=("mic" "ficus" "chair" "hotdog" "materials" "drums" "ship" "lego")
|
DATASETS=("mic" "ficus" "chair" "hotdog" "materials" "drums" "ship" "lego")
|
||||||
GPU_IDX=1
|
GPU_IDX=1
|
||||||
|
|
||||||
|
date
|
||||||
|
now=$(date)
|
||||||
|
tag=$(date +'%m-%d-%Y')
|
||||||
|
|
||||||
for dataset in ${DATASETS[@]}; do
|
for dataset in ${DATASETS[@]}; do
|
||||||
export CUDA_VISIBLE_DEVICES=${!GPU_IDX}
|
export CUDA_VISIBLE_DEVICES=${!GPU_IDX}
|
||||||
python scripts/run_train.py \
|
python scripts/run_train.py \
|
||||||
|
'~logging.writer.LocalWriter' \
|
||||||
data.dataset.data_directory=data/blender/${dataset} \
|
data.dataset.data_directory=data/blender/${dataset} \
|
||||||
data.dataset.downscale_factor=1 \
|
data.dataset.downscale_factor=1 \
|
||||||
experiment_name=blender_${dataset} \
|
experiment_name=blender_${dataset}_${tag} \
|
||||||
graph.model_dir=mattport_models/ \
|
graph.model_dir=mattport_models/ \
|
||||||
graph.steps_per_save=25000 \
|
graph.steps_per_save=25000 \
|
||||||
graph.max_num_iterations=2000000 \
|
graph.max_num_iterations=2000000 \
|
||||||
logging.enable_stats=False \
|
|
||||||
logging.enable_profiler=False &
|
logging.enable_profiler=False &
|
||||||
echo "Launched ${dataset} on gpu ${!GPU_IDX}"
|
echo "Launched ${dataset} on gpu ${!GPU_IDX}, ${tag}"
|
||||||
GPU_IDX=$((GPU_IDX+1))
|
GPU_IDX=$((GPU_IDX+1))
|
||||||
done
|
done
|
||||||
@@ -17,16 +17,8 @@ from mattport.nerf.trainer import Trainer
|
|||||||
BENCH = {
|
BENCH = {
|
||||||
"method": "vanilla_nerf",
|
"method": "vanilla_nerf",
|
||||||
"hydra_base_dir": "outputs/",
|
"hydra_base_dir": "outputs/",
|
||||||
"ckpt_dir": {
|
"benchmark_date": "05-24-2022",
|
||||||
"mic": "2022-05-12_173109",
|
"object_list": ["mic", "ficus", "chair", "hotdog", "materials", "drums", "ship", "lego"],
|
||||||
"ficus": "2022-05-12_173109",
|
|
||||||
"chair": "2022-05-12_173109",
|
|
||||||
"hotdog": "2022-05-12_173109",
|
|
||||||
"materials": "2022-05-12_173109",
|
|
||||||
"drums": "2022-05-12_173109",
|
|
||||||
"ship": "2022-05-12_173109",
|
|
||||||
"lego": "2022-05-12_173109",
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -48,8 +40,11 @@ def main():
|
|||||||
benchmarks = {}
|
benchmarks = {}
|
||||||
hydra_base_dir = BENCH["hydra_base_dir"]
|
hydra_base_dir = BENCH["hydra_base_dir"]
|
||||||
method = BENCH["method"]
|
method = BENCH["method"]
|
||||||
for dataset, ckpt_dir in tqdm(BENCH["ckpt_dir"].items()):
|
benchmark_date = BENCH["benchmark_date"]
|
||||||
hydra_dir = f"{hydra_base_dir}/blender_{dataset}/{method}/{ckpt_dir}/"
|
for dataset in tqdm(BENCH["object_list"]):
|
||||||
|
hydra_dir = f"{hydra_base_dir}/blender_{dataset}_{benchmark_date}/{method}/"
|
||||||
|
basename = os.listdir(hydra_dir)[0]
|
||||||
|
hydra_dir = f"{hydra_dir}/{basename}"
|
||||||
initialize(config_path=os.path.join("../../", hydra_dir, ".hydra/"))
|
initialize(config_path=os.path.join("../../", hydra_dir, ".hydra/"))
|
||||||
config = compose("config.yaml")
|
config = compose("config.yaml")
|
||||||
ckpt = load_best_ckpt(hydra_dir, config)
|
ckpt = load_best_ckpt(hydra_dir, config)
|
||||||
|
|||||||
Reference in new issue
Block a user