MCPcopy Index your code
hub / github.com/FoundationVision/ByteTrack / write_results_no_score

Function write_results_no_score

tutorials/ctracker/test_byte.py:36–45  ·  view source on GitHub ↗
(filename, results)

Source from the content-addressed store, hash-verified

34 f.write(line)
35
36def write_results_no_score(filename, results):
37 save_format = '{frame},{id},{x1},{y1},{w},{h},-1,-1,-1,-1\n'
38 with open(filename, 'w') as f:
39 for frame_id, tlwhs, track_ids in results:
40 for tlwh, track_id in zip(tlwhs, track_ids):
41 if track_id < 0:
42 continue
43 x1, y1, w, h = tlwh
44 line = save_format.format(frame=frame_id, id=track_id, x1=round(x1, 1), y1=round(y1, 1), w=round(w, 1), h=round(h, 1))
45 f.write(line)
46
47def run_each_dataset(model_dir, retinanet, dataset_path, subset, cur_dataset):
48 print(cur_dataset)

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected