Pose Estimation With MoveNet Lightning
MoveNet is the TensorFlow pre-trained model that identifies 17 different key points of the human body. It is the fastest model that detects the key points at a speed >50fps.
For more information just visit the following link:
Click Here
Demo
Download MoveNet Lighting Model(Single-Pose)
Click on this link to download the model from Tensorflow Hub: Download Model
Installation
Create a Virtual Environment & Install all the following required dependencies.
pip install tensorflow
pip install tensorflow-gpu
pip install opencv-python
pip install argparse
Note: It is not mandatory to install tensorflow-gpu but if you have GPU on your machine you can install it.
OR
Just execute the requirements.txt file by running the following command.
pip install -r requirements.txt
Cloning
Just clone this repository to get the code by using the following command.
git clone https://github.com/Yash-Vora/Pose-Estimation-With-MoveNet-Lightining.git
Usage
There are three arguments that you can pass from the cmd/terminal:
--path - Path of video
--threshold_value - Pass threshold value between 0 to 1
--output - Path to store the output of video/webcam
Go to cmd/terminal/powershell and write the following commands to run this script.
- It will detect key points from the video with a threshold value and output path.
python detect.py --path 'Input_Video/video.mp4' --threshold_value 0.4 --output 'Output_Video/output_video.avi'
- It will detect key points from the video without threshold value(default value is 0.4) and output path.
python detect.py --path 'Input_Video/video.mp4'
- It will detect key points from the video with output path and without threshold value(default value is 0.4).
python detect.py --path 'Input_Video/video.mp4' --output 'Output_Video/output_video.avi'
- It will detect key points from the webcam with a threshold value and output path.
python detect.py --threshold_value 0.4 --output 'Output_Video/output_webcam.avi'
- It will detect key points from the webcam without threshold value(default value is 0.4) and output path.
python detect.py
- It will detect key points from webcam with output path and without threshold value(default value is 0.4).
python detect.py --output 'Output_Video/output_webcam.avi'