From 90a7b86113ddae24677a24a450b07bd623d993d4 Mon Sep 17 00:00:00 2001 From: David PAGNON Date: Sun, 25 Aug 2024 12:10:56 +0200 Subject: [PATCH] debugged sorting --- Pose2Sim/triangulation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Pose2Sim/triangulation.py b/Pose2Sim/triangulation.py index a2aba83..71a5533 100644 --- a/Pose2Sim/triangulation.py +++ b/Pose2Sim/triangulation.py @@ -180,6 +180,8 @@ def sort_people(Q_kpt_old, Q_kpt): # Generate possible person correspondences across frames 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)))) + 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))))) # Compute distance between persons from one frame to another