AI Interactive Fitness Trainer
AI Interactive Fitness Trainer
Project Report
Entitled
Bachelor of Technology
(Electronics and Communication)
Guided By :
(Year: 2024-25)
CERTIFICATE
This is to certify that the Project Report entitled “Real-Time Pose-Based Inter-
active Fitness Assistant” is presented & submitted by Gaurav Gupta, Anshul Garg,
Yash Goyal bearing Roll No. U21EC153, U21EC157, U21EC164 of B.Tech. IV, 7th
Semester in the partial fulfillment of the requirement for the award of B.Tech. Degree
in Electronics & Communication Engineering for academic year 2024-25.
They have successfully and satisfactorily completed their Project Exam in all re-
spects. We certify that the work is comprehensive, complete and fit for evaluation.
PROJECT EXAMINERS:
December 2024
v
Abstract
This report presents the design, development, and implementation of a hand gesture-
based gym training system designed to revolutionize fitness tracking through advanced
posture and gesture recognition technologies. Using OpenCV and MediaPipe frame-
works, the system enables real-time monitoring of exercises like push-up counting,
plank detection, and dumbbell curl tracking. By ensuring proper form and delivering
precise feedback, it enhances workout efficiency and reduces injury risks.
The report begins with a detailed review of literature, covering advancements in
posture recognition, deep learning applications, and sensor-based approaches. It high-
lights the growing role of computer vision in health and fitness while addressing chal-
lenges like real-time performance, environmental variability, and user diversity. The
importance of combining mathematical models, decision logic, and pose estimation
techniques to create a robust and accurate system is emphasized.
The system’s workflow is outlined, detailing the process from gesture recognition
to exercise-specific analysis. Key components include posture recognition, accuracy
assessment, and performance metric calculations using techniques like angle measure-
ments, pose validation, and metrics such as True Positive, True Negative, False Posi-
tive, and False Negative rates. The integration of OpenCV and MediaPipe showcases
the system’s adaptability to various fitness scenarios.
Future applications include 3D pose estimation, VR, and mobile platforms, with
enhancements like wearable compatibility, AI-driven personalization, and gamification
for an engaging user experience. The system’s potential in rehabilitation and global
healthcare further highlights its versatility and scalability.
This project demonstrates the transformative impact of artificial intelligence and
computer vision in fitness and healthcare, offering an innovative and efficient solution
for personalized workout tracking and performance analysis.
vii
Table of Contents
Page
Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
List of Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Chapters
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Flow of the Organization . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1 Deep Learning-Based Posture Estimation . . . . . . . . . . . . . . . . 5
2.2 Sensor-Based Posture Recognition . . . . . . . . . . . . . . . . . . . . 5
2.3 Posture Recognition in Healthcare and Ergonomics . . . . . . . . . . . 6
2.4 Challenges and Limitations in Posture Recognition . . . . . . . . . . . 7
3 System Design & Methodology . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 OpenCV for Posture and Gesture Recognition . . . . . . . . . . . . . . 9
3.1.1 OpenCV Overview . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.2 Key Features of OpenCV . . . . . . . . . . . . . . . . . . . . . 10
3.2 MediaPipe for Posture and Gesture Recognition . . . . . . . . . . . . . 10
3.2.1 MediaPipe Overview . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.2 Key Features of MediaPipe . . . . . . . . . . . . . . . . . . . . 10
3.3 Combining OpenCV and MediaPipe for Posture Recognition . . . . . . 11
3.3.1 Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.4 Hand Gesture Integration . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4.1 Gesture Recognition with MediaPipe . . . . . . . . . . . . . . 13
3.4.2 Workflow for Gesture-Based Control . . . . . . . . . . . . . . 14
3.5 Flowchart of Posture and Gesture Recognition Workflow . . . . . . . . 14
4 Implementation of Hand Gesture-Based Gym Training System . . . . . . . . 17
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Detailed Explanation of Exercises . . . . . . . . . . . . . . . . . . . . 17
4.2.1 Push-Up Counter . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2.2 Plank Detection . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.2.3 Proposed Criteria for Correct Biceps Curl Form . . . . . . . . . 20
ix
Table of Contents
x
List of Figures
xi
List of Tables
xiii
List of Abbreviations
3GPP 3rd Generation Partnership Project
AVC Advanced Video Coding
CIF Common Intermediate Format (352 × 288)
CSE Common Subexpression Elimination
DMB Digital Multimedia Broadcasting
DVB-H Digital Video Broadcasting - Handheld
HDTV High-definition Television
IAU Input Adder Unit
IEC International Electrotechnical Commission
ISDN Integrated Services Digital Network
ISO International Organization for Standardization
ITU International Telecommunication Union
JVT Joint Video Team
JPEG Joint Photographic Experts Group
MPEG Moving Picture Experts Group
NTSC National Television System Committee
OAU Output Adder Unit
PAL Phase Alternating Line
QCIF Quarter Common Intermediate Format (176 x 120)
SAU Shift Adder Unit
SD Standard-definition (720 x 576/480 pixels)
SIF Advanced Television Systems Committee
VCEG Video Coding Experts Group
xv
Chapter 1
Introduction
The evolution of technology has significantly transformed the way people approach
fitness and wellness. With the advent of portable devices, high-speed internet, and
innovative software solutions, fitness enthusiasts now have access to a wide range of
tools and applications designed to support their health goals. However, despite these
advances, there is a significant gap in the realm of interactive and real-time fitness
guidance, which is critical to ensuring exercise effectiveness and safety.
The proposed project, Real-Time Pose-Based Interactive Fitness Assistant, aims to
address this gap by developing an intelligent fitness assistance system. Using cutting-
edge computer vision technologies such as Mediapipe and OpenCV, the project fo-
cuses on analyzing human body movements to provide real-time feedback on posture
and form. Unlike traditional fitness applications that rely on static instructions or pre-
recorded videos, this system dynamically evaluates user performance, ensuring that
exercises are performed correctly and efficiently.
This project emphasizes accessibility and engagement by incorporating gesture-
based controls and real-time performance tracking to create a seamless and interactive
experience. With dedicated modules for popular exercises such as push-ups, planks,
and bicep curls, the system aims to provide high-quality fitness training for enthusiasts
of all skill levels.
1.1 Motivation
The growing trend of home-based fitness solutions has been fueled by the increasing
demand for flexible and cost-effective ways to stay fit. Traditional methods, such as
personal trainers or gym memberships, often come with significant time and financial
commitments. The convenience of home-based workouts, however, presents new chal-
lenges—chiefly the lack of real-time guidance to ensure that exercises are performed
with the correct form and intensity.
Incorrect form can result in reduced effectiveness and increased risk of injury. Addi-
tionally, switching between exercises manually or navigating through different screens
disrupts the workout flow, reducing engagement and overall workout quality. To bridge
this gap, the Real-Time Pose-Based Interactive Fitness Assistant leverages real-time
posture analysis and gesture-based interaction, offering a seamless, hands-free expe-
rience for users. The motivation for this project stems from the desire to provide an
intelligent, user-friendly solution that enhances exercise effectiveness, promotes safety,
and ensures that users stay engaged throughout their workouts.
1
Chapter 1. Introduction
• Obesity,
• Poor posture,
• Muscular atrophy.
Physical activity is crucial to counter these issues; however, several barriers prevent
individuals from accessing traditional fitness resources such as personal trainers, gyms,
or structured workout programs.
Home-based fitness solutions have gained popularity as flexible and cost-effective
alternatives. Despite their popularity, these solutions suffer from significant limitations:
1.3 Objectives
The primary objectives of the Real-Time Pose-Based Interactive Fitness Assistant are:
2
1.3. Objectives
* Switching exercises.
* Viewing progress metrics.
– Eliminate interruptions caused by manual navigation.
3
Chapter 1. Introduction
4
Chapter 2
Literature Review
5
Chapter 2. Literature Review
utilized wearable sensors and wireless data transmission to recognize human poses,
offering a comprehensive analysis of posture deviations during physical activities [4].
Additionally, researchers have integrated sensor data with mobile applications to deliver
real-time feedback to users, providing posture correction tips via Bluetooth-enabled
wearable devices.
Figure 2.1 illustrates an example of sensor-based posture recognition for detecting bad
seating posture. This system utilizes wearable sensors to monitor a user’s sitting posture
and detect deviations that may lead to discomfort or long-term musculoskeletal issues.
The real-time feedback provided by the system helps in correcting posture for better
health outcomes.
One of the primary challenges in sensor-based posture recognition is the need for
users to wear additional devices. These devices, while effective in collecting data, can
be cumbersome or uncomfortable, which may lead to lower compliance rates among
users. However, recent advancements in textile-based sensors embedded in clothing
and ergonomic wearables have made it easier for users to integrate these systems into
their daily routines. By combining sensor-based systems with smartphone applications,
researchers have created highly accessible posture correction systems that offer a seam-
less user experience [5].
6
2.4. Challenges and Limitations in Posture Recognition
Figure 2.2 shows an example of posture recognition used in healthcare settings. This
system helps healthcare professionals assess postural deviations and prevent injury
through real-time analysis and correction during daily activities. The integration of
AI helps offer personalized recommendations based on unique body mechanics.
Additionally, AI algorithms are being used to process posture data collected from
wearable devices or sensors, enabling personalized recommendations based on an in-
dividual’s unique body mechanics and movement patterns. By incorporating real-time
feedback, AI systems help users adjust their posture dynamically during daily activities,
thus promoting better health outcomes and enhancing workplace productivity [8].
7
Chapter 2. Literature Review
• Reducing Device Dependence: The system eliminates the need for wearable de-
vices by using gesture-based controls through Mediapipe’s hand-tracking mod-
ule, allowing users to interact seamlessly with the system using simple gestures.
These strategies ensure the system provides accurate, real-time feedback while main-
taining ease of use and adaptability for all users.
8
Chapter 3
System Design & Methodology
In recent years, computer vision and machine learning have revolutionized several do-
mains, including healthcare, robotics, entertainment, and sports, by enabling machines
to interpret and interact with the visual world. To achieve this, the field has seen the rise
of several powerful libraries and frameworks. Two prominent technologies in this space
are OpenCV and MediaPipe, which play a crucial role in posture recognition, motion
tracking, and gesture recognition systems [11].
OpenCV (Open Source Computer Vision Library) is a widely used open-source
software library that provides real-time computer vision capabilities. It includes a vast
collection of algorithms for image processing, video analysis, object detection, and
more. OpenCV is compatible with various programming languages such as Python,
C++, and Java and is highly optimized for real-time processing on both CPUs and
GPUs [12].
MediaPipe, developed by Google, is an open-source framework primarily designed
for building cross-platform multimodal applied machine learning pipelines. MediaPipe
is a powerful tool for the development of real-time computer vision applications such as
posture detection, gesture recognition, and hand tracking. It provides a highly efficient
pipeline that can process images and videos to detect key points of the human body and
interpret human gestures [13].
Both OpenCV and MediaPipe are extensively used together in various domains like
sports and fitness, healthcare, and interactive user interfaces. This section explores
the core features and methodologies behind OpenCV and MediaPipe, providing insight
into how they work individually and synergistically in posture and gesture recognition
applications.
OpenCV is a popular open-source computer vision library designed for real-time image
and video processing. It supports a wide range of tasks, including image manipula-
tion, feature detection, object tracking, face recognition, and more. OpenCV’s capabil-
ities make it ideal for posture recognition, where real-time processing and accuracy are
paramount [14].
9
Chapter 3. System Design & Methodology
10
3.3. Combining OpenCV and MediaPipe for Posture Recognition
• Hand Tracking: MediaPipe’s Hand Tracking model is one of the most ad-
vanced and efficient systems for detecting and tracking the position of a person’s
hands. It is particularly useful for gesture-based interactions in fitness and gaming
applications. [18]
Figure 3.1 illustrates the preprocessing stage, where raw video frames captured from
the camera are processed to enhance image quality. Techniques such as resizing, noise
reduction, and histogram equalization are applied using OpenCV [19]. This step en-
sures optimal input for subsequent posture recognition processes by improving clarity
and reducing artifacts.
3.3.1 Workflow
The posture recognition system involves several interconnected stages, each contribut-
ing to the overall functionality and accuracy of the system. The workflow is designed
to provide real-time, precise, and user-friendly feedback to ensure safe and effective
exercises.
11
Chapter 3. System Design & Methodology
• Video Capture: The system begins by capturing video frames using a camera,
which serves as the input source. These frames are processed in real time to en-
sure optimal quality for analysis. OpenCV is employed at this stage for basic
preprocessing tasks, including resizing, color space conversion, and noise reduc-
tion. These preprocessing steps enhance the image clarity, which is critical for
accurate detection of body landmarks [20].
• Feature Extraction: Once key points are detected, additional features like angles
between joints and distances between landmarks are calculated. These features
are crucial for detailed feedback on the user’s posture and technique [21].
• Posture Evaluation: The extracted features are compared with ideal postures
stored in the system. For example, the system checks if the hips and shoulders
are aligned during a plank, or evaluates the depth and alignment of the torso
during a push-up.
• Progress Tracking and Analysis: The system records performance metrics such
as the number of correct repetitions, average form accuracy, and workout du-
ration. These statistics are displayed on the user interface, enabling progress
tracking and identifying areas for improvement [22].
Figure 3.2 depicts the detection of body landmarks using MediaPipe’s Pose model.
It highlights the 33 key body points identified during posture analysis. These land-
marks are dynamically tracked across frames to evaluate posture alignment and detect
deviations from ideal forms during exercises like planks or push-ups.
This integrated approach not only enhances the user’s workout experience by ensur-
ing safety and effectiveness but also democratizes access to professional-level fitness
12
3.4. Hand Gesture Integration
guidance, making it more accessible and engaging for users of all levels. Through the
synergistic use of OpenCV and MediaPipe, the posture recognition system bridges the
gap between traditional fitness methods and modern technological advancements.
13
Chapter 3. System Design & Methodology
Figure 3.3 illustrates the hand gesture recognition process powered by MediaPipe’s
Hand Tracking model. The figure highlights the identification of 21 distinct landmarks
that facilitate gesture-based controls. For example, a swipe gesture can be used to
switch between workout exercises, while a thumbs-up gesture might initiate the work-
out. This real-time tracking capability ensures an intuitive, user-friendly interface, al-
lowing users to stay engaged with their fitness activities without interruptions.
14
3.5. Flowchart of Posture and Gesture Recognition Workflow
feedback generation. Video frames are first preprocessed using OpenCV to enhance
quality through resizing, noise reduction, and background filtering, ensuring clean in-
put for analysis. MediaPipe then detects key body landmarks, such as joints and limb
positions, with high accuracy, forming the basis for feature extraction.
Posture Evaluation
Continuous Monitoring
End
During feature extraction, metrics like joint angles and distances are calculated to
evaluate the user’s posture and identify deviations from ideal poses or gestures. The
system provides interactive real-time feedback, enabling users to correct and improve
their posture continuously. By combining OpenCV’s preprocessing capabilities with
MediaPipe’s pose estimation, the system ensures precise analysis and seamless opera-
tion for effective posture recognition.
Overall, this chapter outlines the system design and methodology for the Real-
Time Pose-Based Interactive Fitness Assistant, which integrates advanced technolo-
15
Chapter 3. System Design & Methodology
gies for posture and gesture recognition. It describes how real-time video process-
ing, key point detection, and posture evaluation are achieved through a combination of
OpenCV and MediaPipe. The system utilizes OpenCV for preprocessing and feature
extraction, while MediaPipe handles pose estimation and hand tracking. By combining
the strengths of these two technologies, the system provides users with real-time feed-
back and performance tracking, ensuring an effective and interactive fitness experience
through the synergistic use of MediaPipe and OpenCV.
16
Chapter 4
Implementation of Hand Gesture-Based Gym
Training System
4.1 Introduction
This chapter details the implementation of a hand gesture-based gym training system
designed for exercise repetition counting and form monitoring using real-time computer
vision techniques. Leveraging MediaPipe’s pose and hand tracking models, the system
detects body landmarks and gestures through a webcam feed. Users interact using hand
gestures to select exercises, including push-ups, plank holds, and dumbbell curls. The
system ensures correct form while counting repetitions automatically.
Push-Ups: The system tracks body alignment and motion depth, ensuring proper
posture and counting repetitions.
Plank Holds: It monitors core alignment and stability, advising users on maintain-
ing correct posture for improved endurance.
Dumbbell Curls: Arm movement and range of motion are analyzed to ensure
proper form, targeting biceps effectively.
This interactive system enhances gym training by providing real-time feedback and
tracking progress for optimal performance.
The push-up counter leverages MediaPipe’s pose detection to monitor the shoulder,
elbow, and wrist positions for accurate form detection and repetition counting. In ad-
dition to providing real-time feedback, the system uses a performance evaluation ap-
proach based on quantitative analysis using a confusion matrix to classify and vali-
date push-up performance as either correct or incorrect.
17
Chapter 4. Implementation of Hand Gesture-Based Gym Training System
• The angle between the shoulder, elbow, and wrist (θ) is less than 90° [23]
at the lowest level.
• The angle exceeds 160° [24] at the highest level.
The system checks the body’s alignment to ensure the shoulders dip below the
elbows for proper range of motion.
2. Repetition Counting: Repetition is counted when the user completes one full
motion, lowering the body and returning to the initial position. Thresholds are
established to detect transitions between the lowest and highest levels.
3. Feedback Mechanism: If the user fails to dip below the threshold angle or does
not extend fully, the system provides corrective feedback, promoting proper form
and reducing the risk of injury.
• Elbow angles
• Shoulder-to-elbow ratio
• Body balance
• Waist alignment
• Knee straightness
These criteria determine whether a push-up is correct or incorrect. The matrix classifies
predictions into four categories:
18
4.2. Detailed Explanation of Exercises
• Precision: Measures how many predicted correct push-ups are actually correct:
TP
Precision =
TP + FP
• Recall (Sensitivity): Measures how many actual correct push-ups are identified:
TP
Recall =
TP + FN
1. Elbow Angles:
• Correct push-ups: Elbow angles are 50°–70° at the lowest level and exceed
150° [26] at the highest level.
• Incorrect push-ups: Elbow angles remain 100°–140° [27] at the lowest level,
failing to dip sufficiently.
• Correct push-ups: R < 0.5 at the lowest level and R > 0.85 [28] at the
highest level.
19
Chapter 4. Implementation of Hand Gesture-Based Gym Training System
• Incorrect push-ups: R falls between 0.6 and 0.8, indicating insufficient low-
ering.
• Correct push-ups: Angles are 160°–180° [23] for both waist and knees.
• Incorrect push-ups: Angles fall below 150°, indicating improper alignment.
Table 4.2: Measurement Results and Performance Metrics for Push-Up Classification
• Holding Duration: The system can be extended to calculate how long the user
holds the plank, providing a timer and feedback on plank endurance.
20
4.2. Detailed Explanation of Exercises
• At the starting position, the arm is fully extended, with the angle (β) between the
upper arm and forearm close to 180◦ [30].
• At the top of the curl, the arm is fully contracted, with β reaching approximately
45◦ .
Minimum Contraction
At the top of the curl, the angle between the upper arm and forearm must drop below
70 [29] to confirm the user is lifting the weight all the way up.
Correct Form
• The movement follows the full range of motion (180◦ to 45◦ ) [24] without exces-
sive shoulder rotation or incomplete contraction.
Incorrect Form
One or more of the following issues are detected:
• Forearm angle at the top does not drop below 70, indicating incomplete contrac-
tion.
21
Chapter 4. Implementation of Hand Gesture-Based Gym Training System
• Precision: Evaluates the proportion of true positive classifications among all pre-
dicted correct curls.
Metric Value
True Positive (TP) 0.623
False Positive (FP) 0.086
False Negative (FN) 0.014
True Negative (TN) 0.277
Accuracy 90.00%
Precision 87.82%
Recall 97.86%
F1-Score 92.57%
22
4.6. Mathematical Formulation and Decision Logic
Each of these exercises is implemented to ensure accurate tracking and user feedback,
promoting proper form and efficiency in workouts [25]. The use of mathematical for-
mulas for angle calculations and Mediapipe’s robust pose detection enables a highly
responsive and reliable training system.
where:
⃗ = (x2 − x1 , y2 − y1 ),
AB ⃗ = (x3 − x2 , y3 − y2 )
BC
⃗ · BC
AB ⃗ = (x2 − x1 )(x3 − x2 ) + (y2 − y1 )(y3 − y2 )
The calculated angle θ is used to determine whether the user is in the correct posture
for the exercise.
160◦ ≤ α ≤ 180◦
The function is plank() implements this logic to confirm if the user is holding
a plank position correctly. Minor variations are tolerated to account for natural body
movement.
23
Chapter 4. Implementation of Hand Gesture-Based Gym Training System
• Push-Up Counter: The code tracks the relative positions of the shoulders and el-
bows. A repetition is counted when the shoulders dip below a specified threshold
relative to the elbows and then return to the original position.
• Dumbbell Curl Counter: The angle β between the upper arm and forearm is cal-
culated. The system uses thresholds to detect full extension and full contraction
of the arm:
If β ≤ 45◦ (arm fully contracted) and then β ≥ 160◦ (arm fully extended), count a curl.
Function c a l c u l a t e a n g l e ( a , b , c ) :
C a l c u l a t e angle between t h r e e p o i n t s using dot p r o d u c t
Return angle
F u n c t i o n i s p l a n k ( s ho u ld e r , hip , a n k l e ) :
C a l c u l a t e angle between p o i n t s
Check i f a n g l e i s w i t h i n p l a n k range
Return True i f plank p o s i t i o n , o t h e r w i s e F a l s e
Class PoseDetector :
I n i t i a l i z e pose d e t e c t o r
F u n c t i o n f i n d P o s e ( image , draw= T r u e ) :
C o n v e r t image t o RGB
Detect pose landmarks
Draw l a n d m a r k s i f draw= T r u e
R e t u r n p r o c e s s e d image
F u n c t i o n f i n d P o s i t i o n ( image , draw= T r u e ) :
Return l i s t of landmark p o s i t i o n s
F u n c t i o n f i n d A n g l e ( image , p1 , p2 , p3 , draw= T r u e ) :
24
4.7. Pseudocode of the System
Main Program :
While T r u e :
Call select model ()
I f model i s s e l e c t e d :
Call run selected model ()
I f u s e r wants to q u i t :
E x i t program
Else :
E x i t program
25
Chapter 4. Implementation of Hand Gesture-Based Gym Training System
This project highlights the potential of combining machine learning and mathemati-
cal algorithms to enhance fitness tracking systems, offering significant advancements in
health monitoring and interactive exercise technologies. By leveraging real-time data,
the system not only helps users optimize their workout routines but also contributes to
fostering a more personalized approach to fitness. As it evolves, this approach could be
expanded to include more complex exercises and even integrate with wearable devices,
further enriching the user’s fitness journey.
Moreover, the scalability of this system allows for potential integration with other
fitness platforms, creating a more connected and comprehensive ecosystem for health
management. With continuous improvements in AI and computer vision technology,
the system can adapt to a wide range of users, from beginners to advanced athletes,
providing customized feedback and progress tracking. This could transform the way in-
dividuals engage with their fitness goals, making training more accessible, data-driven,
and effective in achieving long-term health benefits.
26
Chapter 5
Results & Analysis
The chapter provides a comprehensive analysis of the results achieved by the hand
gesture-based gym training system, showcasing its ability to detect and analyze exer-
cises such as push-ups, planks, and dumbbell curls with remarkable accuracy. By lever-
aging advanced technologies like MediaPipe and OpenCV, the system offers real-time
pose estimation and motion tracking, ensuring users receive precise feedback on their
exercise form. The innovative gesture-based interface eliminates the need for external
input devices, creating a seamless and interactive user experience for exercise selec-
tion. Detailed visual outputs highlight correct and incorrect postures, demonstrating
the system’s capability to differentiate between optimal and suboptimal forms. Metrics
such as alignment accuracy and gesture detection precision underline the robustness
and reliability of the implementation.
27
Chapter 5. Results & Analysis
Figure 5.3: Finger in the plank Figure 5.4: Finger in the bicep-curl
selection section. selection section.
28
5.2. Push-Up Detection Results
Figure 5.7: Correct body alignment in Figure 5.8: Proper push-up posture
a push-up (Front view). captured (Elbow at 90°).
Figure 5.9: Misaligned body during Figure 5.10: Push-up with insufficient
push-up. depth.
29
Chapter 5. Results & Analysis
30
5.5. Summary of Results
Figure 5.17: Swinging body motion. Figure 5.18: Partial range of motion.
31
Chapter 6
Conclusion & Future Scope
6.1 Conclusion
Real-Time Pose-Based Interactive Fitness Assistant project demonstrates the integra-
tion of computer vision technologies, specifically OpenCV and MediaPipe, to create an
interactive and intelligent fitness training system. Real-time pose detection and gesture
recognition provide users with immediate feedback on their workout form, aiding in
posture correction and injury prevention. This system offers a cost-effective alternative
to traditional personal training, making fitness guidance more accessible for home use.
By combining OpenCV’s image processing capabilities with MediaPipe’s machine
learning models, precise tracking of key body landmarks is achieved, allowing the sys-
tem to evaluate and correct exercises such as planks, push-ups, and bicep curls. Visual
and audio feedback further enhances the user experience by providing real-time correc-
tions.
Future developments could include features such as simultaneous tracking of mul-
tiple users, voice recognition for personalized coaching, and an expanded exercise
database. Additionally, optimizing the system for mobile devices could broaden its
accessibility and functionality.
The Pose-Based Fitness Trainer project illustrates the potential of leveraging com-
puter vision and machine learning technologies in the fitness industry to improve exer-
cise techniques and support users in achieving their fitness goals.
33
Chapter 6. Conclusion & Future Scope
mance insights, injury prevention tips, and real-time guidance during workouts. Gam-
ification features, such as challenges, leaderboards, and social sharing, will boost user
engagement and motivation.
AI-powered personalization will adapt workouts based on user goals, progress, and
medical history, ensuring a tailored experience. The system can also be expanded for
healthcare applications, such as physical therapy and rehabilitation, allowing remote
monitoring of patients and supporting recovery.
To reach a broader audience, the system can introduce multilingual support and
lightweight versions for low-resource devices. Collaborations with fitness brands can
further integrate the system into existing fitness ecosystems, expanding its impact.
These advancements will transform the Real-Time Pose-Based Interactive Fitness
Assistant into a comprehensive, accessible solution for fitness, wellness, and rehabilita-
tion.
34
References
[1] RandomForestGump, “Profitness: Ai-based trainer app using streamlit, opencv,
and mediapipe,” 2024.
[2] V. Bazarevsky and I. Grishchenko, “On-device, real-time body pose tracking with
mediapipe blazepose,” Google AI Blog, 2020.
[3] J. Wang and et al., “A review of computer vision-based pose estimation techniques
for human activity recognition,” Pattern Recognition Letters, vol. 150, pp. 30–40,
2022.
[4] D. Rokade, “Real-time pose tracking and detection using mediapipe and opencv,”
2024.
[5] S. Kulkarni and N. Kashikar, “Real-time human pose tracking using opencv and
tensorflow,” in Proceedings of the International Conference on Computer Vision
Applications. Springer, 2023, pp. 50–60.
[7] Y. Kwon and D. Kim, “Real-time workout posture correction using opencv and
mediapipe,” The Journal of Korean Institute of Information Technology, vol. 20,
no. 1, pp. 199–208, 2022.
[11] O. Contributors, OpenCV: Computer Vision with Python. O’Reilly Media, 2024.
[12] G. Bradski and A. Kaehler, Learning OpenCV: Computer Vision with the OpenCV
Library. O’Reilly Media, 2020.
35
References
[14] L. Chen and A. Wong, “A comparative analysis of mediapipe and openpose for
real-time pose estimation,” International Journal of Computer Vision, vol. 135,
pp. 78–90, 2023.
[15] J. Smith and J. Doe, “Applications of pose estimation in fitness and healthcare,”
2023.
[19] D. Berndt and J. Clifford, “Using dynamic time warping to find patterns in time
series,” in AAAIWS, 1994.
[20] Z. Cao, T. Simon, S. Wei, and Y. Sheikh, “Realtime multiperson 2d pose estima-
tion using part affinity fields,” in CVPR, 2017.
[22] M. Adams, “The gap in fitness feedback mechanisms,” Tech Innovations in Fit-
ness, vol. 45, pp. 88–97, 2023.
[23] M. Jones and P. Taylor, “Integrating computer vision into fitness training apps,”
Journal of Health Informatics, vol. 14, no. 6, pp. 200–215, 2021.
[25] P. Zell, B. Wandt, and B. Rosenhahn, “Joint 3d human motion capture and physical
analysis from monocular videos,” in CVPR Workshops, 2017.
[26] R. King and D. Patel, “Machine learning techniques for human activity recogni-
tion,” Journal of Machine Learning Applications, vol. 8, no. 4, pp. 76–88, 2018.
[27] T. Smith and K. Brown, “Ai-driven fitness applications for personalized training,”
Journal of Sports Science and Technology, vol. 12, no. 1, pp. 33–44, 2019.
36
References
[28] A. Gupta and R. Verma, “Evaluation of openpose for real-time exercise monitor-
ing,” Computer Vision and Sports Applications, vol. 3, no. 2, pp. 100–115, 2020.
[29] H. Jeon and M. Lee, “Kinematic and kinetic analysis of the human shoulder during
arm lifting in different postures,” Journal of Electromyography and Kinesiology,
vol. 14, no. 4, pp. 415–425, 2004.
[30] M. Chen and A. Hernández, “Towards an explainable model for sepsis detection
based on sensitivity analysis,” IRBM, vol. 43, no. 1, pp. 75–86, 2022.
[31] H. J. Lee and S. Park, “Gesture control advantages in interactive systems,” Journal
of Human-Computer Interaction, vol. 18, no. 4, pp. 267–278, 2023.
37