(data_root, txt_path)
| 31 | |
| 32 | |
| 33 | def get_mota(data_root, txt_path): |
| 34 | accs = [] |
| 35 | seqs = sorted([s for s in os.listdir(data_root) if s.endswith('FRCNN')]) |
| 36 | #seqs = sorted([s for s in os.listdir(data_root)]) |
| 37 | for seq in seqs: |
| 38 | video_out_path = os.path.join(txt_path, seq + '.txt') |
| 39 | evaluator = Evaluator(data_root, seq, 'mot') |
| 40 | accs.append(evaluator.eval_file(video_out_path)) |
| 41 | metrics = mm.metrics.motchallenge_metrics |
| 42 | mh = mm.metrics.create() |
| 43 | summary = Evaluator.get_summary(accs, seqs, metrics) |
| 44 | strsummary = mm.io.render_summary( |
| 45 | summary, |
| 46 | formatters=mh.formatters, |
| 47 | namemap=mm.io.motchallenge_metric_names |
| 48 | ) |
| 49 | mota = float(strsummary.split(' ')[-6][:-1]) |
| 50 | return mota |
| 51 | |
| 52 | |
| 53 | def write_results_score(filename, results): |
nothing calls this directly
no test coverage detected