(cost_matrix, tracks, detections)
| 157 | |
| 158 | |
| 159 | def fuse_iou(cost_matrix, tracks, detections): |
| 160 | if cost_matrix.size == 0: |
| 161 | return cost_matrix |
| 162 | reid_sim = 1 - cost_matrix |
| 163 | iou_dist = iou_distance(tracks, detections) |
| 164 | iou_sim = 1 - iou_dist |
| 165 | fuse_sim = reid_sim * (1 + iou_sim) / 2 |
| 166 | det_scores = np.array([det.score for det in detections]) |
| 167 | det_scores = np.expand_dims(det_scores, axis=0).repeat(cost_matrix.shape[0], axis=0) |
| 168 | #fuse_sim = fuse_sim * (1 + det_scores) / 2 |
| 169 | fuse_cost = 1 - fuse_sim |
| 170 | return fuse_cost |
| 171 | |
| 172 | |
| 173 | def fuse_score(cost_matrix, detections): |
nothing calls this directly
no test coverage detected