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

Method update

tutorials/motr/motr.py:313–325  ·  view source on GitHub ↗
(self, track_instances: Instances)

Source from the content-addressed store, hash-verified

311 self.max_obj_id = 0
312
313 def update(self, track_instances: Instances):
314 track_instances.disappear_time[track_instances.scores >= self.score_thresh] = 0
315 for i in range(len(track_instances)):
316 if track_instances.obj_idxes[i] == -1 and track_instances.scores[i] >= self.score_thresh:
317 # print("track {} has score {}, assign obj_id {}".format(i, track_instances.scores[i], self.max_obj_id))
318 track_instances.obj_idxes[i] = self.max_obj_id
319 self.max_obj_id += 1
320 elif track_instances.obj_idxes[i] >= 0 and track_instances.scores[i] < self.filter_score_thresh:
321 track_instances.disappear_time[i] += 1
322 if track_instances.disappear_time[i] >= self.miss_tolerance:
323 # Set the obj_id to -1.
324 # Then this track will be removed by TrackEmbeddingLayer.
325 track_instances.obj_idxes[i] = -1
326
327
328class TrackerPostProcess(nn.Module):

Callers 4

_forward_single_imageMethod · 0.45
buildFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected