(cost_matrix, tracks, detections)
| 135 | |
| 136 | |
| 137 | def 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 | |
| 151 | def fuse_iou_add(cost_matrix, tracks, detections, weight=0.5): |
nothing calls this directly
no test coverage detected