Skip to main content

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

Metadata

Release files for dwpose 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dwpose 1.0.1
File Size Uploaded
dwpose-1.0.1.tar.gz 36.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dwpose 1.0.1
File Interpreter ABI Platform
dwpose-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 81.7 kB

Release files / dwpose-1.0.1.tar.gz

Download URL dwpose-1.0.1.tar.gz
Size 36.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cf562bba44c1a560de54cc9f1c8b6b66bea250339800ae880d864be6245afbba
BLAKE2b-256 checksum
How to use checksums
ba266caeebc2454dd3c52b9807954ee7cf5a6cc777c4c01e7ad97eeda655b7e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / dwpose-1.0.1-py3-none-any.whl

Download URL dwpose-1.0.1-py3-none-any.whl
Size 45.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ced3b7d44e53d8b6bb1cf63e146dd6b59ac3970a60a43f3f36550b7ab6590910
BLAKE2b-256 checksum
How to use checksums
85d3bb3f800ab2bbd4b1088324b6e698e23499963164d85e32924e3f010ef247
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page