-
Notifications
You must be signed in to change notification settings - Fork 19
/
eval.py
29 lines (21 loc) · 892 Bytes
/
eval.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
import argparse
from evaluation import dtu_eval, epfl_eval
from pathlib import Path
from pyhocon import ConfigFactory
parser = argparse.ArgumentParser()
parser.add_argument('--conf', type=str, default='./confs/base.conf')
parser.add_argument('--case', type=str, default='')
parser.add_argument("--suffix", default="")
args = parser.parse_args()
dataset = args.case.split('/')[0]
scene = args.case.split('/')[-1].replace('scan', '')
exp_dir = Path("exp/{}".format(args.case))
eval_dir = Path("evals/{}".format(args.case))
if not os.path.exists(eval_dir):
os.makedirs(eval_dir)
inp_mesh_path = Path(f'{exp_dir}/meshes/output_mesh{args.suffix}.ply')
if "dtu" in dataset or dataset == "DTU":
dtu_eval.eval(inp_mesh_path, int(scene), "/mnt/D/hust_fu/Data/dtu_eval", eval_dir, args.suffix)
else:
epfl_eval.eval(inp_mesh_path, scene, "data/epfl", eval_dir, args.suffix)