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

Method init_track

tutorials/centertrack/byte_tracker.py:155–165  ·  view source on GitHub ↗
(self, results)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected