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

Method init_track

tutorials/trades/byte_tracker.py:156–166  ·  view source on GitHub ↗
(self, results)

Source from the content-addressed store, hash-verified

154
155 # below has no effect to final output, just to be compatible to codebase
156 def init_track(self, results):
157 for item in results:
158 if item['score'] > self.opt.new_thresh and item['class'] == 1:
159 self.id_count += 1
160 item['active'] = 1
161 item['age'] = 1
162 item['tracking_id'] = self.id_count
163 if not ('ct' in item):
164 bbox = item['bbox']
165 item['ct'] = [(bbox[0] + bbox[2]) / 2, (bbox[1] + bbox[3]) / 2]
166 self.tracks.append(item)
167
168 def reset(self):
169 self.frame_id = 0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected