debugged sorting

This commit is contained in:
David PAGNON 2024-08-25 12:10:56 +02:00 committed by GitHub
parent cdf795bb71
commit 90a7b86113
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -180,6 +180,8 @@ def sort_people(Q_kpt_old, Q_kpt):
# Generate possible person correspondences across frames # Generate possible person correspondences across frames
if len(Q_kpt_old) < len(Q_kpt): if len(Q_kpt_old) < len(Q_kpt):
Q_kpt_old = np.concatenate((Q_kpt_old, [[0., 0., 0., 1.]]*(len(Q_kpt)-len(Q_kpt_old)))) Q_kpt_old = np.concatenate((Q_kpt_old, [[0., 0., 0., 1.]]*(len(Q_kpt)-len(Q_kpt_old))))
if len(Q_kpt) < len(Q_kpt_old):
Q_kpt = np.concatenate((Q_kpt, [[0., 0., 0., 1.]]*(len(Q_kpt_old)-len(Q_kpt))))
personsIDs_comb = sorted(list(it.product(range(len(Q_kpt_old)),range(len(Q_kpt))))) personsIDs_comb = sorted(list(it.product(range(len(Q_kpt_old)),range(len(Q_kpt)))))
# Compute distance between persons from one frame to another # Compute distance between persons from one frame to another