Code Monkey home page Code Monkey logo

deep-learning-with-cats's Introduction

Deep-learning-with-cats

This repository is a "toy" project so I can gain experience building deep neural networks. My first goal is generating pictures of cats using Generative Adversarial Networks. My second goal is making art with cats by applying styles to pictures of cats using deep convolutional neural networks. (^._.^)

Update (2018/11/02): See https://github.com/AlexiaJM/RelativisticGAN for a greatly enhanced version of the GAN codes, that incorporate all loss functions into a single file. It also includes additional better relativistic loss functions and many extra features (ex: Spectral normalization, Hinge Loss, Gradient penalty with any GAN loss, generate pictures every X iteration, learning rate decay, etc.). It still works by default to generate cats but it can also do CIFAR-10. **2019/03/02: This contains a even more recent version of the code with even more features: https://github.com/AlexiaJM/relativistic-f-divergences

Objectives

Needed

To run

$ # Download dataset and preprocess cat pictures 
$ # Create two folders, one for cats bigger than 64x64 and one for cats bigger than 128x128
$ sh setting_up_script.sh
$ # Move to your favorite place
$ mv cats_bigger_than_64x64 "your_input_folder_64x64"
$ mv cats_bigger_than_128x128 "your_input_folder_128x128"
$ # Generate 64x64 cats using DCGAN
$ python DCGAN.py --input_folder "your_input_folder_64x64" --output_folder "your_output_folder"
$ # Generate 128x128 cats using DCGAN
$ python DCGAN.py --input_folder="your_input_folder_128x128" --image_size 128 --G_h_size 64 --D_h_size 64 --SELU True
$ # Generate 64x64 cats using WGAN
$ python WGAN.py --input_folder "your_input_folder_64x64" --output_folder "your_output_folder"
$ # Generate 64x64 cats using WGAN-GP
$ python WGAN-GP.py --input_folder "your_input_folder_64x64" --output_folder "your_output_folder" --SELU True
$ # Generate 64x64 cats using LSGAN (Least Squares GAN)
$ python LSGAN.py --input_folder "your_input_folder_64x64" --output_folder "your_output_folder"

To see TensorBoard plots of the losses

$ tensorboard --logdir "your_input_folder"

Results

Discussion of the results at https://ajolicoeur.wordpress.com/cats.

DCGAN 64x64

DCGAN 128x128 with SELU

WGAN 64x64

WGAN-GP 64x64 with SELU

Fast style transfer

deep-learning-with-cats's People

Contributors

alexiajm avatar shaform avatar

Watchers

James Cloos avatar Tanguy ⧓ Herrmann 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.