| 15 | |
| 16 | |
| 17 | def parse_args(): |
| 18 | parser = argparse.ArgumentParser(description=""" |
| 19 | Compute metrics for trackers using MOTChallenge ground-truth data. |
| 20 | Files |
| 21 | ----- |
| 22 | All file content, ground truth and test files, have to comply with the |
| 23 | format described in |
| 24 | Milan, Anton, et al. |
| 25 | "Mot16: A benchmark for multi-object tracking." |
| 26 | arXiv preprint arXiv:1603.00831 (2016). |
| 27 | https://motchallenge.net/ |
| 28 | Structure |
| 29 | --------- |
| 30 | Layout for ground truth data |
| 31 | <GT_ROOT>/<SEQUENCE_1>/gt/gt.txt |
| 32 | <GT_ROOT>/<SEQUENCE_2>/gt/gt.txt |
| 33 | ... |
| 34 | Layout for test data |
| 35 | <TEST_ROOT>/<SEQUENCE_1>.txt |
| 36 | <TEST_ROOT>/<SEQUENCE_2>.txt |
| 37 | ... |
| 38 | Sequences of ground truth and test will be matched according to the `<SEQUENCE_X>` |
| 39 | string.""", formatter_class=argparse.RawTextHelpFormatter) |
| 40 | |
| 41 | parser.add_argument('--groundtruths', type=str, help='Directory containing ground truth files.') |
| 42 | parser.add_argument('--tests', type=str, help='Directory containing tracker result files') |
| 43 | parser.add_argument('--score_threshold', type=float, help='Score threshold',default=0.5) |
| 44 | parser.add_argument('--gt_type', type=str, default='') |
| 45 | parser.add_argument('--eval_official', action='store_true') |
| 46 | parser.add_argument('--loglevel', type=str, help='Log level', default='info') |
| 47 | parser.add_argument('--fmt', type=str, help='Data format', default='mot15-2D') |
| 48 | parser.add_argument('--solver', type=str, help='LAP solver to use') |
| 49 | return parser.parse_args() |
| 50 | |
| 51 | |
| 52 | def compare_dataframes(gts, ts): |