• Stars
    star
    347
  • Rank 121,778 (Top 3 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 7 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

GAN Playground - Experiment with Generative Adversarial Nets in your browser. An introduction to GANs.

Welcome to GAN Playground

Demo website: https://reiinakano.github.io/gan-playground

demo_screen

FAQ

What is this about?

GAN Playground lets you play around with Generative Adversarial Networks right in your browser. Currently, it contains three built-in datasets: MNIST, Fashion MNIST, and CIFAR-10.

GAN Playground provides you the ability to set your models' hyperparameters and build up your discriminator and generator layer-by-layer. You can observe the network learn in real time as the generator produces more and more realistic images, or more likely, gets stuck in failure modes such as mode collapse.

What are Generative Adversarial Networks?

From Wikipedia, "Generative Adversarial Networks, or GANs, are a class of artifical intelligence algorithms used in unsupervised machine learning, implemented by a system of two neural networks contesting with each other in a zero-sum game framework. They were introduced by Ian Goodfellow et al. in 2014."

In my own words, GANs are composed of two neural networks, each one trying to outcompete the other. The discriminator tries to figure out whether a given image is real or synthetically generated by the other neural network. The generator attempts to output images that are indistinguishable from real ones in an attempt to fool the discriminator. The hope is that the generator learns enough to create realistic images that can fool humans. If you want more information, there are tons of great resources on the internet that give a good introduction to GANs. Here's the original paper on GANs.

Why did you make this?

My hope is that this project gives beginners a bit of exposure in training GANs with as little setup as possible. The easiest way to do this is through the browser, and with deeplearn.JS, it's now finally possible. In fact, when I started this project, I didn't have any experience with GANs, and my target audience was myself!

How long should I wait / what's the best set of parameters to see realistic images?

To be honest, I'm not sure. GANs are notoriously hard to train, and even I haven't found the right set of parameters and layers for this demo that'd produce very realistic images. It's either that or I haven't waited long enough for it to train... Either way, if you do find a good set of parameters and layers, please file an issue or submit a pull request, and I'll add it to this demo.

This looks like the deeplearn.JS Model Builder demo.

Yup, this is pretty much deeplearn.JS's Model Builder demo repurposed for training GANs! I just ripped out the parts I didn't need and replaced it with the parts I do need.

Development

To run this locally, clone the project and prepare the development environment:

$ git clone https://github.com/reiinakano/gan-playground.git
$ cd gan-playground
$ npm install && bower install # Install node modules and bower components

To interactively develop the application

$ ./scripts/watch-demo src/gan-playground.ts
>> Waiting for initial compile...
>> 1023189 bytes written to src/bundle.js (0.71 seconds) at 2:20:06 AM
>> Starting up http-server, serving ./
>> Available on:
>>   http://127.0.0.1:8080
>> Hit CTRL-C to stop the server

More Repositories

1

scikit-plot

An intuitive library to add plotting functionality to scikit-learn objects.
Python
2,401
star
2

fast-style-transfer-deeplearnjs

Demo of in-browser Fast Neural Style Transfer with deeplearn.js library
TypeScript
1,352
star
3

xcessiv

A web-based application for quick, scalable, and automated hyperparameter tuning and stacked ensembling in Python.
Python
1,266
star
4

arbitrary-image-stylization-tfjs

Arbitrary style transfer using TensorFlow.js
JavaScript
1,184
star
5

neural-painters

Jupyter Notebook
262
star
6

neural-painters-pytorch

PyTorch library for "Neural Painters: A learned differentiable constraint for generating brushstroke paintings"
Jupyter Notebook
139
star
7

invariant-risk-minimization

Implementation of Invariant Risk Minimization https://arxiv.org/abs/1907.02893
Jupyter Notebook
84
star
8

tfjs-lstm-text-generation

Generate your own Nietschze quote using TensorFlow.js
JavaScript
15
star
9

tfjs-rock-paper-scissors

Play Rock Paper Scissors with your webcam using TensorFlow.js
JavaScript
14
star
10

adversarially-robust-neural-style-transfer

Jupyter Notebook
8
star
11

gnuradio-go

Python
6
star
12

tfjs-autoencoder

A denoising autoencoder written in TensorFlow.js
HTML
6
star
13

pix2pix-runway

Python
5
star
14

my-resume

Here be my resume.
5
star
15

wifisniffer

Automatically decrypts and displays WiFi packets captured from the air. This is unfinished and no longer maintained.
Python
3
star
16

post--robust-neural-style

JavaScript
1
star
17

msk-cancer

Repository for storing some of my notebooks for Kaggle's competition https://www.kaggle.com/c/msk-redefining-cancer-treatment/
Jupyter Notebook
1
star
18

KDD-2010-mini-project

Just a messy filedump of all my ipython notebooks for "competing" in the KDD 2010 Cup Challenge
Jupyter Notebook
1
star
19

personal_exercises

Short scripts I write for practicing software engineering interviews
Python
1
star