From 222dd4a9ee221dc66f1c5294e1766ebf047b690d Mon Sep 17 00:00:00 2001
From: shubodhsai
Date: Thu, 21 Apr 2022 21:13:28 +0530
Subject: [PATCH] corrected argparse statement for --opt_div_matching: always
evaluated to True previously irrespective of keyword, now corrected it.
---
main_inference.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/main_inference.py b/main_inference.py
index b9dbfd2..a0ea15e 100644
--- a/main_inference.py
+++ b/main_inference.py
@@ -63,7 +63,7 @@
parser.add_argument('--sinkhorn_iterations', type=int, default=20, help='Number of Sinkhorn iterations performed by SuperGlue')
parser.add_argument('--match_threshold', type=float, default=0.2, help='SuperGlue match threshold')
-parser.add_argument('--opt_div_matching', default=True, help='True: Divided matching, False: base matching')
+parser.add_argument('--opt_div_matching', default=True, choices=('True','False'), help='True: Divided matching, False: base matching')
args = parser.parse_args()
torch.set_grad_enabled(False)
@@ -149,7 +149,7 @@ def main_evaluation(query_dir, query_idx, db_dir, num_topk_ret, num_topk_pe, num
refinement = Refinement_base(superglue) : Base PC (original matching)
refinement = Refinement_extended(superglue) : Extended PC (Div matching)
"""
- if args.opt_div_matching:
+ if args.opt_div_matching == 'True':
refinement = Refinement_extended(superglue)
else:
refinement = Refinement_base(superglue)