Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Preprocessor for OpenPose ControlNet

License

NotificationsYou must be signed in to change notification settings

reallyigor/easy_dwpose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recently, I tried to inference the DWPose (improved OpenPose) preprocessor forDiffusers and was shocked by how complicated it actually is!So, I decided to change that!

The goal of Easy DWPose is to provide a generic, reliable, and easy-to-use interface for making skeletons for ControlNet.

Me:X account

Why you should use it 😋

  1. Easy installation!
  2. Automatic checkpoint downloading.
  3. Generic class to either import in Jupyter or to run on a video/images.
  4. Code that is easy to read and modify.
  5. Choose GPU for multi-gpu inference!
  6. Custom drawing functions: convenient interface for modifyinghow you draw skeletons.

Installation

PIP

pip install easy-dwpose

From source

git clone git@github.com:reallyigor/easy_dwpose.gitcd easy_dwposepip install -e.

Quickstart

In you own .py scrip or in Jupyter

importtorchfromPILimportImagefromeasy_dwposeimportDWposeDetector# You can use a different GPU, e.g. "cuda:1"device="cuda:0"iftorch.cuda.is_available()else"cpu"detector=DWposeDetector(device=device)input_image=Image.open("assets/pose.png").convert("RGB")skeleton=detector(input_image,output_type="pil",include_hands=True,include_face=True)skeleton.save("skeleton.png")
InputOutput


On a video

python scripts/inference_on_video.py --input assets/dance.mp4 --output_path result.mp4
InputOutput


On a folder of images

python scripts/inference_on_folder.py --input assets/ --output_path results/

Custom skeleton drawing

By default, we use standart skeleton drawing function but several projects change it (e.g.MusePose). Modify it or write your own from scratch!

fromPILimportImagefromeasy_dwposeimportDWposeDetectorfromeasy_dwpose.draw.museposeimportdraw_poseasdraw_pose_museposedetector=DWposeDetector(device="cpu")input_image=Image.open("assets/pose.png").convert("RGB")skeleton=detector(input_image,output_type="pil",draw_pose=draw_pose_musepose,draw_face=False)skeleton.save("skeleton.png")

Acknowledgement

We thank the original authors of theDWPose for their incredible models!

Thanks for open-sourcing!

About

Preprocessor for OpenPose ControlNet

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

Languages


[8]ページ先頭

©2009-2026 Movatter.jp