GithubHelp home page GithubHelp logo

georgefwt / face-landmark-controlnet Goto Github PK

View Code? Open in Web Editor NEW
86.0 5.0 12.0 2.94 MB

Proof of concept for control landmarks in diffusion models!

License: Apache License 2.0

Python 99.97% Shell 0.03%

face-landmark-controlnet's Introduction

Face landmark ControlNet

ControlNet with Face landmark

I trained using ControlNet, which was proposed by lllyasviel, on a face dataset. By using facial landmarks as a condition, finer face control can be achieved.

Currently, I’m using Stable Diffusion 1.5 as the base model and dlib as the face landmark detector (those with the capability can replace it with a better one). Find the checkpoint here https://huggingface.co/georgefen/Face-Landmark-ControlNet.

Create conda environment:

conda env create -f environment.yaml
conda activate control
wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
bzip2 -d shape_predictor_68_face_landmarks.dat.bz2

Testing it by:

python gradio_landmark2image.py

Generate face with the identical poses and expression

To create a new face, input an image and extract the facial landmarks from it. These landmarks will be used as a reference to redraw the face while ensuring that the original features are retained.

Generate face with the identical poses and expression

Control the facial expressions and poses of generated images

For the images we generated, we have the prompt and random seed used to generate them. While keeping the prompt and random seed, we can also edit the landmarks to modify the facial expressions and postures of the generated results.

Controlthefacialexpressionsandposesofgeneratedimages

Credits

Thanks to lllyasviel for his amazing work on https://github.com/lllyasviel/ControlNet!, this is totaly based on his work.

This is just a proof of concept and should not be applied for any risky purposes.

face-landmark-controlnet's People

Contributors

georgefwt avatar xiaoyaoyouustc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

face-landmark-controlnet's Issues

How to use it in sd-webui-controlnet extension?

Yes, I downloaded the 5gb model and placed it in models\controlnet, it can be loaded within the webui extension, but it seems that its guidiance strength is not enough, and ofc, without a preprocessor. How do I achieve the effects given, and what file should I put to get the annotator?

MiraclePlus Potential Entrepreneurs Seeking

I am Haowen Lei from MiraclePlus, focusing on AIGC. I have read your project "Face-Landmark-ControlNet" and am anxious to establish contact with you. If you are willing to communicate, please add my WeChat: Lion_LeiHw

About pth

hi, where can i find 'control_sd15_landmarks.pth'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.