-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvaluateGrounding.py
27 lines (20 loc) · 1.46 KB
/
EvaluateGrounding.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
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
from SoccerNet.Evaluation.ReplayGrounding import evaluate
if __name__ == '__main__':
# Load the arguments
parser = ArgumentParser(description='Evaluation for Replay Grounding',
formatter_class=ArgumentDefaultsHelpFormatter)
parser.add_argument('--SoccerNet_path', required=False, type=str,
default="/media/giancos/Football/SoccerNet/", help='Path for SoccerNet')
parser.add_argument('--Predictions_path', required=False, type=str,
default="/media/giancos/Football/SoccerNet/", help='Path for Output_results')
parser.add_argument('--Prediction_file', required=False, type=str,
help='Name of the prediction files as stored in folder (or zipped file) [None=try to infer it]', default=None)
parser.add_argument('--split', required=False, type=str,
default="test", help='Set on which to evaluate the performances')
parser.add_argument('--metric', required=False, type=str,
help='tight (tight average mAP 2022) or loose (average mAP 2021)', default="tight")
args = parser.parse_args()
results = evaluate(SoccerNet_path=args.SoccerNet_path, Predictions_path=args.Predictions_path,
split=args.split, prediction_file=args.Prediction_file, metric=args.metric)
print("tight Average AP: ", results["a_AP"])