Skip to main content

Easy DWPose Detector

Project description

PyPI

Easy DWPose Detector

Effective Whole-body Pose Estimation with Two-stages Distillation

DWPose official

Installation

#need install pytorch for your platform
#pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
pip3 install onnxruntime==1.13.1
pip3 install onnxruntime_gpu==1.13.1
pip3 install matplotlib==3.6.2
pip3 install opencv_python==4.7.0.68
pip3 install scipy==1.11.4
pip3 install scikit_image==0.19.3
pip3 install huggingface_hub==0.20.1 
pip3 install dwpose

Easy to use

import json
import os
from PIL import Image

#if u need proxy
#os.environ['http_proxy'] = "http://127.0.0.1:1080"
#os.environ['https_proxy'] = "http://127.0.0.1:1080"

img = Image.open("test.jpg") #your image file

from dwpose import DwposeDetector
model = DwposeDetector.from_pretrained_default()
imgOut,j,source = model(img,
    include_hand=True,
    include_face=True,
    include_body=True,
    image_and_json=True,
    detect_resolution=512)

#openpose json
f = open("keypoints.json","w")
f.write(json.dumps(j))
f.close()

#openpose image
imgOut.save("openpose.jpg")

#detected resolution image
source.save("source.jpg")

del model

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dwpose-1.0.1.tar.gz (36.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dwpose-1.0.1-py3-none-any.whl (45.1 kB view details)

Uploaded Python 3

File details

Details for the file dwpose-1.0.1.tar.gz.

File metadata

  • Download URL: dwpose-1.0.1.tar.gz
  • Upload date:
  • Size: 36.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for dwpose-1.0.1.tar.gz
Algorithm Hash digest
SHA256 cf562bba44c1a560de54cc9f1c8b6b66bea250339800ae880d864be6245afbba
MD5 4ab3c1b0a1aeb6aad15e1bf47261ec7b
BLAKE2b-256 ba266caeebc2454dd3c52b9807954ee7cf5a6cc777c4c01e7ad97eeda655b7e8

See more details on using hashes here.

File details

Details for the file dwpose-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: dwpose-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 45.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for dwpose-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ced3b7d44e53d8b6bb1cf63e146dd6b59ac3970a60a43f3f36550b7ab6590910
MD5 8e74a422691142479b3b053f37554820
BLAKE2b-256 85d3bb3f800ab2bbd4b1088324b6e698e23499963164d85e32924e3f010ef247

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page