Code Monkey home page Code Monkey logo

aging_stargan's Introduction

Aging-StarGAN

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=sharing

Abstract: 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.

Dependencies

  • To download the required dependencies:
conda create -n face_aging python=3.6
activate face_aging
pip install -r requirements.txt

Downloading datasets

To download the CACD dataset, visit here.

To download the UTKFace dataset, visithere.

Training networks

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

Using pre-trained networks

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

Addtional Results (Figures)

Network

Triplet Loss with dynamic margin

Qualitative Evaluation - (1) Results

Qualitative Evaluation - (2) Ablation Study

Qualitative Evaluation - (2) Mask Activation

Quantitative Evaluation - Age Seperation

Acknowledgements

This repository is implemented based on StarGAN Official Repository

aging_stargan's People

Contributors

han-oqo avatar yunjey avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.