Giter Club home page Giter Club logo

eyescream's Introduction

The Eyescream Project

Generating Natural Images using Neural Networks.

For our research summary on this work, please read the Arxiv paper: http://arxiv.org/abs/1506.05751

For a high-level blog post with a live demo, please go to this website: http://soumith.ch/eyescream

This repository contains the code to train neural networks and reproduce our results from scratch.

Requirements

Eyescream requires or works with

  • Mac OS X or Linux
  • NVIDIA GPU with compute capability of 3.5 or above.

Installing Dependencies

  • Install Torch
  • Install the nngraph and tds packages:
luarocks install tds
luarocks install nngraph

Training your neural networks

  • If you want to train the CIFAR-10 image generators, read the README in the cifar/ folder
  • If you want to train the LSUN/Imagenet image generators, read the README in the lsun/ folder

Discuss the paper/code at

  • groups.google.com/forum/#!forum/torch7

See the CONTRIBUTING file for how to help out.

License

Eyescream is BSD-licensed. We also provide an additional patent grant.

eyescream's People

Contributors

aleju avatar dribnet avatar soumith 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  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

eyescream's Issues

Displaying the images

Hi,

For this demo code
"disp.image(...)" doesn't work for qlua/th
"image.display(...)" works for qlua

SpatialConvolutionUpsample behaviour

I was expecting the SpatialConvolutionUpsample class to do the expected "upsampling" but it seems like this class is doing something else. Here is one example:

conv = nn.SpatialConvolutionUpsample(1,1,1,1,3)
w, dw = conv:parameters()
w[1]:fill(1)
w[2]:zero()

This creates an upsampling module that upsamples the input image by a factor of 3, the convolution is 1x1 with weight 1 and bias 0 so it just copies the input.

I tried this on a 1x1x2x2 input tensor:

x = torch.range(1,4):resize(1,1,2,2)
y = conv:forward(x)

and here is the result:

th> x
(1,1,.,.) = 
  1  2
  3  4
[torch.DoubleTensor of size 1x1x2x2]

th> y
(1,1,.,.) = 
  1  2  3  4  1  2
  3  4  1  2  3  4
  1  2  3  4  1  2
  3  4  1  2  3  4
  1  2  3  4  1  2
  3  4  1  2  3  4
[torch.DoubleTensor of size 1x1x6x6]

However I was actually expecting y to be like this (which I think is the more standard "upsampling"):

1 1 1 2 2 2
1 1 1 2 2 2
1 1 1 2 2 2
3 3 3 4 4 4
3 3 3 4 4 4
3 3 3 4 4 4

The problem is, in the current SpatialConvolutionUpsample class, the new views created after computing the results do not play very well with element ordering. I wonder if this is the intended behaviour?

How to generate images using the checkpointed gpu model

Hi,

How should we generate images using our trained model.
I am trying to generate images from a checkpoint state and I'm trying to use https://github.com/soumith/dcgan.torch/blob/master/generate.lua to generate images.
When I tried to convert the cuda tensor to a cpu-readable tensor using https://github.com/karpathy/neuraltalk2/blob/master/convert_checkpoint_gpu_to_cpu.lua , I get the following error:

/share/apps/torch/20160623/gnu/bin/luajit: convert_checkpoint_gpu_to_cpu.lua:79: bad argument #1 to 'pairs' (table expected, got nil)

Is there an easy way to generate images from the checkpointed model?

Bad results for train_cifar.lua

Running scripts/train_cifar.lua with default parameters generates the attached images at different epochs (I changed the checkpoint-saving part to append the epoch number). What may be wrong?

Here is the code I used for generation:

l = torch.load("adversarial-" .. e .. ".net")
i = torch.CudaTensor(42, 100):uniform(-1,1)
l.G:cuda()
l.G:evaluate()
o = l.G:forward(i)
img = image.toDisplayTensor(o)
image.save("gen-" .. e .. ".png", img)

10
gen-10
20
gen-20
30
gen-30
40
gen-40
50
gen-50
60
gen-60
70
gen-70
80
gen-80
90
gen-90
100
gen-100
110
gen-110

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.