Skip to content
forked from HRLTY/TP-GAN

Official TP-GAN Tensorflow implementation for paper "Beyond Face Rotation: Global and Local Perception GAN for Photorealistic and Identity Preserving Frontal View Synthesis"

License

Notifications You must be signed in to change notification settings

PT123123/TP-GAN

 
 

Repository files navigation

TP-GAN

data中5pt文件为人脸关键点部位,用mtcnn模型识别,五行分别是左右眼嘴鼻的x和y坐标,代码能在tensorflow0.12版本下跑,不想修改兼容其他版本了
mtcnn的模型不能在tf0.12下跑,用5pt文件做下中转
没用到face_db_align_single_custom.m
tensorflow0.12要求CUDA版本Cuda 8.0 and CudNN 5.1?

使用镜像运行

sudo nvidia-docker pull nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04能跑通
拉取镜像后需要:
1.apt-get update后apt-get install python3-dev python3-pip vim
2.再pip3 install tensorflow-gpu==0.12 scipy pillow
3.下载代码,放数据集后修改下路径 4.修改TP_GAN-Mar6FS_0.12.py里面的参数后运行此文件

测试单张图片

1.放好图片,修改mtcnn.py里的文件参数后运行,生成.5pt文件
2.修改test_pt.py后运行,输出结果到本文件夹

记得修改下identical output的数目
uitils.py里的scipy.misc的imread和imsave用imageio的imread和imwrite代替(较新版本的scipy.misc去除了这两个功能)

About

Official TP-GAN Tensorflow implementation for paper "Beyond Face Rotation: Global and Local Perception GAN for Photorealistic and Identity Preserving Frontal View Synthesis"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 97.1%
  • MATLAB 2.9%