This repository is API based Body and Hand Pose Estimation.
Just run the server and request to the server with any image file which contains body and hand(for hand body is required) That's all :)
- You should install packages. (descripted inside of requirements.txt)
- Run the server for the requests
- Request to the server with image
- Get your response and Enjoy :)
Install PyTorch by following the quick start guide here (use pip)
For another requirements, just run command below.
$ cd pose_est_api/
$ pip3 install -r requirements.txt
Download the pytorch models(.pth) and put them in a directory named model in the project root directory
Now you can run your server first.
$ uvicorn post_est:app --reload
Then you should be get the messages below:
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO: Started reloader process [76894] using statreload
INFO: Started server process [76896]
INFO: Waiting for application startup.
INFO: Application startup complete.
For testing the server you can use req.jpg.
$ python3 main.py req.jpg
What is your response?
Do you want to save response image? [y/N]: y
After said yes, you get message below:
image saved as res.jpg
- You can configure post json context from main.py.
- If you want to draw position keypoints of hand you should define value of "hand_pose" as 1.
- To draw rectangle for right and left hands(if it exists) you should define "which_hands" as 1.