Releases: davidpagnon/Sports2D
Fixed time range issue in command line
Full Changelog: v0.4.4...v0.4.6
Case insensitive angles
v0.4.2 minor edit in sports2d -h
Various fixes + JOSS
Various fixes:
- on webcam processing
- angle plotting
- issues on ubuntu
- added a fontSize parameter
Edited JOSS paper:
Summary:
Sports2D provides a user-friendly solution for automatic and real-time analysis of multi-person human movement from a video or a webcam.
Statement of needs:
A large part of these tools focus on 2D analysis, such as OpenPose
[@Cao_2019], BlazePose
[@Bazarevsky_2020], or DeepLabCut
[@Mathis_2018]. More recently, RTMPose
[@Jiang_2023] offered a faster, more accurate, and more flexible alternative to the previous solutions.
Added method details
Sports2D:
- Reads stream from a webcam, from one video, or from a list of videos. Selects the specified time range to process.
- Sets up the RTMLib pose tracker from RTMlib with specified parameters. It can be run in lightweight, balanced, or performance mode, and for faster inference, keypoints can be tracked for a certain number of frames instead of detected. Any RTMPose model can be used.
- Tracks people so that their IDs are consistent across frames. A person is associated to another in the next frame when they are at a small distance. IDs remain consistent even if the person disappears from a few frames. This carefully crafted
sports2d
tracker runs at a comparable speed as the RTMlib one but is much more robust. The user can still choose the RTMLib method if they need it by specifying it in the Config.toml file. . - Retrieves the keypoints with high enough confidence, and only keeps the persons with enough average high-confidence.
- Computes the selected joint and segment angles, and flips them on the left/right side if the respective foot is pointing to the left/right. The user can select which angles they want to compute, display, and save.
- Draws bounding boxes around each person and writes their IDs
Draws the skeleton and the keypoints, with a green to red color scale to account for their confidence
Draws joint and segment angles on the body, and writes the values either near the joint/segment, or on the upper-left of the image with a progress bar - Interpolates missing pose and angle sequences if gaps are not too large. Filters them with the selected filter (among
Butterworth
,Gaussian
,LOESS
, orMedian
) and their parameters - Optionally show processed images, saves them, or saves them as a video
Optionally plots pose and angle data before and after processing for comparison
Optionally saves poses for each person as a TRC file, and angles as a MOT file
The Demo video Sports2D is tested on is voluntarily challenging, in order to demonstrate the robustness of the process after sorting, interpolation and filtering. It contains:
- One person walking in the sagittal plane
- One person in the frontal plane. This person then performs a flip while being backlit, both of which are challenging for the pose detection algorithm
- One tiny person flickering in the background who needs to be ignored
Complete rewriting of the code
Rewrote the code after @hunminkim98's tests on (1) angle visualization, (2) with RTMPose, (3) including on webcam.
Gave an impulse to implement many other changes:
- Used RTMPose rather than OpenPose or BlazePose (faster, more accurate, more flexible)
- Single process for both pose and angle estimation
- Webcam analysis available
- Body angle visualization
- Used entry points by default for clarity and simplicity
- Saved as OpenSim files: TRC for pose, MOT for angles
- Clearer documentation
- Better demo video
- Improved tracking IDs across frames
- Added some segment angles: Pelvis, Shoulders, Head
Better angle unwrapping and various fixes
0.3.4 test build with specific mediapipe version
fixed body_25 index error
fixed body_25 index error
and JOSS submission
Batch analysis enabled
0.3.0 Update continuous-integration.yml
Mixed up frames in video fixed
Finally everything should be working (please), including the colab version
Colab version works again
Colab version works
But body_25b cannot be downloaded anymore -> revert to body_25
fix comparison no longer supported by numpy
keypt!=[] --> Does not work anymore: need to transform in list
ValueError: operands could not be broadcast together with shapes (2,25,3) (0,)