inspect3d:tutorials:analysis_of_baseball_hitters
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
inspect3d:tutorials:analysis_of_baseball_hitters [2024/07/03 17:34] – created sgranger | inspect3d:tutorials:analysis_of_baseball_hitters [2024/07/12 13:26] (current) – removed sgranger | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Analysis_of_Baseball_Hitters ====== | ||
- | |||
- | ===== Abstract ===== | ||
- | |||
- | The **OpenBiomechanics** project is an initiative started by **Driveline Baseball Research & Development**, | ||
- | |||
- | The authors provide raw data without any reports or analysis, allowing the general public to use it as they see fit. While numerous articles provide in depth looks into the biomechanics of the baseball swing [[# | ||
- | |||
- | This tutorial is designed to demonstrate the use of Inspect3D to analyze the variance in pelvic angular velocity in internal/ | ||
- | |||
- | ===== Downloads and Relevant Links ===== | ||
- | |||
- | To follow along with this tutorial, ensure that your version of Inspect3D is at least [[https:// | ||
- | |||
- | - [[https:// | ||
- | - [[https:// | ||
- | |||
- | Please note, these downloads contain a large amount of data. Building CMZs is a slow process, so if you want to speed it up to follow along with building CMZ portion of this tutorial cut the number of datasets under openbiomechanics-main down to 3-5 subjects. | ||
- | |||
- | \\ | ||
- | If you want to skip the Build CMZ step of this tutorial and focus on the metadata applications, | ||
- | |||
- | * download [[https:// | ||
- | * download the [[https:// | ||
- | |||
- | For more technical information about loading metadata, see: [[Inspect3D: | ||
- | |||
- | ===== Data ===== | ||
- | |||
- | {{openbiomechanics_marker_images.png}} | ||
- | |||
- | The OpenBiomechanics data set provides **cleaned** c3d files with 3D kinematic data for 47 body markers, 22 lower limb and pelvic markers, and 25 head, upper limb, and trunk markers; there are also 10 markers placed along the bat. Important metadata that is being considered are **highest_playing_level**, | ||
- | |||
- | Some important contents of the workspace are briefly described below: | ||
- | |||
- | * **additional_resources: | ||
- | * **books_articles: | ||
- | * **tutorials: | ||
- | * **baseball_hitting & baseball_pitching: | ||
- | * **Data:** c3d is the only folder of interest for this tutorial, it contains all of the folders for each subject with all of their corresponding .c3d files. | ||
- | |||
- | **Notes:** | ||
- | |||
- | * If you have downloaded the prebuilt CMZ workspace you will only find **baseball_hitting**. | ||
- | |||
- | \\ | ||
- | Tables below show the Tags, Signals, and Refinements that will be used in this tutorial. These will be seen in later steps. | ||
- | |||
- | \\ | ||
- | |||
- | |||
- | \\ | ||
- | |||
- | |||
- | Table 1: Tag Definitions | ||
- | |Tags|Definition | ||
- | |R | ||
- | |||
- | |||
- | Table 2: Signal Definitions | ||
- | |Signals | ||
- | |PELVIS_ANGULAR_VELOCITY|Rate of change of angular position of the pelvis over time| | ||
- | |||
- | |||
- | Table 3: Refinements Definitions | ||
- | |Refinements |Definition | ||
- | |HIGHSCHOOL | ||
- | |College | ||
- | |lowBatSpeed |Filters c3d file, retaining data entries where the ' | ||
- | |highBatSpeed|Filters c3d file, retaining data entries where the ' | ||
- | |||
- | |||
- | ===== Build CMZs for Hitting Data ===== | ||
- | |||
- | {{hittingmeta.png}} | ||
- | |||
- | Select {{I3DLoadLibrary.png}} **Load Library** on the top left of the toolbar, and click the **Build CMZ** button. In the Build CMZ dialog: | ||
- | |||
- | - **Set the path to:** C: | ||
- | - **Set the Metadata File to :** C: | ||
- | - **Set the MDH File to:** C: | ||
- | - Add the following scripts and ensure they are in the correct order: | ||
- | - C: | ||
- | - C: | ||
- | - C: | ||
- | - Click **Create CMZs** | ||
- | - A metadata dialog box will appear after clicking Create CMZs. Make the following changes in this box: | ||
- | - Height Units: in | ||
- | - Weight Units: Lb | ||
- | - session_swing: | ||
- | - user: Static Trial Identifier | ||
- | - Check " | ||
- | - CMZ files may take a while to build. Check the status bar in the bottom left hand corner of the interface for the build status. | ||
- | |||
- | ===== Loading Data into Inspect3D ===== | ||
- | |||
- | {{model_Pelvis.png}} | ||
- | |||
- | For our analysis, we are interested in finding the variance in pelvic angular velocity between high and low Blast bat speed among college and high school baseball players. For each signal in our analysis, we specified an x, y, and z coordinate for pelvic angular velocity with relation to the virtual lab, expressed in the pelvises coordinate system with movement in the x direction being **anterior posterior pelvic tilt**, movement in the y direction being **lateral pelvic tilt** and movement in the z axis being **internal external rotation**, which can be seen in the image below. Each group was then refined to be categorized into right hitters, competition level (either high school or college), and high or low bat speeds for the subject' | ||
- | |||
- | \\ | ||
- | |||
- | |||
- | Before starting this section of the tutorial please **download** [[https:// | ||
- | |||
- | - Select {{I3DLoadLibrary.png}} **Load Library** on the top left of the toolbar, beside **Library Path** click on **Browse**, and navigate to the folder where your .cmz and .c3d files are located. Then select **Load** and exit the window. | ||
- | - Select the {{I3DGroups.png}} **Query Definitions** drop down and select **Query Definitions**. Inside the window select **Load Query Definitions** and navigate to the **analysis_of_baseball_hitters.q3d** file that you downloaded. | ||
- | - Select **Calculate All Groups** (if you exit the window before the query is fully computed click **Compute Groups**). Groups will be queried by player level, right hitters, high and low blast bat speeds, and x, y, and z pelvic angular velocity coordinates. | ||
- | |||
- | A detailed tutorial on creating groups can be found [[Inspect3D: | ||
- | |||
- | - Select the {{I3DGroups.png}} **Query Definitions** drop down and select **Query Definitions**. | ||
- | - Add a {{ActionAdd48x48.png}} **Query** (group) and name it **“HIGHSCHOOL_RIGHT_LOW_PAV_X”**. | ||
- | - While the group you just created is selected add a {{ActionAdd48x48.png}} **Condition** and give it the name **“highschool_right_low_pav_x”**. | ||
- | - Signals: Type - “LINK_MODEL_BASED” , Folder - “ORIGINAL”, | ||
- | - Refinement: | ||
- | - Check **Refine using tag** and select R, | ||
- | - Check **Refine using signal**, click {{ActionAdd48x48.png}} **Add**, give it the name “lowBatSpeed”, | ||
- | - Click {{ActionAdd48x48.png}} **Add**, give it the name “HIGHSCHOOL”, | ||
- | - Once you are happy with your queries click **Save Query Definitions** to save it as a .q3d file. | ||
- | |||
- | {{QueryDefinitions.png}} | ||
- | |||
- | **Notes:** | ||
- | |||
- | * For this tutorial we are basing low and high blast bat speeds off of Blast Motion’s bat speed data based on competition level [[https:// | ||
- | * **College**: | ||
- | * **HIGHSCHOOL**: | ||
- | |||
- | ===== Inspect3D Visualization and PCA Analysis ===== | ||
- | |||
- | If you haven’t had much experience visualizing signals in Inspect3D, take some time to review the [[Inspect3D: | ||
- | |||
- | To begin the **PCA** (principal component analysis), select two groups that you want to compare. Let's start by looking at **HIGHSCOOL_RIGHT_HIGH_PAV_Z** and **College_RIGHT_HIGH_PAV_Z**, | ||
- | |||
- | Navigate to the toolbar at the top of the interface and select the {{I3D_PCAOptions2.png}} **PCA dropdown**. Select the number of **PCs** (principal components) you want for your analysis, for this tutorial we will use 5 (more about this in Variance Explained), and then check the **Use Workspace Mean** if it is not already selected. Now click **Run PCA** and **Show PCA Graphs** and the graphs will appear to the right of your workspace. | ||
- | |||
- | Once your PCA graph has appeared, at the bottom right of the screen you will see six options for visualizing results of the analysis (variance explained, loading vector, workspace scores, group scores, extreme plot and PC reconstruction).See the [[Inspect3D: | ||
- | |||
- | {{PCAAnalysis5.png}} | ||
- | |||
- | ===== Results ===== | ||
- | |||
- | We can interpret differences of pelvic angular velocity between different competition levels of hitters through visual comparisons of high blast bat speeds at each coordinate system. Additionally we can analyze the various PCA graphs to look at **Variance Explained**, | ||
- | |||
- | **Notes:** | ||
- | |||
- | * The number of college and high school subjects are not balanced, which may lead to inconsistent results between the two groups. | ||
- | |||
- | * Examples of interpreting PCA results are shown below and through the following tutorial [[Inspect3D: | ||
- | |||
- | \\ | ||
- | **Visual Comparisons: | ||
- | |||
- | When visualizing different coordinates of the pelvic angular velocity, 3 figures can be laid out in a 3x1 grid. For now you can hide your PCA by clicking **Show PCA Graphs** in the PCA dropdown, then go to the {{I3DShowOptions.png}} **[[Inspect3D: | ||
- | |||
- | Looking at the anterior/ | ||
- | |||
- | **Notes:** | ||
- | |||
- | * For more details on creating and exporting graphs please take a look at this tutorial [[Inspect3D: | ||
- | |||
- | \\ | ||
- | **Variance Explained: | ||
- | |||
- | Variance explained is the first graph displayed after running a PCA, and displays the variance explained by each principal component as well as the cumulative variance of each principal component. We can see that 90.0% of the variance can be explained by the first five principal components. Generally you want to increase the number of PCs until they explain 95% of the variance, but for this data set 7 PCs are needed to reach that variance and we don't want to start overfitting or capturing too much noise, so the number of PCs will be left at five. | ||
- | |||
- | {{HIGHSCOOL_variance_explained.jpg}} | ||
- | |||
- | \\ | ||
- | **Group Scores:** | ||
- | |||
- | When looking at the group scores the goal is to be able to confidently classify subjects as either being college or high school hitters. Analyzing this graph shows that the standard errors of all five PCs do not overlap, suggesting that all 5 PCs can differentiate between the groups. We can see from variance explained that PC1 accounts for the most overall variation at 38.9%, but since PC2 and PC5 are showing the most significant differences for each group, due to the group scores not overlapping and not crossing over zero they will be the focus of the remaining analysis. | ||
- | |||
- | {{HIGHSCHOOL_Group_Score.jpg}} | ||
- | |||
- | \\ | ||
- | **Loading Vector:** | ||
- | |||
- | We can take a closer look at PC2 and PC5 to see why these principal components may be showing the most significant differences. Looking at the mean signal trace of the college and high school subjects pelvic internal/ | ||
- | |||
- | {{PC2_baseball.jpg}}{{PC5_baseball.jpg}} | ||
- | |||
- | \\ | ||
- | **Workspace Scores:** | ||
- | |||
- | Having identified the principal components of interest, we will switch to the **Workspace Scores** and plot the chosen PCs against each other (i.e., for this tutorial, plot PC2 versus PC5). We want to be able to distinguish our college group in light blue and high school group in dark blue, and in this graph we can see that there is partial separation between groups. The dark blue high school group seems to be clustered in the bottom left corner with the light blue college group dispersed elsewhere. If there was an even distribution of high school and college subjects (right now there are much fewer high school students) we might have stronger evidence of a relationship between the groups that allows for easier clustering and separation. | ||
- | |||
- | {{HIGHSCHOOL_Workspace_2_5.jpg}} | ||
- | |||
- | ===== Conclusion ===== | ||
- | |||
- | From the results of the visual comparisons and the PCA of this tutorial we can conclude that there is a correlation between a high pelvic angular velocity in internal/ | ||
- | |||
- | However, there are limitations on the conclusion such as a disproportionate amount of college subjects compared to high school subjects so the conclusion should be interpreted with caution. This is by no means a complete study and used simply for the demonstration of Inspect3D. Please feel free to explore this data on your own and make improvements while you become comfortable with Inspect3D and its various applications. | ||
- | |||
- | ===== References ===== | ||
- | |||
- | [1] Wasserberger KW, Brady AC, Besky DM, Jones BR, Boddy KJ. The OpenBiomechanics Project: The open source initiative for anonymized, elite-level athletic motion capture data. (2022). https:// | ||
- | |||
- | [2] Fortenbaugh, | ||
- | |||
- | [3] Welch CM, Banks SA, Cook FF, Draovitch P. Hitting a baseball: a biomechanical description. J Orthop Sports Phys Ther. 1995 Nov; | ||
- | |||
- | [4] Hirano Y. Biomechanical analysis of baseball hitting. In ISBS-Conference Proceedings Archive 1986. https:// | ||
- | |||
- | [5] Rpp. (2022, February 7). A Review of Blast Motion Baseball and Its Swing Metrics. RPP Baseball. https:// | ||
- | |||
- | |||
inspect3d/tutorials/analysis_of_baseball_hitters.1720028045.txt.gz · Last modified: 2024/07/03 17:34 by sgranger