Skip to content

Add eval_dir args to specific evaluation directory #1056

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def readImages(renders_dir, gt_dir):
image_names.append(fname)
return renders, gts, image_names

def evaluate(model_paths):
def evaluate(model_paths, eval_dir):

full_dict = {}
per_view_dict = {}
Expand All @@ -49,7 +49,7 @@ def evaluate(model_paths):
full_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):
print("Method:", method)
Expand Down Expand Up @@ -99,5 +99,6 @@ def evaluate(model_paths):
# Set up command line argument parser
parser = ArgumentParser(description="Training script parameters")
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()
evaluate(args.model_paths)
evaluate(args.model_paths, args.eval_dir)