Preprint
Technical Note

This version is not peer-reviewed.

Mediapipe Pose AI Motion Capture Software for Upper Limb Exercise and Rehabilitative Therapy

Submitted:

21 December 2025

Posted:

23 December 2025

You are already at the latest version

Abstract

Artificial intelligence (AI) based motion capture has revolutionized the field of biomechanics and locomotion analysis by enabling more widespread adoption of the technique. In this realm, the Google based Mediapipe Pose AI motion capture software is a robust platform for close-to-real-time motion capture of many body landmarks stretching from the upper limbs to lower limbs. This preprint reports an attempt to code an in-house Mediapipe Pose based Python motion capture platform useful for upper limb exercise performance analysis, and rehabilitative therapy of upper limbs with dysfunctional muscle control and movement such as in mild stroke patients. Specifically, the software is capable of tracking real-time position and movement of the elbow, wrist, and shoulder joints, and can calculate both the shoulder and elbow joint angle evolution, and angular velocity changes. More importantly, such data are chronicled in both graphs and a frame-by-frame catalogue of joint angle and angular velocity changes, that altogether, serves as useful data for personal evaluation of exercise performance, as well as physiotherapy post-rehab assessment of treatment progress. The software is capable of tracking the full range of motions of the shoulder-elbow movement system, and can be used for a variety of exercise performance tests, as well as for diagnosing and tracking upper limb movement disorders in mild stroke and musculoskeletal dysfunction patients.

Keywords: 
;  ;  ;  ;  ;  
Subject areas: biomedical engineering; computer science; biophysics

1. Introduction

Stroke afflicts an increasing proportion of middle age and early elderly people both in advanced countries and emerging economies.[1] As stroke differentially affects both sides of the body, there is typical misaligned muscle power and dynamics on either the left or right upper limb, that contributes to dysfunction in ability to perform many daily activities.[2,3]
This project seeks to use modern AI-based motion capture by Mediapipe Pose to dynamically capture upper limb movements, catalogue and analyse joint angle evolution, and calculate angular velocity changes to aid in detecting early signs of mild stroke that remains difficult to detect clinically. Chief diagnostic tools for detecting mild stroke using this AI motion capture approach is postulated to be misaligned joint angle evolution, and differential joint angular velocity changes during three repeats of a standard upper shoulder flexion extension exercise. Three repeats are the maximum possible here because of the tremendous amount of computational power needed to execute laptop’s webcam-based AI motion capture by Mediapipe Pose.
Given that Mediapipe Pose motion capture software allows the full range of upper limb motions (both physiotherapist designed as well as mis-tuned) to be captured, it serves as a useful video-based record for physiotherapist to analyse, in detail, the type of pathomechanical gait exhibited, and possibly propose a suitable orthotic treatment for more severe cases. Beyond rehabilitative therapy, the AI motion capture software presented here could also serve as biomechanics gait diagnostic tool for upper limb freedom of movement to help gauge early signs of musculoskeletal disorders or early onset muscle dystrophy.
To help in documenting the motion capture exercise, joint angle changes and joint angular velocity evolution is documented at the per frame level, and the aggregate data is presented in two combinatorial plots (joint angle changes, and angular velocity changes) as well as two Excel files of the corresponding content. Together, these statistics serve as useful feedback for both the patient and physiotherapist; the latter for tracking treatment progress.
Presented here is demonstrative data for a single upper limb shoulder flexion extension rehabilitative exercise designed to analyse and check the overall functional performance of the shoulder-elbow joint movement system, which is responsible for many load-bearing as well as finer motor skills tasks needed for an adult to remain fully functional and independent in daily life. Interested readers are invited to further explore the utility of the software which is deposited on figshare at https://figshare.com/articles/software/_b_Mediapipe_Pose_AI_motion_capture_software_for_upper_limb_exercise_and_rehabilitative_therapy_b_/30681290

2. Implementation Method

At the outset, this AI motion capture software platform is built using the Python programming environment (version 3.11) with Mediapipe Pose providing body landmarks detection and tracking and OpenCV-Python providing computer vision support. Other Python packages used include numpy, matplotlib, random, time, and math.
Computational engine for this software comes from a combination of numeric CPU, graphics GPU, and neural NPU that, altogether, delivers a close to real-time upper limb and hands landmarks detection and tracking, and fast visual reconstruction on the laptop screen. This computational engine also helps realise a suitably fast motion tracking and exercise environment, suitable for capturing a wide range of upper limb rehabilitative exercises for a variety of patient groups and even healthy adults keen on an exercise gaming experience. Hardware platform used for this project is a HP laptop equipped with Intel Core Ultra 5 processor (Model: 125H) with Intel Arc Graphics support, 16 GB of RAM and 512 GB of solid state drive memory.

3. Results and Discussion of Demonstrative Use of Motion Capture Software

Figure 1 shows representative data from a shoulder-elbow flexion extension exercise that is captured by the AI motion capture software developed here. In Figure 1a,c, it can be seen that the flexion and extension cycle can be captured accurately by the software. Given the overlap of the curves for both the right and left shoulder, it is clear that there is no left-right asymmetric behaviour of the musculoskeletal system, indicating no stroke disease effects. On the corresponding angular velocity plots (Figure 1b,d), there are sharp peaks associated with rapid shoulder flexion and extension events, which suggests strong muscle power. Again, there is no left-right asymmetric musculoskeletal problems detected.

Conclusions

AI motion capture via Google Mediapipe Pose platform offers tantalizing possibilities for diagnosing musculoskeletal dysfunction, and tracking rehabilitative treatment progress. Using Mediapipe Pose, an in-house AI motion capture software for tracking joint angle and angular velocity changes of the shoulder-elbow movement system is developed and described here. Demonstrative use of the software tracking a shoulder flexion and extension exercise indicates good joint angle tracking performance with accurate detection of shoulder and elbow joint movement. Such capability allows asymmetric left-right joint movement to be detected, which allows early diagnosis of mild or micro-stroke effects.

Funding

No funding was used in this project.

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Cheng, Y. Projections of the Stroke Burden at the Global, Regional, and National Levels up to 2050 Based on the Global Burden of Disease Study 2021. J. Am. Heart Assoc. 2024, 13(23), e036142. [Google Scholar] [CrossRef] [PubMed]
  2. Rocha, C. D.; Carneiro, I.; Torres, M.; Oliveira, H. P.; Solteiro Pires, E. J.; Silva, M. F. Post-stroke upper limb rehabilitation: clinical practices, compensatory movements, assessment, and trends. Prog. Biomed. Eng. 2025, 7(4), 042001. [Google Scholar] [CrossRef]
  3. Tang, Q. Research trends and hotspots of post-stroke upper limb dysfunction: a bibliometric and visualization analysis. Front. Neurol. 2024, 15-2024. Available online: https://www.frontiersin.org/journals/neurology/articles/10.3389/fneur.2024.1449729. [CrossRef] [PubMed]
Figure 1. Sample output from AI motion capture software recording joint angle and angular velocity changes of a shoulder-elbow flexion-extension exercise. Left panel: joint angle changes, and Right panel: angular velocity changes. Note here that there remains an error bug in the joint angle calculations due possibly to the low system resources available on the budget laptop used for this project.
Figure 1. Sample output from AI motion capture software recording joint angle and angular velocity changes of a shoulder-elbow flexion-extension exercise. Left panel: joint angle changes, and Right panel: angular velocity changes. Note here that there remains an error bug in the joint angle calculations due possibly to the low system resources available on the budget laptop used for this project.
Preprints 190764 g001
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2026 MDPI (Basel, Switzerland) unless otherwise stated