MCPcopy Create free account
hub / github.com/FoundationVision/ByteTrack / write_results

Function write_results

tutorials/motr/eval.py:154–164  ·  view source on GitHub ↗
(filename, results)

Source from the content-addressed store, hash-verified

152
153
154def write_results(filename, results):
155 save_format = '{frame},{id},{x1},{y1},{w},{h},{s},-1,-1,-1\n'
156 with open(filename, 'w') as f:
157 for frame_id, tlwhs, track_ids, scores in results:
158 for tlwh, track_id, score in zip(tlwhs, track_ids, scores):
159 if track_id < 0:
160 continue
161 x1, y1, w, h = tlwh
162 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), s=round(score, 2))
163 f.write(line)
164 logger.info('save results to {}'.format(filename))
165
166
167class MOTR(object):

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected