Skip to content

sephwalker321/PokeGAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PokeGAN


Pokemon-GAN

Table of Contents
  1. About The Module
  2. Getting Started
  3. Usage
  4. Examples
  5. Future
  6. License
  7. Contact

About The Project

Python module containing custom classes of neutral network architectures for generating artificial pokemon sprites.

Built With

The module was constructed using the following libraries,

and the following data resources,

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites and Installation

This is an example of how to list things you need to use the software and how to install them.

  1. Clone the repo,

    git clone https://github.com/sephwalker321/PokeGAN
    
  2. Install the requiremnts

pip install -m requirements.txt
  1. Install the module
pip install -e .

Usage

Jupyter Notebooks are provided for the demonstration of the training proceedure.

  1. Notebooks/train.ipynb load in data and train the GAN

User can add their own training images in data/sprites. Many default parameters of the module can be altered in pokegan/config.yaml

Examples

In the notebook example we introduce a set of simple on-the-fly image augmentations to effectively increase the dataset size or reduce its complexity.

  1. Alpha mask filter (4xHxW -> 3xHxW)

  2. Random rotations

  3. Random horizontal flipping

  4. Resize to 3x32x32 Images

  5. Image normalisation

This yeilds an example batch,

Now we create the GAN. We create the generator and discrimator and wrap them into a custom GAN class and begin the training. We feed the generator with a noisy vector input which we can represent graphically,

The generator transforms this random noise into a new pokemon sprite which attempts to deceive the discriminator. Over time the generator compares the training images and the artifical images to trys to classify them. Over time they both improve. Here are some example generated images over time for 10, 50, 100 and 500 epochs.

Over the training time we can plot the losses of the two networks,

Lastly, lets see how the discriminator performs by comparing a heatmap of the discriminator scores against some example fake and real images,

Future

  1. Take the epoch plots to create a video of the training proceedure
  2. Study the latent space representation of the noise
  3. Can we add a further input for the pokemon types to enhance the GAN?

License

Distributed under the MIT License. See LICENSE for more information.

Contact

For any issues or questions contact Joseph Walker

Project Link: https://github.com/sephwalker321/PokeGAN](https://github.com/sephwalker321/PokeGAN)

About

Pytorch GAN for generating pokemon sprites

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published