• Stars
    star
    791
  • Rank 57,155 (Top 2 %)
  • Language
    Jupyter Notebook
  • Created over 5 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generative adversarial networks integrating modules from FUNIT and SPADE for face-swapping.

Few-shot face translation Source face: Mona Lisa

A GAN based approach for one model to swap them all.

The table below shows our priliminary face-swapping results requiring one source face and <=5 target face photos. Notice that almost all of the identities, except Stephen Curry, are not in our training data (which is a subset of VGGFace2). More translation results can be found here.

Also, our model is capable of producing faces that has its gaze direction, glasses, and hiar occlusions being consistent with given source face. However, our model has suboptimal performance in terms of translating to asian faces. This is possibly due to limited representability of the feature extractor.

Src.\Tar. Andrej Karpathy Andrew Y. Ng Du Fu Elon Musk Emilia Clarke Geoffrey Hinton Stephen Curry Yann Lecun Yoshua Benjio
Andrej
Karpathy
N/A
Andrew
Y. Ng
N/A
Du Fu N/A
Elon
Musk
N/A
Emilia
Clarke
N/A
Geoffrey
Hinton
N/A
Stephen
Curry
N/A
Yann
Lecun
N/A
Yoshua
Benjio
N/A

I really like the Du Fu translation: such an interesting demostration how the GAN imagine the appearance of the prominent Chinese poet from just a painting.

Try in Google Colab

  • master branch (Jun. 2019) Open In Colab
  • dev branch (Oct. 2019) Open In Colab
We only provide pre-trained weights and inference script for now. Training script will be released after code cleanup.

Architecture

The above image illustrates our generator, which is a encoder-decoder based network, at test phase. Our swap-them-all approach is basically a GAN conditioned on the latent embeddings extracted from a pre-trained face recognition model. SPADE and AdaIN modules are incorporated in order to inject semantic priors to the networks.

During training phase, the input face A is heavily blurred and we train the model with resonctruction loss. Other objectives that aimed to improve translation performance while keeping semantic consistency, such as perceptual loss on rgb output and cosine similarity loss on latent embeddings, are also introduced.

Things that didn't work

  1. We tried to distort (spline warp, downsample) the input image as in faceswap-GAN instead of masking it. However, the model did not learn proper identity translation but output face that is similar to its input.

Requirements

  • Python 3.6
  • Keras 2.2.4
  • TensorFlow 1.12.0 or 1.13.1

References

  1. Semantic Image Synthesis with Spatially-Adaptive Normalization
  2. Few-Shot Unsupervised Image-to-Image Translation
  3. DEEP LEARNING FOR FASHION AND FORENSICS

More Repositories

1

faceswap-GAN

A denoising autoencoder + adversarial losses and attention mechanisms for face swapping.
Jupyter Notebook
3,324
star
2

face_toolbox_keras

A collection of deep learning frameworks ported to Keras for face analysis.
Jupyter Notebook
273
star
3

deeplearning.ai-Convolutional-Neural-Networks

Completed assignment jupyter notebook of Foundations of Convolutional Neural Networks, deeplearning.ai coursera course
Jupyter Notebook
116
star
4

AdamW-and-SGDW

keras implementation of AdamW from Fixing Weight Decay Regularization in Adam (https://arxiv.org/abs/1711.05101)
Jupyter Notebook
71
star
5

MUNIT-keras

A keras (tensorflow) reimplementation of MUNIT: Multimodal Unsupervised Image-to-Image Translation https://arxiv.org/abs/1804.04732
Jupyter Notebook
68
star
6

face-segmentation-keras

A port of YuvalNirkin/face_segmentation repo to keras.
Jupyter Notebook
61
star
7

Conditional-Analogy-GAN-keras

keras implementation of CAGAN and its variants. The Conditional Analogy GAN: Swapping Fashion Articles on People Images
Jupyter Notebook
60
star
8

Audio2Guitarist-GAN

Two-stage GANs that generate fingerstyle guitarist images from audio.
59
star
9

GazeML-keras

A keras port of swook/GazeML for pupil, iris and eye-lid detection
Jupyter Notebook
55
star
10

Udacity-SDCND-Vehicle-Detection

Jupyter Notebook
29
star
11

dogs-vs-cats-redux

Dogs vs. Cats Redux on floydhub
Jupyter Notebook
27
star
12

GroupNormalization-keras

keras implementation of group normalization. https://arxiv.org/abs/1803.08494
Jupyter Notebook
18
star
13

experiment-with-res2net

Experiment with Res2Net. https://arxiv.org/abs/1904.01169
Python
14
star
14

mppi_cbf

Colab notebooks showcasing experiments on MPPI (model predictive path integral control) and CBF (control barrier function). Utilizes jax to accelerate computation.
Jupyter Notebook
14
star
15

COVID-19-SINDY

Use SINDY algorithm to discover a dynamical system from coronavirus data
Jupyter Notebook
13
star
16

expriment-with-focal-loss

Jupyter Notebook
12
star
17

awesome-control-engineering-online-materials

A collection of free online materials for control engineering
12
star
18

CBF_QP_safety_filter

Control barrier function as safety filter
Python
6
star
19

miscellaneous-experiments

Experiment with mixup/powerSign/AdamW/swish, etc.
Jupyter Notebook
5
star
20

TextSummarizer

Python
3
star
21

experiment-with-swish

Experiment with Swish : A Self-Gated Activation Function on Fashion MNIST
Jupyter Notebook
2
star
22

fasttext_model

Python
1
star
23

selu-experiment

Toy experiment on scaled exponential linear units
Jupyter Notebook
1
star