This repository provides the PyTorch implementation of Aging-StarGAN which is a novel framework for face-aging task.
Aging-StarGAN: Age Translation Between Age Groups with Unified Generative Adversarial Network
Hankyu Jang
DEAL LAB, KAIST
Paper: https://drive.google.com/file/d/13rt_fMW80rMKNGTpU2uNdkfEe0t_XbcZ/view?usp=sharingAbstract: Recent studies of face aging require two or more generators to translate to multiple ages, or otherwise, there is a limitation that cannot generate age patterns except wrinkle. To address this limitation, we propose Aging-StarGAN, which is a novel framework that can perform age group translation among multiple age groups with only a single generator. Also, It uses spatial attention mechanism and triplet loss with dynamic margin to achieve identity presevation, ghosting artifacts removal and to capture aging pattern more than wrinkles. We perfomed experiments that demonstrate the efficiency and superiority of Aging- StarGAN.
- To download the required dependencies:
conda create -n face_aging python=3.6
activate face_aging
pip install -r requirements.txt
To download the CACD dataset, visit here.
To download the UTKFace dataset, visithere.
To train Aging-StarGAN, run the training script below.
# Train Aging-StarGAN using the CelebA dataset
python main.py --mode train --dataset CACD --image_size 128 --c_dim 4 \
--sample_dir aging_stargan/samples --log_dir aging_stargan/logs \
--model_save_dir aging_stargan/models --result_dir aging_stargan/results \
--age_group 4 --age_group_mode 2 --attention True --additional_dataset True
# Test Aging-StarGAN using the CelebA dataset
python main.py --mode train --dataset CACD --image_size 128 --c_dim 4 \
--sample_dir aging_stargan/samples --log_dir aging_stargan/logs \
--model_save_dir aging_stargan/models --result_dir aging_stargan/results \
--age_group 4 --age_group_mode 2 --attention True --additional_dataset True \
--test_version 1
To download a pre-trained model checkpoint, visit here. After download the pre-trained model checkpoint and save it into your model_save_dir
To translate images using the pre-trained model, run the evaluation script below. The translated images will be saved into result_dir
$ python main.py --mode train --dataset CACD --image_size 128 --c_dim 4 \
--sample_dir aging_stargan/samples --log_dir aging_stargan/logs \
--model_save_dir aging_stargan/models --result_dir aging_stargan/results \
--age_group 4 --age_group_mode 2 --attention True --additional_dataset True \
--test_version 1
Network
Triplet Loss with dynamic margin
Qualitative Evaluation - (1) Results
Qualitative Evaluation - (2) Ablation Study
Qualitative Evaluation - (2) Mask Activation
Quantitative Evaluation - Age Seperation
This repository is implemented based on StarGAN Official Repository