nawapans / Renderman

Generative adversarial network is used to train neural network model to create real image from drawing. Pix2pix tensor flow code is refereed and paint tool is created to interpret trained model results

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pix2Pix-tensorflow

Tensorflow Link https://www.tensorflow.org/tutorials/generative/pix2pix

Alt Text

Alt text

How to use it

  1. Download images which you want to train and store them in "./Database_Name/base".
    In this case I have trained this model using with 40 modern house images. Sample image :
    Alt Text
  2. run "image_sidebyside.py" which will save images side by side in "./Database_Name/train" folder.
  3. open every images in "./Database_Name/train" folder in windows paint and apply color to each object e.g. window:red trees:green etc you can add your own colors in paint tool

PaintToolObj=PaintTool() PaintToolObj.AddButton("Walls","#FFFFFF") PaintToolObj.AddButton("Window","#FF1C24")

Alt Text

4 run pngtojpg to convert images in "./Database_Name/train" folder from .png to .jpg format.
5 take some images and store them in ""./Database_Name/test" folder to track progress.
6 run pixtopix.py(one iteration took 30 sec with GPU)

Alt Text

5 each iterations result is stored in "./output/frame" folder.
6 after 400-500 epoches open interactive tool and test your model. (To open tool set Open_Interactive_Tool=True in pixtopix.py)
Input:
Alt Text
Result:
Alt Text

About

Generative adversarial network is used to train neural network model to create real image from drawing. Pix2pix tensor flow code is refereed and paint tool is created to interpret trained model results

License:GNU General Public License v3.0


Languages

Language:Jupyter Notebook 99.8%Language:Python 0.2%