dwpose


Namedwpose JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryEasy DWPose Detector
upload_time2024-01-05 09:57:09
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords
VCS
bugtrack_url
requirements huggingface_hub matplotlib numpy onnxruntime onnxruntime_gpu opencv_python Pillow scikit_image scipy torch
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
    <img src="https://raw.githubusercontent.com/nicehero/DWPose/main/title.jpg"/>
</div>

<div align="center">
    
[![PyPI](https://img.shields.io/pypi/v/dwpose)](https://pypi.org/project/dwpose/)

</div>

# Easy DWPose Detector

Effective Whole-body Pose Estimation with Two-stages Distillation

[DWPose official](https://github.com/IDEA-Research/DWPose)



## Installation
```shell
#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 
```python
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
- [DWPose official](https://github.com/IDEA-Research/DWPose)
- [controlnet_aux](https://github.com/patrickvonplaten/controlnet_aux/)
- [comfyui_controlnet_aux](https://github.com/Fannovel16/comfyui_controlnet_aux)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "dwpose",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "nicehero <85948597@qq.com>",
    "download_url": "https://files.pythonhosted.org/packages/ba/26/6caeebc2454dd3c52b9807954ee7cf5a6cc777c4c01e7ad97eeda655b7e8/dwpose-1.0.1.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\r\n    <img src=\"https://raw.githubusercontent.com/nicehero/DWPose/main/title.jpg\"/>\r\n</div>\r\n\r\n<div align=\"center\">\r\n    \r\n[![PyPI](https://img.shields.io/pypi/v/dwpose)](https://pypi.org/project/dwpose/)\r\n\r\n</div>\r\n\r\n# Easy DWPose Detector\r\n\r\nEffective Whole-body Pose Estimation with Two-stages Distillation\r\n\r\n[DWPose official](https://github.com/IDEA-Research/DWPose)\r\n\r\n\r\n\r\n## Installation\r\n```shell\r\n#need install pytorch for your platform\r\n#pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\r\npip3 install onnxruntime==1.13.1\r\npip3 install onnxruntime_gpu==1.13.1\r\npip3 install matplotlib==3.6.2\r\npip3 install opencv_python==4.7.0.68\r\npip3 install scipy==1.11.4\r\npip3 install scikit_image==0.19.3\r\npip3 install huggingface_hub==0.20.1 \r\npip3 install dwpose\r\n```\r\n## Easy to use \r\n```python\r\nimport json\r\nimport os\r\nfrom PIL import Image\r\n\r\n#if u need proxy\r\n#os.environ['http_proxy'] = \"http://127.0.0.1:1080\"\r\n#os.environ['https_proxy'] = \"http://127.0.0.1:1080\"\r\n\r\nimg = Image.open(\"test.jpg\") #your image file\r\n\r\nfrom dwpose import DwposeDetector\r\nmodel = DwposeDetector.from_pretrained_default()\r\nimgOut,j,source = model(img,\r\n    include_hand=True,\r\n    include_face=True,\r\n    include_body=True,\r\n    image_and_json=True,\r\n    detect_resolution=512)\r\n\r\n#openpose json\r\nf = open(\"keypoints.json\",\"w\")\r\nf.write(json.dumps(j))\r\nf.close()\r\n\r\n#openpose image\r\nimgOut.save(\"openpose.jpg\")\r\n\r\n#detected resolution image\r\nsource.save(\"source.jpg\")\r\n\r\ndel model\r\n\r\n```\r\n## References\r\n- [DWPose official](https://github.com/IDEA-Research/DWPose)\r\n- [controlnet_aux](https://github.com/patrickvonplaten/controlnet_aux/)\r\n- [comfyui_controlnet_aux](https://github.com/Fannovel16/comfyui_controlnet_aux)\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Easy DWPose Detector",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/nicehero/dwpose",
        "Issues": "https://github.com/nicehero/dwpose/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "85d3bb3f800ab2bbd4b1088324b6e698e23499963164d85e32924e3f010ef247",
                "md5": "8e74a422691142479b3b053f37554820",
                "sha256": "ced3b7d44e53d8b6bb1cf63e146dd6b59ac3970a60a43f3f36550b7ab6590910"
            },
            "downloads": -1,
            "filename": "dwpose-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8e74a422691142479b3b053f37554820",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 45061,
            "upload_time": "2024-01-05T09:57:07",
            "upload_time_iso_8601": "2024-01-05T09:57:07.422987Z",
            "url": "https://files.pythonhosted.org/packages/85/d3/bb3f800ab2bbd4b1088324b6e698e23499963164d85e32924e3f010ef247/dwpose-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba266caeebc2454dd3c52b9807954ee7cf5a6cc777c4c01e7ad97eeda655b7e8",
                "md5": "4ab3c1b0a1aeb6aad15e1bf47261ec7b",
                "sha256": "cf562bba44c1a560de54cc9f1c8b6b66bea250339800ae880d864be6245afbba"
            },
            "downloads": -1,
            "filename": "dwpose-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4ab3c1b0a1aeb6aad15e1bf47261ec7b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 36621,
            "upload_time": "2024-01-05T09:57:09",
            "upload_time_iso_8601": "2024-01-05T09:57:09.700531Z",
            "url": "https://files.pythonhosted.org/packages/ba/26/6caeebc2454dd3c52b9807954ee7cf5a6cc777c4c01e7ad97eeda655b7e8/dwpose-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-05 09:57:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nicehero",
    "github_project": "dwpose",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "huggingface_hub",
            "specs": [
                [
                    "==",
                    "0.20.1"
                ]
            ]
        },
        {
            "name": "matplotlib",
            "specs": [
                [
                    "==",
                    "3.6.2"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.24.3"
                ]
            ]
        },
        {
            "name": "onnxruntime",
            "specs": [
                [
                    "==",
                    "1.13.1"
                ]
            ]
        },
        {
            "name": "onnxruntime_gpu",
            "specs": [
                [
                    "==",
                    "1.13.1"
                ]
            ]
        },
        {
            "name": "opencv_python",
            "specs": [
                [
                    "==",
                    "4.7.0.68"
                ]
            ]
        },
        {
            "name": "Pillow",
            "specs": [
                [
                    "==",
                    "10.2.0"
                ]
            ]
        },
        {
            "name": "scikit_image",
            "specs": [
                [
                    "==",
                    "0.19.3"
                ]
            ]
        },
        {
            "name": "scipy",
            "specs": [
                [
                    "==",
                    "1.11.4"
                ]
            ]
        },
        {
            "name": "torch",
            "specs": [
                [
                    "==",
                    "2.1.1+cu118"
                ]
            ]
        }
    ],
    "lcname": "dwpose"
}
        
Elapsed time: 0.17724s