Giter VIP home page Giter VIP logo

gaugan's Introduction

GauGAN - Synthesize Photorealistic Images from Semantic Doodles

Implementation of NVIDIA's generative SPADE network in PyTorch. Based on the original paper of Park et.al.

GauGAN is a generative network with a special normalization method SPADE, the generator takes as input a segmentation mask and a corresponding real image or noise vector in a high dimensional space and synthesize a photorealistic image as output. Depending on the dataset used during training it is capable of multi-modal image synthesis, which means that it can generate images in various different styles using the same input segmentation mask. In my implementation I trained the network on parts of COCO-Stuff dataset for about 160 epochs on my home computer which limit the rendering capabilities of the network. Beside the network I also created an interactive app hosted on streamlit, where you can draw your own doodles and turn them into semi-photorealistic images.

Interactive demo

demo.mov

You can test the demo yourself, note that the generation of images is quite slow without GPU acceleration.

How to:

  1. Select one of the many materials in the panel to the left.
  2. Draw your doodles.
  3. You can move objects by selecting 'transform' under drawing tool.
  4. Images are automatically generated, this can be toggeled on/off by checking 'Update image in realtime'.
  5. Style image is supposed to be used as a multi-modal synthesis but does not work all to well with COCO-Stuff dataset.

Demo: https://engbergandreas-gaugan.streamlit.app/

Sources

  1. Semantic Image Synthesis with Spatially-Adaptive Normalization: https://arxiv.org/pdf/1903.07291.pdf
  2. Official implementation: https://github.com/NVlabs/SPADE
  3. COCO-Stuff dataset: https://github.com/nightrome/cocostuff
  4. Streamlit drawable canvas: https://github.com/andfanilo/streamlit-drawable-canvas
  5. Read full report here: https://github.com/engbergandreas/GauGAN/blob/main/Interactive_AI_canvas_TNM095.pdf

Results

Synthesized result 1 Synthesized result 2 Synthesized result 3 Synthesized result 4 Synthesized result 5 Synthesized result 6

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.