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***:
1. Reads stream from a webcam, from one video, or from a list of videos. Selects the specified time range to process.
2. 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.
3. 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. .
4. Retrieves the keypoints with high enough confidence, and only keeps the persons with enough average high-confidence.
5. 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.
5. 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
6. Interpolates missing pose and angle sequences if gaps are not too large. Filters them with the selected filter (among `Butterworth`, `Gaussian`, `LOESS`, or `Median`) and their parameters
7. 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