Spaces:
Paused
Paused
Download pose.py from acmyu/KeyframesAI: direct link, hf CLI and curl.
- Browser
- Download file 443 Bytes
-
https://huggingface.co/spaces/acmyu/KeyframesAI/resolve/main/pose.py
- Command line
-
hf download hf://spaces/acmyu/KeyframesAI/pose.py
-
curl -L -o pose.py https://huggingface.co/spaces/acmyu/KeyframesAI/resolve/main/pose.py
443 Bytes
| #from annotator.dwpose import DWposeDetector | |
| from easy_dwpose import DWposeDetector | |
| from PIL import Image | |
| device = "cpu" | |
| dwpose = DWposeDetector(device=device) | |
| pil_image = Image.open("imgs/baggy.png").convert("RGB") | |
| #skeleton = dwpose(pil_image, output_type="np", include_hands=True, include_face=False) | |
| out_img, _ = dwpose(pil_image, include_hands=True, include_face=False) | |
| #print(pose['bodies']) | |
| out_img.save("pose.png") | |