Table of Contents
MetaBow Postural analysis provides a computer-vision-based tool to assist violin learning. This project detects and tracks angles between key body points in real time.
- Python 3.7 at https://www.python.org/downloads/windows/
- MiniConda 3.7 at https://docs.conda.io/en/latest/miniconda.html
- Pip at https://pypi.org/project/pip/
For MacOS users please follow this detailed installation process https://developers.google.com/earth-engine/guides/python_install-conda#mac
-
Download Miniconda installer to your Home directory and run the following terminal commands:
curl https://repo.anaconda.com/miniconda/Miniconda3-py37_4.11.0-MacOSX-x86_64.sh -o ~/miniconda.sh
-
Install Miniconda quietly, accepting defaults, to your Home directory:
bash ~/miniconda.sh -b -p
-
Remove Miniconda installer from your Home directory:
rm ~/miniconda.sh
-
Test Miniconda install:
source $HOME/miniconda3/bin/activate conda --help
You should get conda's help text, if "command is not found" then the installation has not been successful.
-
Restart Terminal
-
Add Conda to path
printf '\n# add path to conda\nexport PATH="$HOME/miniconda3/bin:$PATH"\n' >> ~/.bashrc
-
Restart open command line interface for environmental variable changes to take effect.
-
Create environment. The environment separates certain files from the system. For example, if a file needs Python 2.7, you can create an environment to run it independetly of your current installed Python version.
you may replace "metabow" with any other term
conda create --name "metabow"
-
Activate environment
conda activate "metabow"
How to set up your app:
-
Clone the repo
git clone https://github.com/robertoalonsotrillo/MetaBow_MediaPipe.git
-
Change your terminal path to repo folder
cd MetaBow_MediaPipe
-
Activate enviornment
conda activate "metabow"
-
Install Requirements
Make sure that the environment is activated before running it
pip install -r requirement.txt
How to use the tool:
-
Open your code folder in the terminal
cd PATH/to/your/folder
-
Activate the environment
source ~/miniconda3/bin/activate
conda activate metabow
-
Start the server and make sure that the environment is activated before running it. The new terminal line will now start with (environment's name).
python app.py
-
Open the browser and go to localhost.com:5000:
-
Inferencing
There are two approaches to inferencing
3.1. Video Upload
You may upload and analyze any video, just make sure that the quality is at least 480p for better results
3.2. Webcam
You may use your webcam instead.
You will find two further inferencing options:
A. FileName TextBox
Add the filename for the json file containing the extracted angle data per frame.
B. Download Button
This button downloads the created json file, allowing you to store it on any selected folder.
You may choose between two inferencing models:
A. Basic Posture
A basic model analyzing elbow and shoulder angles.
B. Comprehensive Posture
A more comprehensive approach including hand, wrist, and transversal angles.
-
Error page
If you select file inferencing but do not upload a file you will be redirected to the error page.
- Detect Pose and calculate angles
- Detect Bow and Violen
- Find Apropiate angles i.e. recommended ranges
- Multi-Reports support
- JSON
- BVH