This project aims to automatically process photos of humans into animatable human avatars.
Specifically, we aim to detect the human in the image, position it to our standard positioning, and mask it.
Source Image | Avatar | Masked Avatar |
---|---|---|
- Input can be of any aspect ratio.
- There must be a human in the image (real or fictional).
- The human must be standing, with their arms down, facing the camera (TODO).
- The image must be safe-for-work.
- The creator of the avatar must have the right to use the image.
pip install git+https://github.com/sign/image-to-human-avatar
To then process an image:
from human_avatar import image_to_avatar
from PIL import Image
image = Image.open("example.jpg")
cropped, masked, pose = image_to_avatar(image)
masked.save("masked.png")