mirror of
https://github.com/graphdeco-inria/gaussian-splatting
synced 2024-11-22 08:18:17 +00:00
Add eval_dir
args to specific evaluation directory
The default directory is test. Sometimes, we also need to evaluate the train-rendered images to compare the implications of different resolution parameters.
This commit is contained in:
parent
54c035f783
commit
d7eeefa3e7
@ -33,7 +33,7 @@ def readImages(renders_dir, gt_dir):
|
|||||||
image_names.append(fname)
|
image_names.append(fname)
|
||||||
return renders, gts, image_names
|
return renders, gts, image_names
|
||||||
|
|
||||||
def evaluate(model_paths):
|
def evaluate(model_paths, eval_dir):
|
||||||
|
|
||||||
full_dict = {}
|
full_dict = {}
|
||||||
per_view_dict = {}
|
per_view_dict = {}
|
||||||
@ -49,7 +49,7 @@ def evaluate(model_paths):
|
|||||||
full_dict_polytopeonly[scene_dir] = {}
|
full_dict_polytopeonly[scene_dir] = {}
|
||||||
per_view_dict_polytopeonly[scene_dir] = {}
|
per_view_dict_polytopeonly[scene_dir] = {}
|
||||||
|
|
||||||
test_dir = Path(scene_dir) / "test"
|
test_dir = Path(scene_dir) / eval_dir
|
||||||
|
|
||||||
for method in os.listdir(test_dir):
|
for method in os.listdir(test_dir):
|
||||||
print("Method:", method)
|
print("Method:", method)
|
||||||
@ -99,5 +99,6 @@ if __name__ == "__main__":
|
|||||||
# Set up command line argument parser
|
# Set up command line argument parser
|
||||||
parser = ArgumentParser(description="Training script parameters")
|
parser = ArgumentParser(description="Training script parameters")
|
||||||
parser.add_argument('--model_paths', '-m', required=True, nargs="+", type=str, default=[])
|
parser.add_argument('--model_paths', '-m', required=True, nargs="+", type=str, default=[])
|
||||||
|
parser.add_argument('--eval_dir', required=False, default="test", type=str)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
evaluate(args.model_paths)
|
evaluate(args.model_paths, args.eval_dir)
|
||||||
|
Loading…
Reference in New Issue
Block a user