From 88b31f282aa2de4f950a027aef0120f78aa92d52 Mon Sep 17 00:00:00 2001 From: David PAGNON Date: Sun, 10 Nov 2024 13:49:42 +0100 Subject: [PATCH] Update reproj_from_trc_calib.py --- Pose2Sim/Utilities/reproj_from_trc_calib.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Pose2Sim/Utilities/reproj_from_trc_calib.py b/Pose2Sim/Utilities/reproj_from_trc_calib.py index 7cbcd52..f063d79 100644 --- a/Pose2Sim/Utilities/reproj_from_trc_calib.py +++ b/Pose2Sim/Utilities/reproj_from_trc_calib.py @@ -67,7 +67,6 @@ def str_to_id(string, length=8): return hash_int % (10 ** length) # Trim to desired length - def computeP(calib_file, undistort=False): ''' Compute projection matrices from toml calibration file. @@ -288,7 +287,7 @@ def dataset_to_mmpose2d(coords_df, mmpose_json_file, img_size, markerset='custom # transform first name in integer, and append other numbers from persons persons = list(set(['_'.join(item.split('_')[:5]) for item in coords_df.columns.levels[1]])) - person_ids = [str_to_id(p.split('_')[1]) + ''.join(p.split('_')[3:]) if len(p.split('_'))>=3 + person_ids = [int(str(str_to_id(p.split('_')[1])) + ''.join(p.split('_')[3:])) if len(p.split('_'))>=3 else str_to_id(p.split('_')[0]) for p in persons]