Releases: perfanalytics/pose2sim
Minor edits for conda-forge acceptance
- Smoke test on entry points
- Removed deep-sort-realtime for conda-forge acceptance
Full Changelog: v0.10.38...v0.10.39
Improve sorting and fixed bad estimates in the triangulation recap
-
Rewrote the sorting algorithm to handle some swaps (more information in the latest Sports2D release: https://github.com/davidpagnon/Sports2D/releases/tag/v0.8.22):
- Added a distance constraint, so that if the best association between a frame and the next one is too far, it creates a new person instead
- Switched to frame-by-frame median keypoint distance (instead of mean), in order not to ignore outliers
- Ran non-maximum suppression (NMS) for bounding boxes recomputed from keypoints instead of straight from the person detector, which is more accurate and prevents having 2 boxes for the same person
- Added a likelihood threshold in the keypoints used to recompute the bounding boxes to ignore points that were probably wrongly estimated
- This made me rewrite the algorithm from scratch, but with the same logic. Among other edits: I used the Hungarian algorithm from scipy.optimize.linear_sum_assignment, so my custom greedy
min_with_single_indicesfunction is not required anymore. This is very slightly slower with 2-3 people in the scene, but faster in crowded scenes.
-
Rewrote the triangulation module:
- Fixed the IDs and count of excluded cameras, which were sometimes not accurate.
- Computed the recap indicators person by person.
- First participant is now #0 for better consistency with the rest of the library
- Better excluded badly triangulated estimations, based on min_chunk_size instead of a threshold of 4 valid frames
-
Updated marker locations for nose, left_eye, and right_eye for BlazePose markerset.
-
Fixed pose estimation with save_video = 'to_images'
-
Clarified some of the docstrings
Full Changelog: v0.10.37...v0.10.38
More robust triangulation and various other improvements
Installation:
- Python 3.12 by default
- OpenCV: removed <4.12 constraint since numpy>=2.0 is now supported, and added !=4.11 constraint due to displaymatrix being ignored
- constrained numpy version to python version
pip install pose2simis now done beforeconda install opensim
Calibration:
- Fixed wrong orientation with vertical checkerboard
- Calibration points window stays always on top
Config.toml:
- reorganized triangulation arguments for more clarity
- increased
interp_if_gap_smaller_thanto 20 px instead of 10 - added
remove_incomplete_framesparameter to remove a full frame if any keypoint is missing - added
save_sync_plots andsave_filt_plots` parameters
Triangulation:
- make_trc: removed f_range argument. This is automatically and more accurately retrieved from Q.index
- recap_triangulate: Added warning message when some time frames had to be trimmed. Also removed f_range argument.
- changed order of operations:
- Interpolate small missing sections (uses
interp_if_gap_smaller_than) - Trim sections where person is out of the frame (uses
sections_to_keep,remove_incomplete_frames, and ignores small sections) - Remove persons with fewer than 4 correct frames
- Fill non-interpolated values (uses
fill_large_gaps_with) - Replace missing keypoints with zeros (otherwise, marker augmentation fails)
. gaps, _ valid values 0) ....._.....____._....._____..... 1) ....._.....______....._____..... 2) ______....._____ 3) 4) ________________ 5) - Interpolate small missing sections (uses
Miscellaneous:
- all: np.set_printoptions(legacy='1.21') in order to print 3.0 instead of np.float64(3.0) np>=2.0
- Pose2Sim.py: provided default value in logging parameter
- poseEstimation: clearer error message and logs when no video is found
- synchronization.py: clearer logging messages and slightly better design
- markerAugmentation.py: replaced isnan by isfinite to account for np.inf, too
- kinematics.py: typo in logging
- common.py: interpolate_zero_nans now returns pandas series instead of of numpy array in order not to remove the column name
- edits to tests.py
Full Changelog: v0.10.36...v0.10.37
Fixed ID swaps
-
Corrected LPinky in marker files (position to fixed=true, like all others)
-
Fixed ID swaps:
Non-maximum suppression (NMS) consists in ignoring all bounding boxes that overlap by more than a 0.45 threshold except the one with highest confidence. RTMlib natively runs it.
However, this is done at the person detection level, and was not always satisfactory. Pose estimation does not exclusively look into the detected bounding box, and sometimes finds points outside. In practice, 2 bounding boxes that do not overlap much (large border) can lead to the same detected skeleton.
I recalculated bounding boxes at the pose estimation level, ie based on skeleton detection (thin border), and ran NMS from there. This fixes ID swaps in most cases.

Full Changelog: v0.10.35...v0.10.36
Various edits, eg to solve numpy version issues
-
Limits cv2 version, otherwise forces numpy>=2 which is incompatible with some OpenSim versions
-
Fixed eye position for some marker sets, and added hat_spine to Geometries
-
Back to the previous way for Vicon calibration, since the new one missed some cameras sometimes
-
The py-c3d library on which Pose2Sim was dependent used not to support numpy>=2.0. This has started to cause problems for some users. I worked on the py-c3d library to make it compatible with numpy>=2, made a pull request that was accepted, so this problem is solved now: EmbodiedCognition/py-c3d#54
Full Changelog: v0.10.34...v0.10.35
Fixed GCV filtering + Expired OpenMMLab certificate
- Fixed gcv filtering (careful if series too short: noise can be considered as signal -> no filtering. See this conversation: https://stackoverflow.com/a/79740481/12196632, and this issue: scipy/scipy#23472
- Temporarily ignore SSL certificate verification to handle OpenMMLab's expired certificate
- Handle RTMO if pose_model is not 'body'
Full Changelog: v0.10.33...v0.10.34
More filtering options, fixed vicon calibration, etc
Filtering
-
Added optional Hampel filter for outlier rejection, to be run befur further filtering methods.
Rejects outliers that are outside of a 95% confidence interal from the median in a sliding window of size 7. -
Added GCV spline filter. Automatically determines optimal parameters for each point, which is good when some move faster than others (e.g., fingers vs hips). User can make it biased towards more smoothing (>1) or more fidelity to data (<1) by adjusting the smoothing_factor.
Might severely under or over-smooth due to numerical precision issues, so use with caution. I could not figure out a way to make it more robust, even after normalizing time and/or the observed y values. Feel free to intervene!
Acts as a Butterworth filter if cut_off_frequency is set to an integer instead of 'auto'. -
Fixed Kalman filter. Simplified version, the user says how much more they trust triangulation results (measurements), than the assumption of constant acceleration (process)
-
The available filters are now: Butterworth, Kalman, GCV-spline, LOESS, Median, Gaussian, Butterworth on speed
Vicon calibration
Fix for Vicon calibration conversion by @hariouat: excluding ISDV=0 (optical cameras)
Others
Fixed head marker positions in markersets
Full Changelog: v0.10.31...v0.10.33
Correct image ratio + minor transparent change
- Displayed image is now in the correct ratio and as large as the screen allows
- Added "sections_to_keep" argument (all, largest, first, last)
Full Changelog: v0.10.28...v0.10.32
More small improvements
- More flexible method for finding the best valid chunk of data to triangulate (or select, in the case of sports2d)
- Fixed center of mass and geometries for OpenSim head body
- Small clarifications on Readme
Full Changelog: v0.10.27...v0.10.28
Various minor improvements
- Section on how to run faster inference in Readme
- More flexible kinematic models
- Handling different regional decimal separators (see this issue: #191 (comment))
Full Changelog: v0.10.26...v0.10.27