GithubHelp home page GithubHelp logo

jahnavigundakaram / fast-aginggan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hasnainraz/fast-aginggan

0.0 0.0 0.0 10.15 MB

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

Python 100.00%

fast-aginggan's Introduction

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

fast-aginggan's People

Contributors

hasnainraz avatar alexriedel1 avatar dt1000101 avatar rudransh2004 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.