Official code for the iSTAR 2023 paper "A Case Study for the Automatic Supervision of Body-Weight Exercises: The Squat". This repository contains the official python implementation of the experiments described in the paper.
MOCAP Skeletons in deep squat positions aligned with Procrustes transformation: correct squat (blue) and bad squat (red)
The code is originally developed in Python 3.7.
pip install matplotlib numpy scipy
You can find the data we used for our experiments here: https://drive.google.com/drive/folders/1hWCvyQGq6Cp3Z7RWAld1Zkm9-VVjjvpe?usp=share_link
After downlaoding them, move them into the folder body_data
In order to compute the experiments for the ZED system as shown in the paper, move in the directory src/ZED
Then, run:
python ZED_comparison.py reference sample
To generate a 3D plot of a time-instant (e.g.1200) of the reference/sample movement, run:
python ZED_3Dplot.py <file_name> <time_instant>
To generate a 2D plot of the head and pelvis trajectories of the reference/sample movement, run:
python trajectories.py
The script analyzes the trajectory of the head relative to a vertical reference line and the trajectory of the pelvis for a given sample compares it with the reference movement.
Trajectory of the head relative to a vertical reference line - Sample 3
Trajectory of the pelvis vs the reference trajectory of the pelvis - Sample 4
In order to compute the experiments for the MOCAP system as shown in the paper, move in the directory src/MOCAP
Then, run:
python MOCAP_comparison.py reference sample
To generate a 3D plot of a time-instant (e.g.4200) of the reference/sample movement, run:
python MOCAP_3Dplot.py <file_name> <time_instant>
To generate a 2D plot of the head and pelvis trajectories of the reference/sample movement, run:
python trajectories.py
The script analyzes the trajectory of the head relative to a vertical reference line and the trajectory of the pelvis for a given sample compares it with the reference movement.
Trajectory of the head relative to a vertical reference line - Sample 3
Trajectory of the pelvis vs the reference trajectory of the pelvis - Sample 4
Please cite the following paper if you use this code directly or indirectly in your research/projects:
@inproceedings{SquatAnalysis:iSTAR:2023,
title = {A Case Study for the Automatic Supervision of Body-Weight Exercises: The Squat},
author = {Aliprandi, Girardi, Martinelli, De Natale, Bisagno and Conci},
conference = {International Workshop on Sport Technology and Research (IEEE-STAR)},
month = jun,
year = {2023},
month_numeric = {06}}
Software Copyright License for non-commercial scientific research purposes. Please read carefully the terms and conditions and any accompanying documentation before you download and/or use the provided data and software, (the "Data & Software"), software, scripts, and animations. By downloading and/or using the Data & Software (including downloading, cloning, installing, and any other use of this repository), you acknowledge that you have read these terms and conditions, understand them, and agree to be bound by them. If you do not agree with these terms and conditions, you must not download and/or use the Data & Software. Any infringement of the terms of this agreement will automatically terminate your rights under this License.
The code in this repository is developed by Paolo Aliprandi and Letizia Girardi while at University of Trento.
If you have any questions you can contact us at mmlab-disi@unitn.it.
For commercial licensing, contact mmlab-disi@unitn.it