Open tannd-ds opened 6 months ago
I agree, should be replacing the cost matrix functino with this: cost_matrix = distance_metric(tracks, detections, track_indices, detection_indices) cost_matrix[cost_matrix > max_distance] = max_distance + 1e-5
row_indices, col_indices = linear_sum_assignment(cost_matrix) indices = list(zip(row_indices, col_indices))
linear_assignment
fromscikit-learn
is deprecated and has been removed, instead, now we uselinear_sum_assignment
fromscipy.optimize
. The two functions have slightly different return types and I did adjust the code so that it worked as it was.np.int
is no longer used, instead we useint
or specify the precision likenp.int32
).I've already tested it and now it runs perfectly without any errors.