Analyzes weightlifting videos for correct posture using pose estimation with OpenCV
Download pose_iter_160000.caffemodel
online (http://posefs1.perception.cs.cmu.edu/OpenPose/models/pose/mpi/pose_iter_160000.caffemodel) and put it in pose/mpi/pose_iter_160000.caffemodel
Run the jupyter notebook and enjoy! Below is an analysis on how this project was created.
This project analyzes videos/images of the deadlift (one of the most fundamental weightlifting exercises) and scores the posture of the person performing the deadlift from a range of 0 to 1.
This process can be simplified into a few main parts:
VideoWriter
.Some examples below from images at this stage of our pipeline:
VideoWriter
object. Once all desired frames have been scored, we release our VideoWriter
object.Overall we are able to analyze our deadlifting videos with some help with computer vision. The next step in this project would be expanding the data set for posture classification (step 4). The main challenge is finding a large enough data set to build a model that can generalize well and avoid overfitting to the small data set. However if a sufficient amount of exercise posture data is aggregated, our model can become extremely useful for fitness enthusiasts.
Built using pre-trained weights for OpenPose keypoint detection using the MPII pose estimation dataset (see https://github.com/spmallick/learnopencv for OpenPose example and other computer vision examples), Python, OpenCV, Scikit-Learn, Jupyter Notebook.