-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathevaluate_tracker.py
33 lines (20 loc) · 938 Bytes
/
evaluate_tracker.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
import argparse
import os
from utils.utils import load_tracker, load_dataset
def evaluate_tracker(workspace_path, tracker_id):
tracker_class = load_tracker(workspace_path, tracker_id)
tracker = tracker_class()
dataset = load_dataset(workspace_path)
results_dir = os.path.join(workspace_path, 'results', tracker.name())
if not os.path.exists(results_dir):
os.mkdir(results_dir)
tracker.evaluate(dataset, results_dir)
print('Evaluation has been completed successfully.')
def main():
parser = argparse.ArgumentParser(description='Tracker Evaluation Utility')
parser.add_argument('--workspace_path', help='Path to the VOT workspace', required=True, action='store')
parser.add_argument('--tracker', help='Tracker identifier', required=True, action='store')
args = parser.parse_args()
evaluate_tracker(args.workspace_path, args.tracker)
if __name__ == "__main__":
main()