# How to generate image using deep learning

There are lots of examples of classifier using deep learning techniques with CIFAR-10 datasets. The way it works is that, train thousands of images of cat, dog, plane etc and then classify an image as dog, plane or cat. But I want to do the reverse thing. I want to train dog, cat, planes and it should output images. Here is my idea

1. Group similar/clear images of cat as value 1, a less similar/blur images as 1.1 and so on. Similarly, group similar images of dog as value 2 and less similar images as 2.1 and so on ... Do the same for all types of images.

Generated dataset should look like this

input    output
1      pixels(24*24) of a cat images(clear)
1      pixels(24*24) of a cat images(clear)
.
.
1.1      pixels(24*24) of another cat images(blur)
1.1      pixels(24*24) of another cat images(blur)
.
.
and so on

1. Now train values of input and label of images as output. Input will be just 1 dimensional, may be I will think of some other data. Output layer will have 24*24 i.e 576 units or neurons.
2. At the end of training, I want something like this, if I give a input for example 1.15 it should output a new image since we trained with values 1.1 and 1.2 but we didn't train with 1.11 or 1.115.

Please give me some idea how can I do this? Any link to example or papers would be nice.

• Your plan is likely to output a single (averaged) cat-like image that becomes more blurry as you increase the input value. I.e. in your example the input 1.15 would not produce a "random" novel image, but some interpolation between the mean cat blur in the 1.1 images and the mean cat blur in the 1.2 images. Is that the intent? If you prefer to see something more creative, then yes there are many papers on generative networks. You could look into Variational Autoencoders and Generative Adversarial Networks as a start. – Neil Slater Jul 19 '17 at 12:03
• Could you refer to some papers/examples related to Generative Adversarial Networks or Variational Autoencoders for start which is easy to start with? – asdfkjasdfjk Jul 19 '17 at 12:09
• VAEs are easiest to understand and work with. Try this blog kvfrans.com/variational-autoencoders-explained as an intro, it links example code. Other than that, do a web search for either term (or short form VAE, GAN), you will get 100s of hits, and most of them will be useful – Neil Slater Jul 19 '17 at 12:30