diff --git a/Pose2Sim/personAssociation.py b/Pose2Sim/personAssociation.py index 427e0f3..b4883aa 100644 --- a/Pose2Sim/personAssociation.py +++ b/Pose2Sim/personAssociation.py @@ -588,7 +588,10 @@ def recap_tracking(config_dict, error=0, nb_cams_excluded=0): mean_error_px = np.around(np.nanmean(error), decimals=1) calib = toml.load(calib_file) - calib_cam1 = calib[list(calib.keys())[0]] + cal_keys = [c for c in calib.keys() + if c not in ['metadata', 'capture_volume', 'charuco', 'checkerboard'] + and isinstance(calib[c],dict)] + calib_cam1 = calib[cal_keys[0]] fm = calib_cam1['matrix'][0][0] Dm = euclidean_distance(calib_cam1['translation'], [0,0,0]) mean_error_mm = np.around(mean_error_px * Dm / fm * 1000, decimals=1) diff --git a/Pose2Sim/triangulation.py b/Pose2Sim/triangulation.py index 38c31c2..f5d1c95 100644 --- a/Pose2Sim/triangulation.py +++ b/Pose2Sim/triangulation.py @@ -310,7 +310,10 @@ def recap_triangulate(config_dict, error, nb_cams_excluded, keypoints_names, cam undistort_points = config_dict.get('triangulation').get('undistort_points') # Recap - calib_cam1 = calib[list(calib.keys())[0]] + cal_keys = [c for c in calib.keys() + if c not in ['metadata', 'capture_volume', 'charuco', 'checkerboard'] + and isinstance(calib[c],dict)] + calib_cam1 = calib[cal_keys[0]] fm = calib_cam1['matrix'][0][0] Dm = euclidean_distance(calib_cam1['translation'], [0,0,0]) diff --git a/setup.cfg b/setup.cfg index d7c782f..fa2a77a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = pose2sim -version = 0.10.1 +version = 0.10.2 author = David Pagnon author_email = contact@david-pagnon.com description = Perform a markerless kinematic analysis from multiple calibrated views as a unified workflow from an OpenPose input to an OpenSim result.