Hongyu Yang, Di Huang, Yunhong Wang, and Anil K. Jain
The two underlying requirements of face age progression, i.e. aging accuracy and identity permanence, are not well studied in the literature. In this paper, we present a novel generative adversarial network based approach. It separately models the constraints for the intrinsic subject-specific characteristics and the age-specific facial changes with respect to the elapsed time, ensuring that the generated faces present desired aging effects while simultaneously keeping personalized properties stable. Further, to generate more lifelike facial details, high-level age-specific features conveyed by the synthesized face are estimated by a pyramidal adversarial discriminator at multiple scales, which simulates the aging effects in a finer manner. The proposed method is applicable to diverse face samples in the presence of variations in pose, expression, makeup, etc., and remarkably vivid aging effects are achieved. Both visual fidelity and quantitative evaluations show that the approach advances the state-of-the-art. For more details, please refer to our CVPR paper.
In this repository we provide the pretrained aging models and the code for running the models on new face images.
The code is implemented in Torch7.
First install Torch, then install the following packages:
luarocks install torch
luarocks install nn
luarocks install image
luarocks install lua-cjson
If you use an NVIDIA GPU, you can accelerate the operations with CUDA.
First install CUDA, then install the following packages:
luarocks install cutorch
luarocks install cunn
You can use cuDNN to accelerate convolutions.
First download cuDNN and copy the
libraries to /usr/local/cuda/lib64/
. Then install the Torch bindings for cuDNN:
luarocks install cudnn
Download the pretrained models to the folder models/
.
The script make_aging_dataset.py
lets you generate an hdf5 file of face images:
python scripts/make_aging_dataset.py \
--val_x_dir data/CACD/input \
--val_image_list_x data/CACD/image_list_cacd.txt \
--output_file data/CACD/CACD_test.h5/
The script test_aging.lua
lets you use a trained model to age the faces:
th test_aging.lua \
-model models/CACD_Aging.t7 \
-h5_file data/CACD/CACD_test.h5 \
-output_dir data/CACD/output
/
By default this script runs on GPU. The CUDA version may affect the calculation results. We use cuda 8.0.
If you find this code useful for your research, please cite
@inproceedings{Yang2018FaceAgeProgression,
title={Learning Face Age Progression: A Pyramid Architecture of GANs},
author={Yang, Hongyu, and Huang, Di and Wang, Yunhong and Anil K. Jain},
booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
year={2018}
}