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

Function fuse_iou

tutorials/transtrack/mot_online/matching.py:137–148  ·  view source on GitHub ↗
(cost_matrix, tracks, detections)

Source from the content-addressed store, hash-verified

135
136
137def fuse_iou(cost_matrix, tracks, detections):
138 if cost_matrix.size == 0:
139 return cost_matrix
140 reid_sim = 1 - cost_matrix
141 iou_dist = iou_distance(tracks, detections)
142 iou_sim = 1 - iou_dist
143 fuse_sim = reid_sim * (1 + iou_sim) / 2
144 det_scores = np.array([det.score for det in detections])
145 det_scores = np.expand_dims(det_scores, axis=0).repeat(cost_matrix.shape[0], axis=0)
146 #fuse_sim = fuse_sim * (1 + det_scores) / 2
147 fuse_cost = 1 - fuse_sim
148 return fuse_cost
149
150
151def fuse_iou_add(cost_matrix, tracks, detections, weight=0.5):

Callers

nothing calls this directly

Calls 1

iou_distanceFunction · 0.70

Tested by

no test coverage detected