项目作者: seasonyc
项目描述 :
A VAE for CelebA
高级语言: Python
项目地址: git://github.com/seasonyc/face_vae.git
A VAE for face translation
This VAE uses face-recognize network output as its perceptual Loss instead of the pixel reconstruction loss, the result examples are in pictures directory.
Usage:
- Clone this repo, the code is based on tensorflow 1.12.0 and tensorflow.keras 2.1.6-tf, InstanceNormalization.py is a workaround because keras 2.1.6-tf doesn’t include keras-contrib InstanceNormalization.
- Download CelebA dataset and put the files into CelebA folder.
- Download facenet keras model and put into model folder.
- Run face_vae.py to train the vae
- Use vae_attribute_manipulate.py to compute attribute vector and translate the portrait.