Giter Club home page Giter Club logo

freenet's Introduction

FReeNet โ€” Official PyTorch Implementation

Python 3.7 PyTorch 1.5.1 License MIT

Official pytorch implementation of the paper "FReeNet: Multi-Identity Face Reenactment, CVPR'20".

Using the Code

Requirements

This code has been developed under Python3.7, PyTorch 1.5.1 and CUDA 10.1 on Ubuntu 16.04.

# Install python3 packages
pip3 install -r requirements.txt

Datasets in the paper

  • Download RaFD dataset to datasets/RaFD.
  • Use Face++ API to extract the landmark with 106 points for each face, and save corresponding information to landmakr.txt, e.g. datasets/RaFD/RaFD90/landmark.txt.
  1. Preprocess RaFD dataset.
    > Split RaFD dataset to different dirs based on angle, e.g. RaFD45/image, RaFD90/image, RaFD135/image.
    python3 1-preprocess.py

Unified Landmark Converter

  1. Train ULC model.

    cd src/ULC
    python3 train.py --data RaFD --name RaFD --save_every 10 --every 60 --epochs 200  # for RaFD dataset
  2. Test ULC model.

    cd src/ULC
    python3 test.py --data RaFD --name RaFD --save_every 10 --every 60 --epochs 200 --resume  # for RaFD dataset

Geometry-aware Generator

  1. Train GAG model.

    cd src
    python3 train.py --name RaFD-08-21 --gpu_ids 0 --model landmark_L64_Tri --netG resnet_9blocks_cat --dataset_mode RaFD90L64Tri --batch_size 3  # for RaFD dataset
  2. Test GAG model.

    cd src
    python3 test_image.py --name RaFD-08-21 --gpu_ids 0 --model landmark_L64_Tri --netG resnet_9blocks_cat --dataset_mode RaFD90L64Tri  # for RaFD dataset

Citation

If our work is useful for your research, please consider citing:

@inproceedings{zhang2020freenet,
  title={FReeNet: Multi-Identity Face Reenactment},
  author={Zhang, Jiangning and Zeng, Xianfang and Wang, Mengmeng and Pan, Yusu and Liu, Liang and Liu, Yong and Ding, Yu and Fan, Changjie},
  booktitle={CVPR},
  pages={5326--5335},
  year={2020}
}

Acknowledgements

We thank for the source code from the great work pytorch-CycleGAN-and-pix2pix.

freenet's People

Contributors

zhangzjn avatar

Watchers

James Cloos 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.