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

Function greedy_assignment

tutorials/trades/tracker.py:290–299  ·  view source on GitHub ↗
(dist, thresh=1e16)

Source from the content-addressed store, hash-verified

288
289
290def greedy_assignment(dist, thresh=1e16):
291 matched_indices = []
292 if dist.shape[1] == 0:
293 return np.array(matched_indices, np.int32).reshape(-1, 2)
294 for i in range(dist.shape[0]):
295 j = dist[i].argmin()
296 if dist[i][j] < thresh:
297 dist[:, j] = 1e18
298 matched_indices.append([i, j])
299 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