Code Monkey home page Code Monkey logo

face2diffusion's Introduction

Face2Diffusion (CVPR2024)

ย  ย  face2diffusion_demo

Overview The official PyTorch implementation for the following paper:

Face2Diffusion for Fast and Editable Face Personalization,
Kaede Shiohara, Toshihiko Yamasaki,
CVPR 2024

Changelog

2024/03/28 ๐Ÿ”ฅ Released a demo code on Google Colab.
2024/03/15 ๐Ÿ”ฅ Released the full inference pipeline.
2024/03/11 ๐Ÿ”ฅ Released this repository and demo code.

Demo on Google Colab

face2diffusion_demo

Recomended Development Environment

  • GPU: NVIDIA A100
  • CUDA: 12.2
  • Docker: 535.129.03

Setup

1. Build Docker Image

Build a docker image

docker build -t face2diffusion dockerfiles/

Execute docker using the following command (Please replace /path/to/this/repository with a proper one)

docker run -it --gpus all --shm-size 512G \
-v /path/to/this/repository:/workspace \
face2diffusion bash

Install some packages

bash install.sh

2. Download checkpoints

We provide checkpoints for mapping network and MSID encoder. Download and place them to checkpoints/.

Demo

Generate images for an facial image and text prompt:

python3 inference_f2d.py \
--w_map checkpoints/mapping.pt \
--w_msid checkpoints/msid.pt \
-i input/0.jpg \ # input identity
-p 'f l eating bread in front of the Eiffel Tower' \ # input prompt
-o output.png \ # output file name
-n 8 \ # num of images to generate

Note: The identifier S* should be represented as "f l".

Acknowledgements

We borrow some code from InsightFace, ICT, and Pix2Word.

Citation

If you find our work useful for your research, please consider citing our paper:

@inproceedings{shiohara2024face2diffusion,
  title={Face2Diffusion for Fast and Editable Face Personalization},
  author={Shiohara, Kaede and Yamasaki, Toshihiko},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2024}
}

face2diffusion's People

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.