1
0
Fork 0
mirror of synced 2024-05-18 03:42:23 +12:00
waifu2x/appendix/benchmark.sh

38 lines
1.1 KiB
Bash
Raw Permalink Normal View History

2016-10-08 23:36:26 +13:00
#!/bin/sh
set -x
benchmark_photo() {
dir=./benchmarks/${1}/${2}/${3}
mkdir -p ${dir}
2018-11-14 23:03:10 +13:00
th tools/benchmark.lua -dir data/${1} -model1\_dir models/${2}/photo -method scale -filter Catrom -color y -range\_bug 1 -tta ${3} -output_dir ${dir} -save_info 1 -show_progress 0 -force_cudnn 1
2016-10-08 23:36:26 +13:00
}
run_benchmark_photo() {
for tta in 0 1
do
for dataset in bsd100 urban100
do
benchmark_photo ${dataset} vgg_7 ${tta}
benchmark_photo ${dataset} upconv_7 ${tta}
benchmark_photo ${dataset} upconv_7l ${tta}
done
done
}
benchmark_art() {
2018-11-14 23:03:10 +13:00
dir=./benchmarks/${1}/${2}/${3}/${4}
2016-10-08 23:36:26 +13:00
mkdir -p ${dir}
2018-11-14 23:03:10 +13:00
th tools/benchmark.lua -dir data/${1} -model1\_dir models/${2}/art -method scale -filter ${3} -color y -range\_bug 1 -tta ${4} -output_dir ${dir} -save_info 1 -show_progress 0 -force_cudnn 1
2016-10-08 23:36:26 +13:00
}
run_benchmark_art() {
for tta in 0 1
do
2018-11-14 23:03:10 +13:00
for filter in Sinc Lanczos Catrom Box
do
benchmark_art art_test vgg_7 ${filter} ${tta}
benchmark_art art_test upconv_7 ${filter} ${tta}
benchmark_art art_test cunet ${filter} ${tta}
done
2016-10-08 23:36:26 +13:00
done
}
2018-11-14 23:03:10 +13:00
2016-10-08 23:36:26 +13:00
run_benchmark_art