GithubHelp home page GithubHelp logo

anjaeju / pixelrnn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from philkuz/pixelrnn

1.0 0.0 0.0 81 KB

Accompanying repo for the O'Reilly Article, `Using Tensorflow to Generate Images with PixelRNNs`

Home Page: https://www.oreilly.com/ideas/using-tensorflow-to-generate-images-with-pixelrnns

Python 59.65% Jupyter Notebook 40.35%

pixelrnn's Introduction

Using TensorFlow to Generate Images with PixelRNNs

This repo hosts the code associated with the O'Reilly article, "Using Tensorflow to Generate Images with PixelRNNs: How to generate novel images using neural networks".

In this article, we walk through creating a generative model to produce realistic-looking images using recurrent neural networks in Tensorflow. Specifically, we use a PixelRNN architecture trained on MNIST to generate images that look like handwritten digits.

Requirements

In order to run this notebook, you will need to install TensorFlow v1.0, Jupyter, and NumPy.

The notebook also uses TQDM to display nice progress bars during training.

There are two easy ways to install these libraries and their dependencies:

Option A: use the provided Dockerfile configured for this notebook

  1. Download and unzip this entire repo from GitHub, either interactively, or by entering

    git clone https://github.com/philkuz/PixelRNN.git
  2. Open your terminal and use cd to navigate into the top directory of the repo on your machine

  3. To build the Dockerfile, enter

    docker build -t pixelrnn_dockerfile .

    If you get a permissions error on running this command, you may need to run it with sudo:

    sudo docker build -t pixelrnn_dockerfile .
  4. Run Docker from the Dockerfile you've just built

    docker run -it -p 8888:8888 -p 6006:6006 pixelrnn_dockerfile bash

    or

    sudo docker run -it -p 8888:8888 -p 6006:6006 pixelrnn_dockerfile bash

    if you run into permission problems.

  5. Launch Jupyter by entering

    jupyter notebook

    and, using your browser, navigate to the URL shown in the terminal output (usually http://localhost:8888/)

Option B: install Anaconda Python, TensorFlow, and TQDM manually

NumPy can be tricky to install manually, so we recommend using the managed Anaconda Python distribution, which includes NumPy, Matplotlib, and Jupyter in a single installation. The Docker-based method above is much easier, but if you have a compatible NVIDIA GPU, manual installation makes it possible to use GPU acceleration to speed up training.

  1. Follow the installation instructions for Anaconda Python. We recommend using Python 3.6.

  2. Follow the platform-specific TensorFlow installation instructions. Be sure to follow the "Installing with Anaconda" process, and create a Conda environment named tensorflow.

  3. If you aren't still inside your Conda TensorFlow environment, enter it by typing

    source activate tensorflow
  4. Install TQDM by entering

    pip install tqdm
  5. Download and unzip this entire repo from GitHub, either interactively, or by entering

    git clone https://github.com/philkuz/PixelRNN.git
  6. Use cd to navigate into the top directory of the repo on your machine

  7. Launch Jupyter by entering

    jupyter notebook

    and, using your browser, navigate to the URL shown in the terminal output (usually http://localhost:8888/)

pixelrnn's People

Contributors

jonbruner avatar noahgolmant avatar philkuz avatar

Stargazers

 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.