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

Method init_track

tutorials/centertrack/tracker.py:12–23  ·  view source on GitHub ↗
(self, results)

Source from the content-addressed store, hash-verified

10 self.reset()
11
12 def init_track(self, results):
13 for item in results:
14 if item['score'] > self.opt.new_thresh:
15 self.id_count += 1
16 # active and age are never used in the paper
17 item['active'] = 1
18 item['age'] = 1
19 item['tracking_id'] = self.id_count
20 if not ('ct' in item):
21 bbox = item['bbox']
22 item['ct'] = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2]
23 self.tracks.append(item)
24
25 def reset(self):
26 self.id_count = 0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected