Giter VIP home page Giter VIP logo

diffswap's Introduction

DiffSwap

Created by Wenliang Zhao, Yongming Rao, Weikang Shi, Zuyan Liu, Jie Zhou, Jiwen Lu

This repository contains PyTorch implementation for paper "DiffSwap: High-Fidelity and Controllable Face Swapping via 3D-Aware Masked Diffusion"

[paper]

Installation

Please first install the environment following stable-diffusion, and then run pip install -r requirements.txt.

Please download the checkpoints from [here], and put them under the checkpoints/ folder. The resulting file structure should be:

├── checkpoints
│   ├── diffswap.pth
│   ├── glint360k_r100.pth
│   └── shape_predictor_68_face_landmarks.dat

Inference

We provide a sample code to perform face swapping given the portrait source and target images. Please put the source images and target images in data/portrait_jpg and run

python pipeline.py

the swapped results are saved in data/portrait/swap_res_ori.

Citation

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

@article{zhao2023diffswap,
  title={DiffSwap: High-Fidelity and Controllable Face Swapping via 3D-Aware Masked Diffusion},
  author={Zhao, Wenliang and Rao, Yongming and Shi, Weikang and Liu, Zuyan and Zhou, Jie and Lu, Jiwen},
  journal={CVPR},
  year={2023}
}

diffswap's People

Contributors

wl-zhao avatar

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.