GithubHelp home page GithubHelp logo

callifrey / animefacegeneration Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 111.48 MB

This is a anime faces generation demo based on DCGAN(Deep Convolutional GAN) by Pyrotch.

License: MIT License

Python 100.00%

animefacegeneration's Introduction

AnimeFaceGeneration

Description

This is a anime faces generation demo based on DCGAN(Deep Convolutional GAN), the framework including:

  • Generator: Consist of one linear layer and 4 transpose Conv layers, output [3,64,64]
  • Discriminator: 5 layers strides convolution to output score for input

Notice:

  • Generator and Discriminator use Batch Normalization and ReLU activation function in all Linear / Conv/ Transpose Conv blocks.
  • Use Tanh for last layer of Generator, instead of Sigmoid for Discriminator

Dataset

The datasets of this project is offer by Kaggle, you can download from here

There are 21.6k training images totally, which resolution (64,64)

Training

You can train the model by run:

python train.py

Maybe you need to change some hyper-parameters and data path by modifying config.py

Testing

You can also testing the model by offered pre-trained weight in ./data/out/checkpoints, running:

python test.py

Result

Here are some generate anime faces under different epochs in training:

Epoch 0 Epoch 10
0.png 10_400.png
Epoch 50 Epoch 100
50_400.png 100_400.png
Epoch 200 Epoch 400
50_400.png 400_400.png

Next, the test result for final model(epoch = 400)

50_400.png

Training methodology

  • Using small learning rate for both G and D
  • Using label smooth to introduce random
  • Control the update step rate when you see training procedure become strange

Acknowlegement

Thanks to Google Colab offering free GPU for accelerating computing.

animefacegeneration's People

Contributors

callifrey 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.