(cost_matrix, detections)
| 171 | |
| 172 | |
| 173 | def fuse_score(cost_matrix, detections): |
| 174 | if cost_matrix.size == 0: |
| 175 | return cost_matrix |
| 176 | iou_sim = 1 - cost_matrix |
| 177 | det_scores = np.array([det.score for det in detections]) |
| 178 | det_scores = np.expand_dims(det_scores, axis=0).repeat(cost_matrix.shape[0], axis=0) |
| 179 | fuse_sim = iou_sim * det_scores |
| 180 | fuse_cost = 1 - fuse_sim |
| 181 | return fuse_cost |
nothing calls this directly
no outgoing calls
no test coverage detected