Skip to content

Releases: davidpagnon/Sports2D

Fixed time range issue in command line

18 Sep 01:12
Compare
Choose a tag to compare

Case insensitive angles

03 Sep 10:37
Compare
Choose a tag to compare
v0.4.2

minor edit in sports2d -h

Various fixes + JOSS

02 Sep 14:37
Compare
Choose a tag to compare

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.
  6. 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
  7. 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
  8. 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

31 Aug 22:16
Compare
Choose a tag to compare

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

24 Mar 22:10
Compare
Choose a tag to compare
0.3.4

test build with specific mediapipe version

fixed body_25 index error

17 Feb 00:17
48139ba
Compare
Choose a tag to compare

fixed body_25 index error
and JOSS submission

Batch analysis enabled

15 Feb 17:55
8436d0c
Compare
Choose a tag to compare
0.3.0

Update continuous-integration.yml

Mixed up frames in video fixed

28 Jan 00:50
Compare
Choose a tag to compare

Finally everything should be working (please), including the colab version

Colab version works again

27 Jan 02:09
Compare
Choose a tag to compare

Colab version works
But body_25b cannot be downloaded anymore -> revert to body_25

fix comparison no longer supported by numpy

26 Jan 22:30
8b0b93d
Compare
Choose a tag to compare

keypt!=[] --> Does not work anymore: need to transform in list

ValueError: operands could not be broadcast together with shapes (2,25,3) (0,)