Automated Classification of Baseball Pitching Phases Using Machine Learning and Artificial Intelligence-Based Posture Estimation PDF Free Download

1 / 16
0 views16 pages

Automated Classification of Baseball Pitching Phases Using Machine Learning and Artificial Intelligence-Based Posture Estimation PDF Free Download

Automated Classification of Baseball Pitching Phases Using Machine Learning and Artificial Intelligence-Based Posture Estimation PDF free Download. Think more deeply and widely.

Kobe University Repository : Kernel
PDF issue: 2025-12-23
Automated Classification of Baseball Pitching
Phases Using Machine Learning and Artificial
Intelligence-Based Posture Estimation
(Citation)
Applied Sciences,15(22):12155
(Issue Date)
2025-11-16
(Resource Type)
journal article
(Version)
Version of Record
(Rights)
© 2025 by the authors. Licensee MDPI, Basel, Switzerland.
This article is an open access article distributed under the terms and conditions of
the Creative Commons Attribution (CC BY) license
(URL)
https://hdl.handle.net/20.500.14094/0100498791
Osawa, Shin ; Inui, Atsuyuki ; Mifune, Yutaka ; Yamaura, Kohei ;
Yoshikawa, Tomoya ; Shinohara, Issei ; Kusunose, Masaya ; Tanaka, Shuy…
; Takigami, Shunsaku ; Ehara, Yutaka ; Nakabayashi, Daiji ; Higashi,
Takanobu ; Wakamatsu, Ryota ; Hayashi, Shinya ; Matsumoto, Tomoyuki ;
Kuroda, Ryosuke
Academic Editor: Francesco Zirilli
Received: 6 October 2025
Revised: 9 November 2025
Accepted: 13 November 2025
Published: 16 November 2025
Citation: Osawa, S.; Inui, A.; Mifune,
Y.; Yamaura, K.; Yoshikawa, T.;
Shinohara, I.; Kusunose, M.; Tanaka, S.;
Takigami, S.; Ehara, Y.; et al.
Automated Classification of Baseball
Pitching Phases Using Machine
Learning and Artificial Intelligence-
Based Posture Estimation. Appl. Sci.
2025,15, 12155. https://doi.org/
10.3390/app152212155
Copyright: © 2025 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms and
conditions of the Creative Commons
Attribution (CC BY) license
(https://creativecommons.org/
licenses/by/4.0/).
Article
Automated Classification of Baseball Pitching Phases Using
Machine Learning and Artificial Intelligence-Based
Posture Estimation
Shin Osawa
1
, Atsuyuki Inui
1,
* , Yutaka Mifune
1
, Kohei Yamaura
1
, Tomoya Yoshikawa
2
, Issei Shinohara
1
,
Masaya Kusunose 1, Shuya Tanaka 1, Shunsaku Takigami 1, Yutaka Ehara 1, Daiji Nakabayashi 1,
Takanobu Higashi 1, Ryota Wakamatsu 1, Shinya Hayashi 1, Tomoyuki Matsumoto 1and Ryosuke Kuroda 1
1Department of Orthopaedic Surgery, Kobe University Graduate School of Medicine, Kobe 650-0017, Japan
2Department of Orthopaedic Surgery, Meiwa Hospital, Nishinomiya 663-8186, Japan
*Correspondence: ainui@med.kobe-u.ac.jp; Tel.: +81-78-382-5985
Abstract
High-precision analyses of baseball pitching have traditionally relied on optical motion
capture systems, which, despite their accuracy, are complex and impractical for widespread
use. Classifying sequential pitching phases, essential for biomechanical evaluation, conven-
tionally requires manual expert labeling, a time-consuming and labor-intensive process. Ac-
curate identification of phase boundaries is critical because they correspond to key temporal
events related to pitching injuries. This study developed and validated a smartphone-based
system for automatically classifying the five key pitching phases—wind-up, stride, arm-
cocking, arm acceleration, and follow-through—using pose estimation artificial intelligence
and machine learning. Slow-motion videos (240 frames per second, 1080p) of 500 healthy
right-handed high school pitchers were recorded from the front using a single smartphone.
Skeletal landmarks were extracted using MediaPipe, and 33 kinematic features, includ-
ing joint angles and limb distances, were computed. Expert-annotated phase labels were
used to train classification models. Among the models evaluated, Light Gradient Boost-
ing Machine (LightGBM) achieved a classification accuracy of 99.7% and processed each
video in a few seconds demonstrating feasibility for on-site analysis. This system enables
high-accuracy phase classification directly from video without motion capture, supporting
future tools to detect abnormal pitching mechanics, prevent throwing-related injuries, and
broaden access to pitching analysis.
Keywords: baseball pitching; machine learning; automated classification; artificial intelligence;
pose estimation; injury prevention; biomechanics
1. Introduction
Baseball pitching is a complex overhead throwing motion that places extreme stress
on the shoulder and elbow joints, making it a high-risk activity for overuse injuries [
1
3
].
Various risk factors have been identified for injuries in baseball pitchers, including poor
pitching mechanics, pitching under fatigue, inadequate rest between appearances, early
specialization in a single sport, individual anthropometric characteristics, limitations in
shoulder range of motion, engagement in weighted ball throwing programs, and serving as
both pitchers and catchers in the same game [
4
,
5
]. Among these, poor pitching mechanics
have been recognized as a particularly significant contributor because they markedly
Appl. Sci. 2025,15, 12155 https://doi.org/10.3390/app152212155
Appl. Sci. 2025,15, 12155 2 of 15
increase biomechanical stress on the elbow and shoulder joints and are closely associated
with a heightened risk of injury [
5
8
]. These concerns underscore the importance of
understanding and improving pitching biomechanics to protect athletic health. Analyzing
pitching motion through biomechanical studies can help identify risky movement patterns
and guide interventions to prevent injuries. Coaches and sports medicine researchers
emphasize that proper pitching mechanics, such as optimal arm positioning and timing,
can enhance performance and reduce stress on the arm [
1
]. In short, motion analysis
provides critical feedback by making data-driven adjustments to mechanics, pitchers can
throw more safely [1].
Traditionally, precise pitching analysis has required optical motion capture in a labo-
ratory setting using reflective markers and high-speed cameras. Although marker-based
motion capture is the biomechanical gold standard, it is expensive and requires a controlled
environment with specialized equipment, making it impractical for field use [
9
]. Measure-
ments in real games or outdoor practice are nearly impossible because athletes cannot
wear markers during competition [
9
]. Recently, markerless motion capture techniques that
leverage computer vision and deep learning to estimate human poses from ordinary videos
have emerged [
9
]. For instance, a single-camera markerless system (PitchAI) was shown
to closely replicate key pitching kinematics when compared with a 16-camera laboratory
setup [
10
]. Commercial systems such as PitchAI have enabled convenient field-based analy-
sis of pitching motion; however, their algorithms are proprietary, and few academic studies
have independently validated their reproducibility. Therefore, the research gap lies in the
absence of an open and reproducible approach that can achieve accurate phase classification
using a single smartphone view. To address this limitation, we focused on MediaPipe,
an open-source pose estimation framework that enables transparent and customizable
analysis. Furthermore, our framework allows users to freely add new measurement items
and parameters depending on their research objectives, offering flexibility beyond that of
existing closed systems. Our research group utilized MediaPipe to perform pose-based
motion analysis as a preliminary step toward full-scale pitching biomechanics evaluation.
In our previous study, we used MediaPipe as an accessible and cost-effective alter-
native to conventional motion capture for motion analysis. For instance, Takigami et al.
developed a method to estimate shoulder internal and external rotation angles from video
footage captured via a tablet device using pose-estimation artificial intelligence (AI) com-
bined with a Light Gradient Boosting Machine (LightGBM) regression model. Their system
demonstrated extremely high accuracy compared with sensor-based measurements, achiev-
ing a correlation coefficient of approximately 0.999 [
11
]. Similarly, Kusunose et al. reported
that shoulder abduction angles could be measured with high precision using MediaPipe
and machine learning algorithms, suggesting the feasibility of markerless AI technologies
in pitching analysis [12]. These prior studies suggest that key biomechanical indicators of
the pitching motion can potentially be captured from skeletal data extracted from standard
video footage without the need for specialized equipment. Improper pitching mechanics
that increase the risk of injury or impair performance have been widely reported in previ-
ous studies [
1
,
13
,
14
]. Examples include the shoulder and elbow joint angles at stride foot
contact, early trunk rotation, and knee angle at ball release. To enable automatic detection
of such high-risk postures using AI, it is essential to first accurately identify and classify
the individual phases of the pitching motion.
Pitching biomechanics are commonly divided into the following sequential phases:
wind-up, stride (early cocking), arm cocking, arm acceleration, and follow-through (decel-
eration) (Figure 1) [
1
,
15
17
]. Each phase is characterized by specific body positions and
joint loads. For example, maximal shoulder external rotation occurs during late cocking,
whereas follow-through involves rapid deceleration of the arm.
Appl. Sci. 2025,15, 12155 3 of 15
Figure 1. Illustration of the baseball pitching motion divided into five sequential phases: wind-
up, stride, arm cocking, arm acceleration, and follow-through. Key temporal events are indicated:
maximum lift of the stride leg (MLS), stride foot contact (SFC), maximum shoulder external rotation
(MER), and ball release (BR). These phases and events are commonly used in biomechanical analyses
to describe the temporal structure of the pitching motion.
As these phases are biomechanically distinct and associated with characteristic kine-
matic patterns, we hypothesized that they could be accurately classified from pose es-
timation data using AI and machine learning. In this study, as a first step toward the
automated detection of improper pitching forms, we investigated whether an AI-based
pose estimation approach can automatically classify a pitcher’s motion into these five key
phases. We extracted skeletal landmark data from single-camera videos of pitchers using a
pose estimation model and then applied machine learning to classify frames into wind-up,
stride, cocking, acceleration, or follow-through. We aimed to evaluate the accuracy of
phase recognition, laying the groundwork for a system that could eventually flag abnormal
mechanics or injury-prone motions in baseball pitchers. The main contributions of this
study are: (1) developing a smartphone-based motion analysis system using open frame-
works, (2) achieving high classification accuracy with explainable machine learning, and
(3) demonstrating its feasibility for on-site feedback in practical settings.
2. Materials and Methods
2.1. Participants
This study included 500 male high school baseball pitchers (mean age, 16.4 years;
mean height, 172.7
±
5.3 cm; mean weight, 64.3
±
8.0 kg; mean body mass index,
21.7 ±2.4 kg/m2
) from Hyogo, Japan, who participated in routine elbow screening be-
tween 2022 and 2024. All participants were right-handed and had no self-reported shoulder
or elbow pain at the time of screening. The study was approved by the Kobe University
Ethics Review Board (approval number B210009), and informed consent was obtained from
all participants and their parents or legal guardians before inclusion.
2.2. Data Acquisition and Image Processing by Media Pipe
Pitching motions were recorded using the slow-motion function of a smartphone at
240 frames
per second (fps) with a resolution of 1080p. The smartphone was positioned 3 m
in front of the participant at a height of 150 cm from the ground (Figure 2). The camera angle
remained fixed throughout the recording to ensure standardized capture of the pitching
motion across all participants. The recorded video files were analyzed using the MediaPipe
Pose Python library to extract the three-dimensional joint coordinates (x, y, z). In this
framework, the x- and y-coordinates indicate the horizontal and vertical positions relative
to the detected center of the hip joint, respectively, whereas the z-coordinate reflects the
estimated depth from the camera, with smaller z-values corresponding to closer proximity
(Figure 2). Although MediaPipe can estimate the z-coordinate as the depth from the
Appl. Sci. 2025,15, 12155 4 of 15
camera, this value was not used in the present study because its accuracy is limited for fast
movements such as pitching. Among the 33 anatomical landmarks automatically identified
by MediaPipe (Figure 3), the following were used in this study: the right shoulder, right
elbow, right wrist, left shoulder, left elbow, left wrist, right hip, right knee, right ankle, left
hip, left knee, and left ankle.
Figure 2. Experimental setup for video capture and coordinate system. The smartphone was
positioned 3 m in front of the participant at a height of 150 cm from the ground.
Figure 3. MediaPipe landmarks used for pose estimation. The image shows the 33 anatomical
landmarks authomatically detected by MediaPipe, of which 12 were used in this study (highlighted
landmarks: right and left shoulders, elbows, wrists, hips, knees and ankles). Red circles indicate
the 12 landmarks used for the analysis in this study, while blue circles represent the remaining
MediaPipe landmarks.
Appl. Sci. 2025,15, 12155 5 of 15
2.3. Parameters
An example of joint detection using MediaPipe is presented in Figure 3. From the
extracted landmark coordinates, biomechanical parameters such as distance, angle, and
area were calculated using vector-based computations. Distances between two landmarks
were calculated as the Euclidean distance between their two-dimensional (2D) coordinates.
Joint angles were computed from the orientation of the angle between two connected
segments, based on the cosine of the angle formed by the corresponding vectors. Area-
related features, such as the trunk area, were obtained from the magnitude of the cross
product between two vectors representing the space enclosed by the selected landmarks.
To minimize the influence of body size differences, each parameter was normalized within
every frame using either the right trunk distance (rt_trunk_dist) or the right trunk size
(rt_trunk_size). The rt_trunk_dist was defined as the distance between the right shoulder
joint (landmark 12) and the right hip joint (landmark 24), whereas the rt_trunk_size was
defined as the magnitude of the cross product between the vectors from the right shoulder
to the left shoulder and from the right shoulder to the right hip. These normalization
references were recalculated for each frame and applied to all parameters in the same frame.
All normalized parameters were then used as input features for the LightGBM model to
classify each pitching phase. The parameter values used in this study are summarized in
Table 1.
Table 1. Parameters and definitions used in this study.
Parameter Definition
norm_rt_forearm_dist Distance between the right elbow and right wrist joints, normalized by rt_trunk_dist.
norm_rt_uparm_dist Distance between the right shoulder and right elbow joints, normalized by rt_trunk_dist.
norm_rt_hip_dist Distance between the right shoulder and right hip joints, normalized by rt_trunk_dist.
norm_rt_knee_dist Distance between the right hip and right knee joints, normalized by rt_trunk_dist.
norm_lt_hip_dist Distance between the left shoulder and left hip joints, normalized by rt_trunk_dist.
norm_lt_knee_dist Distance between the left hip and left knee joints, normalized by rt_trunk_dist.
rt_elbow_angle Angle formed by the right shoulder, right elbow, and right wrist joints.
rt_shoulder_angle Angle formed by the right elbow, right shoulder, and right hip joints.
lt_elbow_angle Angle formed by the left shoulder, left elbow, and left wrist joints.
lt_shoulder_angle Angle formed by the left elbow, left shoulder, and left hip joints.
rt_hip_angle Angle formed by the right shoulder, right hip, and right knee joints.
rt_knee_angle Angle formed by the right hip, right knee, and right ankle joints.
lt_hip_angle Angle formed by the left shoulder, left hip, and left knee joints.
lt_knee_angle Angle formed by the left hip, left knee, and left ankle joints.
shoulder_hip_ratio
Ratio of the distance between the left and right shoulder joints to the distance between the
left and right hip joints.
norm_rt_elbow_size
Cross product of the vector from the right shoulder to the right elbow and the vector from
the right elbow to the right wrist, normalized by the square of rt_trunk_dist.
norm_rt_shoulder_size Cross product of the vector from the right shoulder to the right wrist and the vector from
the right shoulder to the right hip, normalized by the square of rt_trunk_dist.
norm_rt_trunk_size
Cross product of the vector from the right shoulder to the left shoulder and the vector from
the right shoulder to the right hip, normalized by the square of rt_trunk_dist.
Appl. Sci. 2025,15, 12155 6 of 15
Table 1. Cont.
Parameter Definition
norm_lt_trunk_size
Cross product of the vector from the right shoulder to the left shoulder and the vector from
the right shoulder to the left hip, normalized by the square of rt_trunk_dist.
norm_rt_hip_size Cross product of the vector from the right hip to the right knee and the vector from the
right shoulder to the right hip, normalized by the square of rt_trunk_dist.
norm_rt_knee_size Cross product of the vector from the right knee to the right ankle and the vector from the
right hip to the right knee, normalized by the square of rt_trunk_dist.
norm_lt_hip_size Cross product of the vector from the left hip to the left knee and the vector from the right
shoulder to the left hip, normalized by the square of rt_trunk_dist.
norm_lt_knee_size Cross product of the vector from the left knee to the left ankle and the vector from the left
hip to the left knee, normalized by the square of rt_trunk_dist.
2.4. Machine Learning (ML)
We compared the performance of three supervised machine-learning algorithms–
Logistic Regression, Random Forest, and LightGBM– for classifying the five pitching
phases. Logistic Regression is a linear classification model that estimates the probability of
class membership from input features. It is widely used in medical statistics owing to its
simplicity and interpretability but is limited in handling nonlinear patterns [
18
]. Random
Forest, an ensemble technique that combines multiple decision trees, enhances predictive
accuracy, accommodates complex variable interactions, and mitigates overfitting [
19
].
LightGBM is a high-speed implementation of gradient-boosting decision trees and is
increasingly used in medical AI research. It offers high accuracy and computational
efficiency and is well-suited for large-scale, high-dimensional data [20].
In this study, the dataset was randomly divided into training (80%) and validation
(20%) sets. The main hyperparameters, including the number of leaves, maximum depth,
and learning rate, were optimized through grid search with five-fold cross-validation on the
training dataset to balance model complexity and generalization. Model performance was
evaluated using the overall classification accuracy and phase-specific recall for wind-up,
stride, cocking, arm acceleration, and follow-through. These models were assessed to
determine their effectiveness in recognizing pitching phases using biomechanical features
derived from pose estimation (Figure 4).
Figure 4. Workflow of data acquisition and machine learning classification. The process includes
video recording using a smartphone, pose estimation using MediaPipe to extract 3D joint coordinates,
computation of biomechanical features (distances, angles, areas), and classification into five pitching
phases using the LightGBM model.
Appl. Sci. 2025,15, 12155 7 of 15
To ensure reproducibility, we provided a detailed description of each processing
step, including data extraction, feature computation, and classification. Biomechanical
parameters such as joint distances, angles, and areas were calculated using vector-based
computations implemented in Python (v3.10). The analysis pipeline was executed using
Python with the MediaPipe Pose library and the LightGBM package. The overall workflow
was as follows: videos were processed through MediaPipe Pose to extract landmark
coordinates, from which biomechanical features were computed and then classified into
five pitching phases by the LightGBM model.
2.5. Pitching Phase Definitions
The pitching motion was divided into five sequential phases: wind-up, stride, arm
cocking, arm acceleration, and follow-through (Figure 1). These phases are defined based
on key temporal events commonly used in biomechanical analyses. Specifically, the wind-
up was defined as the period from the initiation of movement until maximum lift of the
stride leg (MLS); the stride phase as the interval from MLS to stride foot contact (SFC); the
arm cocking phase as the period between SFC and maximum shoulder external rotation
(MER); the arm acceleration phase as the interval from MER to ball release (BR); and the
follow-through phase as the period after BR until completion of motion. Although some
prior studies divided the pitching motion into six phases by separating arm deceleration
from follow-through [
21
,
22
], in the present study, these two phases were integrated into a
single follow-through phase because our primary aim was to establish a framework for
detecting improper pitching mechanics. Expert-annotated labels based on these definitions
were used as the ground truth for training and validating the machine learning models.
2.6. Evaluation
Feature importance was evaluated using LightGBM’s built-in feature importance
function, which calculates the decrease in model score when each feature is randomly
shuffled [
23
]. The Shapley additive explanations (SHAP) values quantify the contribution
of each feature to the model prediction [
24
]. Briefly, SHAP values quantify the contribution
of each variable (feature) to an ML model’s predictions and can improve its interpretabil-
ity [
24
]. SHAP summary plots were generated to visualize the overall contribution and
direction of each feature across all frames, and features with higher absolute SHAP values
were interpreted as having greater influence on phase classification.
3. Results
A total of 161,020 frames were analyzed using three machine-learning models: Light-
GBM, Random Forest, and Logistic Regression. These frames were obtained from 500 right-
handed high school pitchers, each performing one pitching motion recorded at 240 frames
per second. On average, one complete pitch lasted approximately 0.65 s (about 320 frames
per pitch), resulting in a total of 161,020 analyzed frames. Among these, LightGBM demon-
strated the highest classification performance, with an overall accuracy of 0.9971. The recall
for each pitching phase using LightGBM was 0.9978 for wind-up, 0.9955 for stride, 0.9478
for arm cocking, 0.8684 for arm acceleration, and 0.9813 for follow-through, indicating
consistently high classification performance across all phases. In comparison, Random
Forest showed lower performance, with a marked decrease in classification accuracy for
stride (0.7643) and arm acceleration (0.8167). Logistic Regression exhibited the lowest
performance, particularly in the arm cocking (0.8522) and arm-acceleration (0.8722) phases
(Table 2).
Appl. Sci. 2025,15, 12155 8 of 15
Table 2. Performance of machine-learning models in pitching phase classification.
Accuracy Recall
Wind-Up Stride Cocking Acceleration Follow-Through
LightGBM 0.9971 0.9978 0.9955 0.9478 0.8684 0.9813
Random Forest 0.9419 0.9601 0.7643 0.8495 0.8167 0.9815
Logistic Regression 0.9374 0.9361 0.8786 0.8572 0.8722 0.9754
The classification performance of LightGBM is illustrated in the confusion matrix
(Figure 5). Wind-up and stride were classified with high accuracy, as indicated by strong
diagonal dominance in the matrix. In contrast, a portion of the frames belonging to arm
cocking and arm acceleration were misclassified between the two phases, suggesting dif-
ficulties in distinguishing these adjacent movements. The follow-through phase showed
high recall (0.9813) with only a few misclassified frames, demonstrating robust recognition
of the final pitching motion. SHAP analysis further supported this finding, indicating
that features such as normalized right hip size and trunk size contributed substantially to
differentiating these transitional phases, reflecting the involvement of trunk and lower-
limb stability in phase separation. To further evaluate the robustness of the model and
address the potential risk of overfitting, a five-fold cross-validation was conducted. The
model maintained consistently high performance across folds, with an average accuracy of
0.9849 ±0.0023
, a macro recall of 0.9300
±
0.012, and a macro F1-score of
0.9319 ±0.006
.
These results confirm that the proposed LightGBM model demonstrates stable and general-
ized classification performance across different data subsets.
Figure 5. Confusion matrix of the LightGBM model for pitching phase classification. The diagonal
elements represent the number of correctly classified instances for each phase, whereas the off-
diagonal elements indicate misclassifications. The model achieved high accuracy across all phases,
with the largest number of correct predictions observed in the wind-up phase (36,880 frames).
Misclassifications were relatively rare, with minor confusion occurring between stride and arm
cocking, and between arm acceleration and follow-through phases. Phases: 1 = Wind-up, 2 = Stride,
3 = Arm Cocking, 4 = Acceleration, 5 = Follow-through.
Feature importance was evaluated as described in Section 2.6. The most influential
feature was the normalized right hip size, followed by the right hip angle, trunk size, and
right knee angle (Figure 6). Notably, features related to the lower limbs and trunk accounted
Appl. Sci. 2025,15, 12155 9 of 15
for the majority of the contribution, highlighting their central role in differentiating the
pitching phases within the model.
Figure 6. Feature importance of the LightGBM model for pitching phase classification. Normalized
right hip size, right hip angle, and normalized trunk size were the most influential features, whereas
knee size and hip distance contributed less.
The contribution of each feature to the phase classification was determined by SHAP
analysis (Figure 7). SHAP analysis revealed that the model’s feature importance reflected
the biomechanical characteristics of the pitching motion. Specifically, rt_hip_angle primarily
contributed to the wind-up and stride phases, highlighting its role in identifying early-
stage lower-limb motion. A strong contribution was also observed for norm_rt_trunk_size
during the follow-through phase, reflecting trunk mechanics after ball release, while
norm_rt_hip_size showed the highest contribution during the stride phase, capturing
lower-limb dynamics during foot planting. In contrast, rt_shoulder_angle strongly con-
Appl. Sci. 2025,15, 12155 10 of 15
tributed to the arm-cocking phase, reflecting upper-limb kinematic changes associated
with rapid shoulder external rotation and preparation for ball release. These SHAP-based
findings are in strong agreement with clinical and biomechanical insights, indicating that
the anatomical regions emphasized by the AI model correspond closely to those iden-
tified by human experts during phase labeling, thereby supporting the validity of the
model’s interpretability.
Figure 7. Phase-specific feature contributions visualized by SHAP analysis.
SHAP values indicate the relative importance of each feature in classifying pitching
phases. Higher absolute SHAP values represent greater contribution to the model’s predic-
tion for each phase. Color intensity indicates the direction and magnitude of each feature’s
influence on phase classification.
4. Discussion
This study applied AI-based pose estimation techniques to pitcher movements to
automatically detect pitching phases and verify the accuracy of classification across the
five major phases. The smartphone-based pitching phase classifier developed in this study
achieved exceptionally high accuracy (approximately 99.7%), confirming that even a single-
camera front-view video can be used to automatically distinguish the five key phases of
baseball pitching motion. This level of performance, comparable to that of laboratory-
grade analyses, underscores the feasibility of markerless AI pose estimation for detailed
biomechanical assessments in real-world settings. Below, we discuss our findings in the
context of prior studies, highlight the strengths and practical implications of our approach,
consider its application in sports medicine, and outline its limitations and future directions.
Traditionally, precise pitching biomechanics require optical motion capture with re-
flective markers and multi-camera systems, which are expensive and impractical outside
the laboratory. Recent advances in markerless motion capture have sought to overcome
Appl. Sci. 2025,15, 12155 11 of 15
these limitations. For example, Nakano et al. demonstrated that a multi-camera OpenPose-
based system could reconstruct 3D motions with mean joint position errors mostly under
20–30 mm [9]
. Similarly, a single-camera smartphone system was validated against a
16-camera
Vicon setup and showed strong agreement in key kinematic measures. Do-
bos et al. found markerless video approaches to be viable alternatives to marker-based
capture after observing a high correlation (r
2
= up to 0.98) in many pitch kinematics be-
tween PitchAI and the gold-standard system [
10
]. Our results extend this body of work
by focusing on phase classification, to our knowledge, this is one of the first studies to
automatically classify entire pitching phases (wind-up, stride, arm-cocking, acceleration,
follow-through) using markerless video input. Previous studies have analyzed pitching
mechanics and discrete events (e.g., foot contact timing or ball release angles), but direct
AI-driven segmentation of motion into phases has not been fully explored. Our approach
provides important groundwork for higher-level analyses, complementing prior research
on continuous kinematics by achieving reliable phase identification.
The key strengths of the proposed approach are its accessibility and simplicity. We
used a standard smartphone, which is readily available to coaches, athletes, and clinicians
without specialized equipment, to capture high-speed videos at 240 fps. This accessibil-
ity contrasts with the requirements of optical motion capture, which requires dedicated
cameras and markers that cannot be used in actual games. The ability to analyze pitching
using only a phone camera and open-source software implies that biomechanical feedback
can be scaled to the field for widespread use. MediaPipe’s pose estimation, running on
conventional hardware, extracts rich skeletal data from videos, and the LightGBM ma-
chine learning model then classifies each frame’s phase with remarkable accuracy. The
LightGBM classifier proved particularly effective; it outperformed both the traditional
logistic regression and random forest classifiers in our tests, especially in the more chal-
lenging phases. The superior performance of LightGBM compared with Random Forest
and Logistic Regression can be attributed to its ability to capture nonlinear interactions
among biomechanical variables through gradient-based boosting. LightGBM sequentially
builds trees that minimize residual errors, allowing the model to focus on hard-to-classify
transitions and subtle kinematic differences between adjacent phases. In contrast, Random
Forest averages multiple independently built trees, which enhances stability but can dilute
detailed temporal or inter-joint relationships important for accurate boundary detection.
Logistic Regression, being a linear model, cannot effectively capture nonlinear depen-
dencies among joint angles and distances, leading to lower discrimination performance,
especially in overlapping phases such as arm cocking and arm acceleration. Therefore,
LightGBM’s gradient-boosting optimization and feature-interaction learning likely explain
its superior classification accuracy in this study.
For instance, the random forest recall for the stride phase dropped to approximately
76%, whereas LightGBM maintained a recall of approximately 99%. This highlights the fact
that LightGBM’s gradient-boosting approach captured subtle kinematic differences that
simpler models missed. Additionally, LightGBM provides feature importance rankings
that offer interpretability. We found that lower-body and trunk features (e.g., hip-to-knee
distances, hip angles, trunk “size”) contributed most to differentiating phases. These
findings align with the biomechanical understanding that pitching is a whole-body action.
Moreover, although pitching-related injuries often involve the shoulder and elbow, our
findings suggest that focusing on the entire body is equally important. Feature importance
analysis highlighted contributions from the non-throwing lower limb, underscoring its role
in differentiating pitching phases. These findings indicate that machine learning-based
approaches not only achieve accurate classification but also provide new perspectives by
identifying biomechanical contributors that may be overlooked in traditional analyses.
Appl. Sci. 2025,15, 12155 12 of 15
These insights can help clinicians and coaches adopt a more holistic view of pitching
mechanics and injury prevention. Another strength is the efficiency of the method; both
MediaPipe pose extraction and LightGBM prediction are computationally lightweight,
which opens the door to near-real-time analysis. In our setup, each pitching video was
processed within approximately 6–8 s, supporting the claim of near-real-time analysis.
In practice, a coach can record a pitch and obtain a classified phase sequence almost
immediately, enabling a frame-by-frame review of a pitcher’s mechanics without manual
annotation. The overall approach was cost-effective, rapid, and accurate, making it a strong
candidate for integration into regular training and scouting routines.
One of the most important implications of this study is its potential application in
the injury prevention and performance enhancement of pitchers. Baseball pitching is a
high-risk activity for the shoulder and elbow; nearly half of the pitchers experience arm
pain in a given season [
25
], and chronic overuse injuries, such as ulnar collateral ligament
tears, are prevalent. Poor pitching mechanics, such as improper timing or positioning, have
been identified as significant risk factors that amplify joint stress. For example, early trunk
rotation (rotating the torso before the front foot lands) has been shown to significantly
increase elbow valgus torque, placing greater load on the elbow ligaments [
14
,
26
,
27
].
Similarly, insufficient knee flexion during ball release or excessive horizontal shoulder
abduction can increase joint stress [
28
30
]. Coaches and sports medicine professionals have
long emphasized that optimizing mechanics can enhance performance while protecting
the arm.
Despite its potential, our approach has some limitations. The accuracy of the depth
estimation was restricted because we relied on a single front-facing camera, and motions
involving transverse rotations may have been misestimated, which could partly explain the
misclassifications observed at certain transitions. Although MediaPipe provides relative
depth information (z-coordinate), this parameter was not used in the present analysis
because its accuracy has not been quantitatively validated for fast, depth-direction move-
ments such as pitching. Future work should compare MediaPipe’s depth estimation with
3D motion-capture ground truth to assess its reliability and potential impact on feature
calculations. Another methodological limitation is related to the normalization proce-
dure. Although using a single static normalization factor calculated from the first frame
would theoretically provide consistent scaling throughout the motion, this study calculated
rt_trunk_dist and rt_trunk_size on a frame-by-frame basis. The machine learning model
achieved high classification accuracy using features derived from these frame-by-frame
values, supporting the validity of this approach. Nevertheless, in future studies focusing
on time-series analyses of trunk distance changes throughout the pitching motion, nor-
malization using the first frame may be more appropriate to ensure consistent scaling
across time. Furthermore, our model was trained on only 500 right-handed Japanese
high-school pitchers, representing a homogeneous population that may not be general-
izable to professional, female, or left-handed athletes with different kinematic patterns.
Future studies should validate the model on more diverse datasets, including left-handed,
female, and professional pitchers, to ensure broader applicability. Another limitation is
the ground-truth phase labeling, which was based on expert annotation. The inherent sub-
jectivity in defining transition points likely contributed to the modest confusion between
adjacent phases, such as cocking and acceleration. Errors were most often observed around
these sequential boundaries, suggesting that the absence of temporal modeling in our
frame-by-frame classification may have restricted performance. To address this limitation,
future work will focus on incorporating temporal modeling approaches to capture the
sequential dependencies between frames. Integrating these time-series models may smooth
the classification across adjacent phases and improve the accuracy of boundary detection
Appl. Sci. 2025,15, 12155 13 of 15
between sequential pitching motions. Finally, as our pipeline depends on MediaPipe pose
estimation, occasional tracking errors due to occlusion or image quality could have pro-
duced noisy inputs; although we attempted to minimize this effect, pose-estimation errors
were not systematically quantified. Generally, these factors indicate that, although our
model demonstrated high accuracy under controlled conditions, its performance may vary
in other contexts, and further refinement is required for broader applications.
This study demonstrated that pitching phases can be automatically classified with high
accuracy using smartphones and machine learning. Building on this foundation, the next
step should focus on extending the model to the automatic detection of faulty mechanics
that increase injury risk. As our classifier reliably distinguishes the temporal structure of
pitching, it provides a framework upon which additional algorithms can evaluate critical
biomechanical parameters within each phase, such as early trunk rotation or excessive
shoulder external rotation, both of which are known to elevate joint stress. The model can
evolve into a practical tool for injury prevention by integrating these risk-related indicators
into the current system, offering clinicians and coaches objective and real-time feedback on
potentially harmful postures. Thus, our phase classification approach may serve not only
as a technical achievement but also as a cornerstone for the development of future injury
risk monitoring systems in baseball pitching. Although this study did not directly verify
the detection of specific abnormal mechanical patterns, the model may serve as a basis
for future systems capable of identifying potentially harmful pitching motions through
deviations in biomechanical features.
5. Conclusions
This study demonstrated that baseball pitching phases can be classified with high
accuracy using a single smartphone camera and machine learning. The main findings can
be summarized as follows: (1) The five key phases of baseball pitching were successfully
classified using MediaPipe-based pose estimation and the LightGBM model, achieving a
recall exceeding 0.86 for all phases. (2) Feature importance and SHAP analyses revealed
that the anatomical regions emphasized by the AI model closely corresponded to those
identified by human experts during phase labeling, supporting the validity and biomechan-
ical relevance of the model’s decision-making process. (3) The proposed system enables
accessible, cost-effective, and near-real-time motion analysis, which could serve as the
foundation for future tools designed to detect faulty mechanics associated with injury risk
automatically. Collectively, these results highlight the feasibility of AI-based biomechan-
ics for routine baseball training and clinical use, offering new opportunities to improve
performance and prevent throwing-related injuries.
Author Contributions: Conceptualization, S.O. and A.I.; methodology, S.O., Y.M., K.Y., T.Y. and I.S.;
software, A.I. and I.S.; validation, K.Y., Y.E., and S.T. (Shunsaku Takigami); formal analysis, S.O.,
S.T. (Shunsaku Takigami)., D.N. and T.H.; investigation, S.T. (Shuya Tanaka), M.K., T.H. and R.W.;
resources, R.W. and M.K.; data curation, S.O., T.Y., Y.E., S.T. (Shuya Tanaka) and D.N.; writing—
original draft preparation, S.O.; writing—review and editing, A.I., Y.M., I.S., S.H., T.M. and R.K.;
visualization, K.Y. and I.S.; supervision, R.K.; project administration, A.I., Y.M., S.H. and T.M. All
authors have read and agreed to the published version of the manuscript.
Funding: This study was supported by JSPS KAKENHI (grant number: JP22K09399).
Institutional Review Board Statement: The study was conducted in accordance with the guidelines
of the Declaration of Helsinki and approved by the Kobe University Review Board (approval number:
B210009; approval date: 21 April 2021).
Informed Consent Statement: Informed consent was obtained from all participants involved in the
study. Written informed consent was obtained from the patients for the publication of this paper.
Appl. Sci. 2025,15, 12155 14 of 15
Data Availability Statement: Data presented in this study are available upon request from the
corresponding author. The data are not publicly available due to confidentiality concerns.
Acknowledgments: The authors would like to thank an English editing service for improving the
language of the manuscript.
Conflicts of Interest: The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
AI Artificial Intelligence
ML Machine Learning
RF Random Forest
LightGBM Light Gradient Boosting Machine
MLS Maximum Lift of Stride Leg
SFC Stride Foot Contact
MER Maximum External Rotation
BR Ball Release
SHAP Shapley Additive Explanations
References
1.
Diffendaffer, A.Z.; Bagwell, M.S.; Fleisig, G.S.; Yanagita, Y.; Stewart, M.; Cain, E.L., Jr.; Dugas, J.R.; Wilk, K.E. The Clinician’s
Guide to Baseball Pitching Biomechanics. Sports Health 2023,15, 274–281. [CrossRef] [PubMed]
2. Calabrese, G.J. Pitching mechanics, revisited. Int. J. Sports Phys. Ther. 2013,8, 652–660. [PubMed]
3.
Conte, S.A.; Fleisig, G.S.; Dines, J.S.; Wilk, K.E.; Aune, K.T.; Patterson-Flynn, N.; ElAttrache, N. Prevalence of Ulnar Collateral
Ligament Surgery in Professional Baseball Players. Am. J. Sports Med. 2015,43, 1764–1769. [CrossRef] [PubMed]
4.
Fleisig, G.S.; Andrews, J.R.; Cutter, G.R.; Weber, A.; Loftice, J.; McMichael, C.; Hassell, N.; Lyman, S. Risk of serious injury for
young baseball pitchers: A 10-year prospective study. Am. J. Sports Med. 2011,39, 253–257. [CrossRef]
5.
Reinold, M.M.; Macrina, L.C.; Fleisig, G.S.; Aune, K.; Andrews, J.R. Effect of a 6-Week Weighted Baseball Throwing Program on
Pitch Velocity, Pitching Arm Biomechanics, Passive Range of Motion, and Injury Rates. Sports Health 2018,10, 327–333. [CrossRef]
6.
Cohen, A.D.; Garibay, E.J.; Solomito, M.J. The Association Among Trunk Rotation, Ball Velocity, and the Elbow Varus Moment in
Collegiate-Level Baseball Pitchers. Am. J. Sports Med. 2019,47, 2816–2820. [CrossRef]
7.
Solomito, M.J.; Garibay, E.J.; Nissen, C.W. A Biomechanical Analysis of the Association Between Forearm Mechanics and the
Elbow Varus Moment in Collegiate Baseball Pitchers. Am. J. Sports Med. 2018,46, 52–57. [CrossRef]
8.
Takagi, Y.; Oi, T.; Tanaka, H.; Inui, H.; Fujioka, H.; Tanaka, J.; Yoshiya, S.; Nobuhara, K. Increased horizontal shoulder abduction
is associated with an increase in shoulder joint load in baseball pitching. J. Shoulder Elbow Surg. 2014,23, 1757–1762. [CrossRef]
9.
Nakano, N.; Sakura, T.; Ueda, K.; Omura, L.; Kimura, A.; Iino, Y.; Fukashiro, S.; Yoshioka, S. Evaluation of 3D Markerless Motion
Capture Accuracy Using OpenPose With Multiple Video Cameras. Front. Sports Act. Living 2020,2, 50. [CrossRef]
10.
Dobos, T.J.; Bench, R.W.G.; McKinnon, C.D.; Brady, A.; Boddy, K.J.; Holmes, M.W.R.; Sonne, M.W.L. Validation of pitchAI(TM)
markerless motion capture using marker-based 3D motion capture. Sports Biomech. 2025,24, 587–607. [CrossRef]
11.
Takigami, S.; Inui, A.; Mifune, Y.; Nishimoto, H.; Yamaura, K.; Kato, T.; Furukawa, T.; Tanaka, S.; Kusunose, M.; Ehara, Y.; et al.
Estimation of Shoulder Joint Rotation Angle Using Tablet Device and Pose Estimation Artificial Intelligence Model. Sensors 2024,
24, 2912. [CrossRef]
12.
Kusunose, M.; Inui, A.; Nishimoto, H.; Mifune, Y.; Yoshikawa, T.; Shinohara, I.; Furukawa, T.; Kato, T.; Tanaka, S.; Kuroda,
R. Measurement of Shoulder Abduction Angle with Posture Estimation Artificial Intelligence Model. Sensors 2023,23, 6445.
[CrossRef]
13.
Zaremski, J.L.; Zeppieri, G.; Tripp, B.L. Injury Prevention Considerations in Adolescent Overhead-Throwing Athletes. Curr. Phys.
Med. Rehabil. Rep. 2019,7, 216–226. [CrossRef]
14.
Aguinaldo, A.L.; Buttermore, J.; Chambers, H. Effects of upper trunk rotation on shoulder joint torque among baseball pitchers of
various levels. J. Appl. Biomech. 2007,23, 42–51. [CrossRef] [PubMed]
15.
Dillman, C.J.; Fleisig, G.S.; Andrews, J.R. Biomechanics of pitching with emphasis upon shoulder kinematics. J. Orthop. Sports
Phys. Ther. 1993,18, 402–408. [CrossRef]
16.
Fleisig, G.; Chu, Y.; Weber, A.; Andrews, J. Variability in baseball pitching biomechanics among various levels of competition.
Sports Biomech. 2009,8, 10–21. [CrossRef]
Appl. Sci. 2025,15, 12155 15 of 15
17.
Werner, S.L.; Fleisig, G.S.; Dillman, C.J.; Andrews, J.R. Biomechanics of the elbow during baseball pitching. J. Orthop. Sports Phys.
Ther. 1993,17, 274–278. [CrossRef]
18. Bewick, V.; Cheek, L.; Ball, J. Statistics review 14: Logistic regression. Crit. Care 2005,9, 112–118. [CrossRef] [PubMed]
19.
Srivilaithon, W.; Thanasarnpaiboon, P. Performance of machine learning models in predicting difficult laryngoscopy in the
emergency department: A single-centre retrospective study comparing with conventional regression method. BMC Emerg. Med.
2025,25, 28. [CrossRef] [PubMed]
20.
Yan, J.; Xu, Y.; Cheng, Q.; Jiang, S.; Wang, Q.; Xiao, Y.; Ma, C.; Yan, J.; Wang, X. LightGBM: Accelerated genomically designed crop
breeding through ensemble learning. Genome Biol. 2021,22, 271. [CrossRef]
21.
Fleisig, G.S.; Andrews, J.R.; Dillman, C.J.; Escamilla, R.F. Kinetics of baseball pitching with implications about injury mechanisms.
Am. J. Sports Med. 1995,23, 233–239. [CrossRef]
22.
Fleisig, G.S.; Barrentine, S.W.; Escamilla, R.F.; Andrews, J.R. Biomechanics of overhand throwing with implications for injuries.
Sports Med. 1996,21, 421–437. [CrossRef]
23.
Doyen, S.; Taylor, H.; Nicholas, P.; Crawford, L.; Young, I.; Sughrue, M.E. Hollow-tree super: A directional and scalable approach
for feature importance in boosted tree models. PLoS ONE 2021,16, e0258658. [CrossRef] [PubMed]
24.
Tseng, P.Y.; Chen, Y.T.; Wang, C.H.; Chiu, K.M.; Peng, Y.S.; Hsu, S.P.; Chen, K.L.; Yang, C.Y.; Lee, O.K. Prediction of the
development of acute kidney injury following cardiac surgery by machine learning. Crit. Care 2020,24, 478. [CrossRef] [PubMed]
25.
Lyman, S.; Fleisig, G.S.; Andrews, J.R.; Osinski, E.D. Effect of pitch type, pitch count, and pitching mechanics on risk of elbow
and shoulder pain in youth baseball pitchers. Am. J. Sports Med. 2002,30, 463–468. [CrossRef]
26.
Aguinaldo, A.L.; Chambers, H. Correlation of throwing mechanics with elbow valgus load in adult baseball pitchers. Am. J.
Sports Med. 2009,37, 2043–2048. [CrossRef]
27.
Douoguih, W.A.; Dolce, D.L.; Lincoln, A.E. Early Cocking Phase Mechanics and Upper Extremity Surgery Risk in Starting
Professional Baseball Pitchers. Orthop. J. Sports Med. 2015,3, 2325967115581594. [CrossRef] [PubMed]
28.
Chalmers, P.N.; Wimmer, M.A.; Verma, N.N.; Cole, B.J.; Romeo, A.A.; Cvetanovich, G.L.; Pearl, M.L. The Relationship Between
Pitching Mechanics and Injury: A Review of Current Concepts. Sports Health 2017,9, 216–221. [CrossRef]
29.
Dompier, T.P.; Marshall, S.W.; Kerr, Z.Y.; Hayden, R. The National Athletic Treatment, Injury and Outcomes Network (NATION):
Methods of the Surveillance Program, 2011–2012 Through 2013–2014. J. Athl. Train. 2015,50, 862–869. [CrossRef]
30.
Yard, E.E.; Collins, C.L.; Comstock, R.D. A comparison of high school sports injury surveillance data reporting by certified athletic
trainers and coaches. J. Athl. Train. 2009,44, 645–652. [CrossRef]
Disclaimer/Publishers 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.