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

Function greedy_assignment

tutorials/centertrack/tracker.py:189–198  ·  view source on GitHub ↗
(dist, thresh=1e16)

Source from the content-addressed store, hash-verified

187
188
189def greedy_assignment(dist, thresh=1e16):
190 matched_indices = []
191 if dist.shape[1] == 0:
192 return np.array(matched_indices, np.int32).reshape(-1, 2)
193 for i in range(dist.shape[0]):
194 j = dist[i].argmin()
195 if dist[i][j] < thresh:
196 dist[:, j] = 1e18
197 matched_indices.append([i, j])
198 return np.array(matched_indices, np.int32).reshape(-1, 2)

Callers 1

stepMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected