-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathtest.py
41 lines (33 loc) · 1.72 KB
/
test.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
30
31
32
33
34
35
36
37
38
39
40
41
import argparse
import evaluate_MemNet
def parse_config():
parser = argparse.ArgumentParser()
parser.add_argument("--cuda", default=True)
parser.add_argument("--batch_size", type=int, default=32)
parser.add_argument("--past_len", type=int, default=20)
parser.add_argument("--future_len", type=int, default=40)
parser.add_argument("--preds", type=int, default=5)
parser.add_argument("--model", default='pretrained_models/MANTRA/model_MANTRA')
parser.add_argument("--visualize_dataset", default=False)
parser.add_argument("--saved_memory", default=True)
parser.add_argument("--memories_path", default='pretrained_models/MANTRA/memories/')
parser.add_argument("--withIRM", default=True, help='generate predictions with/without IRM')
parser.add_argument("--saveImages", default='None',
help=
'''
Save in test folder examples of dataset with predictions generated by MANTRA.
If None, it does not save anything.
If 'All', it saves all examples.
If 'Subset', it saves examples defined in index_qualitative.py (handpicked significant samples)
''')
parser.add_argument("--dataset_file", default="kitti_dataset.json", help="dataset file")
parser.add_argument("--info", type=str, default='', help='Name of evaluation. '
'It will use for name of the test folder.')
return parser.parse_args()
def main(config):
v = evaluate_MemNet.Validator(config)
print('start evaluation')
v.test_model()
if __name__ == "__main__":
config = parse_config()
main(config)