deep_sort icon indicating copy to clipboard operation
deep_sort copied to clipboard

update for latest sklearn

Open yasutomo57jp opened this issue 5 years ago • 2 comments

yasutomo57jp avatar Jul 23 '20 09:07 yasutomo57jp

Seconding this. Reference here: https://stackoverflow.com/questions/62390517/no-module-named-sklearn-utils-linear-assignment

gndowns avatar Dec 15 '20 19:12 gndowns

Thirding this, however I'd personally recommend changing it to be something more like the following to avoid the unnecessary np.vstack().T:

from scipy.optimize import linear_sum_assignment
   indices_rows, indices_cols = linear_sum_assignment(cost_matrix)

    matches, unmatched_tracks, unmatched_detections = [], [], []
    for col, detection_idx in enumerate(detection_indices):
        if col not in indices_cols:
            unmatched_detections.append(detection_idx)
    for row, track_idx in enumerate(track_indices):
        if row not in indices_rows:
            unmatched_tracks.append(track_idx)
    for row, col in zip(indices_rows, indices_cols):

danielcrane avatar Sep 22 '21 03:09 danielcrane