MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / optimal_match

Function optimal_match

deeplabcut/utils/pseudo_label.py:52–62  ·  view source on GitHub ↗
(gts_list, preds_list)

Source from the content-addressed store, hash-verified

50
51
52def optimal_match(gts_list, preds_list):
53 num_gts = len(gts_list)
54 num_preds = len(preds_list)
55 cost_matrix = np.zeros((num_gts, num_preds))
56
57 for i in range(num_gts):
58 for j in range(num_preds):
59 cost_matrix[i, j] = distance.euclidean(gts_list[i][..., :2].flatten(), preds_list[j][..., :2].flatten())
60 row_ind, col_ind = linear_sum_assignment(cost_matrix)
61
62 return col_ind
63
64
65def calculate_iou(box1, box2):

Callers 1

keypoint_matchingFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected