mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-29 12:31:53 +08:00
updated benchmark scripts (#639)
This commit is contained in:
1 parent
05ba4b6b00
commit
2de5afae0c
2 files changed
+42
-39
No files matched your search
@@ -2,21 +2,21 @@
|
||||
|
||||
helpFunction_launch_train()
|
||||
{
|
||||
echo "Usage: $0 -c config_name -g gpu_list"
|
||||
echo -e "\t-c name of config to benchmark (e.g. mipnerf, instant_ngp)"
|
||||
echo -e "\t-g list of space-separated gpu numbers to launch train on (e.g. 0 2 4 5)"
|
||||
echo "Usage: $0 -m method_name -g [OPTIONAL] gpu_list"
|
||||
echo -e "\t-m name of config to benchmark (e.g. mipnerf, instant_ngp)"
|
||||
echo -e "\t-g [OPTIONAL] list of space-separated gpu numbers to launch train on (e.g. 0 2 4 5)"
|
||||
exit 1 # Exit program after printing help
|
||||
}
|
||||
|
||||
while getopts "c:g" opt; do
|
||||
while getopts "m:g" opt; do
|
||||
case "$opt" in
|
||||
c ) config_name="$OPTARG" ;;
|
||||
m ) method_name="$OPTARG" ;;
|
||||
g ) gpu_list="$OPTARG" ;;
|
||||
? ) helpFunction ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ -z "$config_name" ]; then
|
||||
if [ -z "$method_name" ]; then
|
||||
echo "Missing method name"
|
||||
helpFunction_launch_train
|
||||
fi
|
||||
@@ -45,23 +45,24 @@ echo available gpus... ${GPU_IDX[@]}
|
||||
DATASETS=("mic" "ficus" "chair" "hotdog" "materials" "drums" "ship" "lego")
|
||||
date
|
||||
now=$(date)
|
||||
tag=$(date +'%m-%d-%Y')
|
||||
tag=$(date +'%Y-%m-%d')
|
||||
idx=0
|
||||
len=${#GPU_IDX[@]}
|
||||
((len=len-1))
|
||||
|
||||
for dataset in ${DATASETS[@]}; do
|
||||
export CUDA_VISIBLE_DEVICES=${GPU_IDX[$idx]}
|
||||
python scripts/train.py \
|
||||
${config_name} \
|
||||
--logging.writer.2.no-enable \
|
||||
--pipeline.datamanager.train-dataset.data-directory=data/blender/${dataset} \
|
||||
--experiment-name=blender_${dataset}_${tag} \
|
||||
--trainer.model-dir=nerfstudio_models/ \
|
||||
--trainer.steps-per-save=16000 \
|
||||
--trainer.max-num-iterations=16500 \
|
||||
--logging.no-enable-profiler &
|
||||
echo "Launched ${config_name} ${dataset} on gpu ${GPU_IDX[$idx]}, ${tag}"
|
||||
ns-train ${method_name} \
|
||||
--data=data/blender/${dataset} \
|
||||
--experiment-name=blender_${dataset}_${tag} \
|
||||
--trainer.relative-model-dir=nerfstudio_models/ \
|
||||
--trainer.steps-per-save=1000 \
|
||||
--trainer.max-num-iterations=16500 \
|
||||
--logging.local-writer.no-enable \
|
||||
--logging.no-enable-profiler \
|
||||
--vis wandb \
|
||||
blender-data &
|
||||
echo "Launched ${method_name} ${dataset} on gpu ${GPU_IDX[$idx]}, ${tag}"
|
||||
|
||||
# update gpu
|
||||
if [ $idx == $len ]; then
|
||||
|
||||
Reference in new issue
Block a user