Giter Site home page Giter Site logo

pixelcnn's Introduction

Generating images pixel by pixel

Theano implementation of pixelCNN architecture

This repository contains code for training an image generator using a slight variant of the pixelCNN architecture as described in Conditional Image Generation with PixelCNN Decoders

Most of the code is in core theano. 'keras' has been used for loading data. Optimizer implementation from 'lasagne' has been used.

Dependencies:

theano

lasagne

keras

You can use experiments.sh to train the model and install_dependencies.sh to install the dependencies.

Notes on results:

  1. Images with 2-bit depth has been considered for training as well as generation e.g. every pixel is quantized into four levels and then used for training. Four-way softmax has been used to predict pixel quantization.

  2. Following is the result after 60 epochs of training which got completed in about 10 hrs on K6000 Gpu. No hyper parameter search has been performed.

Generated images

Generated images

Training images

Training images

Salient features: No blind spots, efficient implemenattion of vertical stacks and horizontal stacks, residual connections and good generation results :D

For any comments/feedback, feel free to email me at [email protected] or open an issue here.

TODO: Implement gated activation and conditional generation.

If you have GPU resources, feel free to train on CIFAR10. I have provided training script for that. Let me know how it goes. Also, one can train with 256-way softmax and perform hyperparameter search on MNIST dataset.

pixelcnn's People

Contributors

kundan2510 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pixelcnn's Issues

Error when running the cifar10_gen script

Hi,
I was trying to benchmark the results of PixelCNN on CIFAR10 and I when I ran the script, I landed into this error. I am using Theano 0.9.0 and Lasagne 0.2.dev. I would be glad if you could help me with this error, or share the results of the CIFAR10(the weights and generated images).

Thanks,
Ramana

Problem about training the model

Thanks for your sharing about the implementation of this model.
However, when I try to train the model ("mnist_gen.py"), it will stop at the line "valid_fn = theano.function([X, X_r], cost)" and no response.
Do you know the problem?
Thank you!

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.