Skip to content
项目

关于

A deep learning model to age faces in the wild, currently runs at 60+ fps on GPUs

人工智能与机器学习

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Fast-AgingGAN

This repository holds code for a face aging deep learning model. It is based on the CycleGAN, where we translate young faces to old and vice versa.

Samples

Top row is input image, bottom row is aged output from the GAN. Sample Second-Sample

Timing

The model executes at 66fps on a GTX1080 with an image size of 512x512. Because of the way it is trained, a face detection pipeline is not needed. As long as the image of spatial dims 512x512 contains a face of size 256x256, this will work fine.

Demo

To try out the pretrained model on your images, use the following command:

python infer.py --image_dir 'path/to/your/image/directory'

Training

To train your own model on CACD or UTK faces datasets, you can use the provided preprocessing scripts in the preprocessing directory to prepare the dataset. If you are going to use CACD, use the following command:

python preprocessing/preprocess_cacd.py --image_dir '/path/to/cacd/images' --metadata '/path/to/the/cacd/metadata/file' --output_dir 'path/to/save/processed/data'

If using UTK faces, use the following:

python preprocessing/preprocess_utk.py --data_dir '/path/to/cacd/images' --output_dir 'path/to/save/processed/data'

Once the dataset is processed, you should go into configs/aging_gan.yaml and modify the paths to point to the processed dataset you just created. Change any other hyperparameters if you wish, then run training with:

python main.py

Tensorboard

While training is running, you can observe the losses and the gan generated images in tensorboard, just point it to the 'lightning_logs' directory like so:

tensorboard --logdir=lightning_logs --bind_all

探索相关项目

加载中…