Skip to content

Running analysis built on top of tensorflow's movenet thunder model.

Notifications You must be signed in to change notification settings

Schiggy-3000/movenet_running_analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movenet Running Analysis

A running analysis tool based on tensorflow's movenet thunder model!
TensorFlow MoveNet

Table of Contents
  1. About The Project
  2. Example
  3. Installation

About The Project

Tensorflow built several models for pose estimation based on computer vision techniques that detect human figures in images and videos. This allows, for example, to determine where someone's elbow shows up in an image. These pose estimation models take processed camera images as input and return information about keypoints, such as eyes, shoulders, and knees. Following the conclusive list of keypoints detected by these models.

  • nose: 0
  • left_eye: 1
  • right_eye: 2
  • left_ear: 3
  • right_ear: 4
  • left_shoulder: 5
  • right_shoulder: 6
  • left_elbow: 7
  • right_elbow: 8
  • left_wrist: 9
  • right_wrist: 10
  • left_hip: 11
  • right_hip: 12
  • left_knee: 13
  • right_knee: 14
  • left_ankle: 15
  • right_ankle: 16

This project builds on top of one of these pretrained models, MoveNet Thunder, using its infered keypoints for running analysis in athletes (see 'Example' section down below). This iteration of the project is solely concerned with extracting relevant parameters from brief video sequences. The main.py script allows to toggle between parameters of interest.

The next iteration of the project implements real time camera input, while still extracting analytics from the video stream. This necessitates optimized code such that the frame rate is still adequate for analysis.

(back to top)

Example

Following an example of some parameters that are extracted by the movenet_running_analysis scripts.

ANNOTATED_jes_woods_nike_coach

  • VD (relative to leg length) is the maximum vertical distance the center of mass has traveled.
  • Left knee angle is the angle formed by ankle, knee and hip of the left leg.
  • Right knee angle is the angle formed by ankle, knee and hip of the right leg.
  • Knee angle min. is the minimum angle formed by the ankle, knee and hip of either leg.
  • Total steps is a counter of the steps taken.
  • Cadence measures steps per minute.
  • Leading ankle to CoM max. (relative to leg length) the maximum distance an ankle came in front of the center of mass (CoM).
  • Trailing ankle max. (relative to leg length) the maximum distance an ankle traveled behind the center of mass (CoM).

There are plenty more metrics that can be toggled, depending on the analysis one aims to do.

(back to top)

Installation

Clone and apply this running analysis tool on your own device.

  1. Clone the repo
    gh repo clone Schiggy-3000/movenet_running_analysis
    
  2. Navigate to project
    cd \path\to\movenet_running_analysis
  3. Build virtual environment
    python -m venv myvenv
  4. Activate virtual environment
    .\myvenv\Scripts\activate
  5. Install dependencies
    pip install -r requirements.txt
  6. Execute main.py
    python.exe .\main.py

(back to top)