Spacegan
A GAN based app that generates space images given a drawing of color segments. This project was inspired by NVIDIA gaugan.
Install / Use
/learn @TheSun00000/SpaceganREADME
SpaceGAN:
$ f(x) = \underset{C}{\operatorname{argmax}} P(C_{i} | x) \:\ = \underset{C}{\operatorname{argmax}} {P(Cooks | x), P(Orders | x)} \:\ $
SpaceGAN is a deep learning model that generates space images based on a sketch. It is inspired from the paper: Semantic Image Synthesis with Spatially-Adaptive Normalization [arxiv]
Examples:
| Sketch | Generated image | |--|--| |<img src="images/test1_input.png" style="display: inline-block; margin: 0 auto; max-width: 150px"> |<img src="images/test1_output.png" style="display: inline-block; margin: 0 auto; max-width: 150px">|
| Sketch | Generated image | |--|--| |<img src="images/test2_input.png" style="display: inline-block; margin: 0 auto; max-width: 150px"> |<img src="images/test2_output.png" style="display: inline-block; margin: 0 auto; max-width: 150px">|
Demo:
- Start by cloning the this repository:
git clone https://github.com/TheSun00000/spacegan - Download the generator model
generator230.ptfrom here. - Put the downloaded model in the inference folder.
- Run
inference/main.py:
python inference/main.py - You would be able to see a small graphical interface like this <img src="images/gui.png" style="display: inline-block; margin: 0 auto; max-width: 600px">
- Select a color, select a pen size, and start sketching your galaxies: <img src="images/input_empty.png" style="display: inline-block; margin: 0 auto; max-width: 600px">
- Once finished, click on the button "Done": <img src="images/input_output.png" style="display: inline-block; margin: 0 auto; max-width: 600px">
