This research/code is cited from: (Zhe Cao, Gines Hidalgo, Tomas Simon, Shih-En Wei, Yaser Sheikh, OpenPose: Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields) & (Steven Chen, Richard R. Yang, Pose Trainer: Correcting Exercise Posture using Pose Estimation)
In this project uses the concept of OpenPose to detect and track human body by generating keypoints on body joints and then connecting them forming a skeleton.This project was later extended to track a person performing the bicep curls workout and count the repitions only when the form of the exercise is proper. This projects uses the model developed by CMU Carnegie Mellon University.
All the files are obtained from https://github.com/akhilvasvani/StackGAN-v2/tree/master/code except generate_images.py which is our built in code. There are many files to list but here are the imported ones
- bicepcurl.py main file that tracks and counts the bicep curl
- OpenPose_Notebook.py performs basic pose estimation tasks
Download training repo: git clone https://github.com/CMU-Perceptual-Computing-Lab/openpose_train.git
- Download the required LMDB file: cd training; bash a_lmdbGetMpii.sh
- Generate the Caffe ProtoTxt and shell file for training by running python d_setLayers.py
- Run bash train_pose.sh 0,1,2,3 (generated by d_setLayers.py) to start the training
For Execution:
- Download Code Repo: git clone https://github.com/ysdinesh31/PoseEstimationTracking
- To run open pose model: python OpenPose_Notebook.py
- To run bicep curl counter: python bicep_curl.py We can give image, video or live feed as input for openpose model.
- Opencv can be installed using following command in terminal (as root user) sudo apt-get install python3-opencv
- NumPy can be installed using following commands in terminal using conda: conda install numpy using pip: pip install numpy
- Caffe : sudo apt install caffe-cuda
python 3.6+ Visual Studio Code or any other editor OpenCV Mediapipe NumPy