Skip to content

Tool to convert human images to a picture, used for conditional avatars

License

Notifications You must be signed in to change notification settings

sign/image-to-human-avatar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image to Human Avatar

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 Area of Interest Cropped Masked
High quality image of a human. Shoulder width $x$ Area of interest in $2.5x$ shoulder width where the center is the neck Image after cropping Image after masking
source source source source

Real Examples

Source Image Avatar Masked Avatar
source avatar masked
source avatar masked

Conditions

  • 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.

Usage

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")

About

Tool to convert human images to a picture, used for conditional avatars

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published

Languages