Code Monkey home page Code Monkey logo

gan-playground's Introduction

GAN-Playground

Introduction

This is a playground for experimenting with GANs. It is a collection of scripts that make it easy to train GANs for image generation via TensorFlow.

After about 40 min of training (50 epochs // RTX3080) on the CUHK CompCars Dataset, a GAN was be able to generate images that look like this:

img.png

While these are obviously not real cars, you would most likely agree that some of these images are showing cars or something similiar to cars. With additional training or adjustments to the model architecture, it should be performing better. You can adjust the model architecture and hyperparameters in the models.py and configuration.py files.

Installation

To install all relevant libraries, run the following command:

pip install -r requirements.txt

Once you are ready to go, create a raw_data folder at project root level and put the images in there. You can have them placed in subfolders as well and the dataset generator will automatically find them.

Usage

To train a model you can edit configuration.py for your desired settings or leave them as is and run the main script:

python main.py

A number of images will be generated within each epoch and saved to the image_output folder. After the completion of a training, both the generator and the discriminator will be saved to the saved_models folder. You can then use the saved models to generate new images after loading them with tf.keras.models.load_model.

gan-playground's People

Contributors

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