Next Article in Journal
A Review of Theoretical, Experimental and Numerical Advances on Strain Localization in Geotechnical Materials
Previous Article in Journal
STA-Fault3D: A Lightweight 3D Seismic Fault Detection Network Based on Spatial–Temporal Asymmetric Convolution Set
Previous Article in Special Issue
Landslide Susceptibility Mapping Optimization for Improved Risk Assessment Using Multicollinearity Analysis and Machine Learning Technique
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

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

1
Department of Orthopaedic Surgery, Kobe University Graduate School of Medicine, Kobe 650-0017, Japan
2
Department of Orthopaedic Surgery, Meiwa Hospital, Nishinomiya 663-8186, Japan
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(22), 12155; https://doi.org/10.3390/app152212155
Submission received: 6 October 2025 / Revised: 9 November 2025 / Accepted: 13 November 2025 / Published: 16 November 2025

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, conventionally requires manual expert labeling, a time-consuming and labor-intensive process. Accurate 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, including joint angles and limb distances, were computed. Expert-annotated phase labels were used to train classification models. Among the models evaluated, Light Gradient Boosting 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.

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,2,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 increase biomechanical stress on the elbow and shoulder joints and are closely associated with a heightened risk of injury [5,6,7,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 laboratory 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]. Measurements 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 analysis 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 alternative 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) combined with a Light Gradient Boosting Machine (LightGBM) regression model. Their system demonstrated extremely high accuracy compared with sensor-based measurements, achieving 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 previous 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 (deceleration) (Figure 1) [1,15,16,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.
As these phases are biomechanically distinct and associated with characteristic kinematic patterns, we hypothesized that they could be accurately classified from pose estimation 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 frameworks, (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 between 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 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.

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.

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).
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 interpretability [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: LightGBM, 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 demonstrated 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).
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 difficulties 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 generalized classification performance across different data subsets.
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 for the majority of the contribution, highlighting their central role in differentiating the pitching phases within the model.
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 contributed 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 identified by human experts during phase labeling, thereby supporting the validity of the model’s interpretability.
SHAP values indicate the relative importance of each feature in classifying pitching phases. Higher absolute SHAP values represent greater contribution to the model’s prediction 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 reflective markers and multi-camera systems, which are expensive and impractical outside the laboratory. Recent advances in markerless motion capture have sought to overcome 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. Dobos et al. found markerless video approaches to be viable alternatives to marker-based capture after observing a high correlation (r2 = up to 0.98) in many pitch kinematics between 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 accessibility 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 machine 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 challenging 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 dependencies 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. 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,29,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 movements 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 procedure. 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, normalization 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 generalizable 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 subjectivity 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 between sequential pitching motions. Finally, as our pipeline depends on MediaPipe pose estimation, occasional tracking errors due to occlusion or image quality could have produced 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 biomechanical 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 biomechanics 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.

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:
AIArtificial Intelligence
MLMachine Learning
RFRandom Forest
LightGBMLight Gradient Boosting Machine
MLSMaximum Lift of Stride Leg
SFCStride Foot Contact
MERMaximum External Rotation
BRBall Release
SHAPShapley 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. [Google Scholar] [CrossRef] [PubMed]
  2. Calabrese, G.J. Pitching mechanics, revisited. Int. J. Sports Phys. Ther. 2013, 8, 652–660. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [CrossRef]
  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. [Google Scholar] [CrossRef]
  18. Bewick, V.; Cheek, L.; Ball, J. Statistics review 14: Logistic regression. Crit. Care 2005, 9, 112–118. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [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. [Google Scholar] [CrossRef]
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.
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.
Applsci 15 12155 g001
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 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.
Applsci 15 12155 g002
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.
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.
Applsci 15 12155 g003
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.
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.
Applsci 15 12155 g004
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.
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.
Applsci 15 12155 g005
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.
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.
Applsci 15 12155 g006
Figure 7. Phase-specific feature contributions visualized by SHAP analysis.
Figure 7. Phase-specific feature contributions visualized by SHAP analysis.
Applsci 15 12155 g007
Table 1. Parameters and definitions used in this study.
Table 1. Parameters and definitions used in this study.
ParameterDefinition
norm_rt_forearm_distDistance between the right elbow and right wrist joints, normalized by rt_trunk_dist.
norm_rt_uparm_distDistance between the right shoulder and right elbow joints, normalized by rt_trunk_dist.
norm_rt_hip_distDistance between the right shoulder and right hip joints, normalized by rt_trunk_dist.
norm_rt_knee_distDistance between the right hip and right knee joints, normalized by rt_trunk_dist.
norm_lt_hip_distDistance between the left shoulder and left hip joints, normalized by rt_trunk_dist.
norm_lt_knee_distDistance between the left hip and left knee joints, normalized by rt_trunk_dist.
rt_elbow_angleAngle formed by the right shoulder, right elbow, and right wrist joints.
rt_shoulder_angleAngle formed by the right elbow, right shoulder, and right hip joints.
lt_elbow_angleAngle formed by the left shoulder, left elbow, and left wrist joints.
lt_shoulder_angleAngle formed by the left elbow, left shoulder, and left hip joints.
rt_hip_angleAngle formed by the right shoulder, right hip, and right knee joints.
rt_knee_angleAngle formed by the right hip, right knee, and right ankle joints.
lt_hip_angleAngle formed by the left shoulder, left hip, and left knee joints.
lt_knee_angleAngle formed by the left hip, left knee, and left ankle joints.
shoulder_hip_ratioRatio of the distance between the left and right shoulder joints to the distance between the left and right hip joints.
norm_rt_elbow_sizeCross 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_sizeCross 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_sizeCross 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.
norm_lt_trunk_sizeCross 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_sizeCross 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_sizeCross 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_sizeCross 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_sizeCross 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.
Table 2. Performance of machine-learning models in pitching phase classification.
Table 2. Performance of machine-learning models in pitching phase classification.
AccuracyRecall
Wind-UpStrideCockingAccelerationFollow-Through
LightGBM0.99710.99780.99550.94780.86840.9813
Random Forest0.94190.96010.76430.84950.81670.9815
Logistic Regression0.93740.93610.87860.85720.87220.9754
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.

Share and Cite

MDPI and ACS Style

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

AMA Style

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. Applied Sciences. 2025; 15(22):12155. https://doi.org/10.3390/app152212155

Chicago/Turabian Style

Osawa, Shin, Atsuyuki Inui, Yutaka Mifune, Kohei Yamaura, Tomoya Yoshikawa, Issei Shinohara, Masaya Kusunose, Shuya Tanaka, Shunsaku Takigami, Yutaka Ehara, and et al. 2025. "Automated Classification of Baseball Pitching Phases Using Machine Learning and Artificial Intelligence-Based Posture Estimation" Applied Sciences 15, no. 22: 12155. https://doi.org/10.3390/app152212155

APA Style

Osawa, S., Inui, A., Mifune, Y., Yamaura, K., Yoshikawa, T., Shinohara, I., Kusunose, M., Tanaka, S., Takigami, S., Ehara, Y., Nakabayashi, D., Higashi, T., Wakamatsu, R., Hayashi, S., Matsumoto, T., & Kuroda, R. (2025). Automated Classification of Baseball Pitching Phases Using Machine Learning and Artificial Intelligence-Based Posture Estimation. Applied Sciences, 15(22), 12155. https://doi.org/10.3390/app152212155

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop