From 58e7387cbbe099f3bbf6336efd392ba4fb567925 Mon Sep 17 00:00:00 2001 From: Reza <101015213@qq.com> Date: Mon, 27 Mar 2023 12:58:38 +0800 Subject: [PATCH] add multi queries and shifted query --- README.md | 9 +++++++++ Shifited_test_and_evaluate.py | 5 ++--- multi_test_and_evaluate.py | 1 - 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c9e6389..0ace9ec 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,16 @@ name: MBF_1652_2022-11-15-18:56:39 python U1652_test_and_evaluate.py --cfg "settings.yaml" --name "your_weight_dirname_1652_2022-11-16-15:14:14" --seq 1 ``` +### Multiply Queries +```shell +python multi_test_and_evaluate.py --cfg "settings.yaml" --multi 1 --weight "your_weight_path.pth" --csv_save_path "./result" + +``` +### Shifted Query +```shell +python Shifted_test_and_evaluate.py --cfg "settings.yaml" --query "drone" --weight "your_weight_path.pth" --csv_save_path "./result" --gap 10 +``` ### Best Weights Please check the Release page diff --git a/Shifited_test_and_evaluate.py b/Shifited_test_and_evaluate.py index bf0f03a..21c57df 100644 --- a/Shifited_test_and_evaluate.py +++ b/Shifited_test_and_evaluate.py @@ -159,9 +159,8 @@ def eval_and_test(query_name, config_file, net_path, save_path, gap): parser.add_argument('--query', type=str, default="drone", help='query set: drone or satellite') parser.add_argument('--cfg', type=str, default='settings.yaml', help='config file XXX.yaml path') - parser.add_argument('--multi', type=int, default=1, help='multi number for example: if multi == 1 fusion image ' - 'number = 50/1 = 50') - parser.add_argument('--weight', type=str, default="/home/sues/save_model_weight/Release_1652_2022-11-19-01:26:05/net_137.pth", help='evaluate which weight, path') + + parser.add_argument('--weight', type=str, default=None, help='evaluate which weight, path') parser.add_argument('--csv_save_path', type=str, default="./result", help="evaluation result table store path") parser.add_argument('--gap', type=int, default=10, help='shifted gap') opt = parser.parse_known_args()[0] diff --git a/multi_test_and_evaluate.py b/multi_test_and_evaluate.py index 15b1d14..555bd37 100644 --- a/multi_test_and_evaluate.py +++ b/multi_test_and_evaluate.py @@ -184,7 +184,6 @@ def eval_and_test(multi_coff, config_file, weight_path, save_path): parser.add_argument('--multi', type=int, default=1, help='multi number for example: if multi == 1 fusion image ' 'number = 50/1 = 50') parser.add_argument('--weight', type=str, default=None, help='evaluate which weight, path') - parser.add_argument('--csv_save_path', type=str, default="./result", help="evaluation result table store path") opt = parser.parse_known_args()[0]