(data_root, txt_path)
| 12 | |
| 13 | |
| 14 | def eval_mota(data_root, txt_path): |
| 15 | accs = [] |
| 16 | seqs = sorted([s for s in os.listdir(data_root) if s.endswith('FRCNN')]) |
| 17 | #seqs = sorted([s for s in os.listdir(data_root)]) |
| 18 | for seq in seqs: |
| 19 | video_out_path = os.path.join(txt_path, seq + '.txt') |
| 20 | evaluator = Evaluator(data_root, seq, 'mot') |
| 21 | accs.append(evaluator.eval_file(video_out_path)) |
| 22 | metrics = mm.metrics.motchallenge_metrics |
| 23 | mh = mm.metrics.create() |
| 24 | summary = Evaluator.get_summary(accs, seqs, metrics) |
| 25 | strsummary = mm.io.render_summary( |
| 26 | summary, |
| 27 | formatters=mh.formatters, |
| 28 | namemap=mm.io.motchallenge_metric_names |
| 29 | ) |
| 30 | print(strsummary) |
| 31 | |
| 32 | |
| 33 | def get_mota(data_root, txt_path): |
no test coverage detected