Giter Club home page Giter Club logo

gaugan2-renderer's Introduction

gaugan2-renderer

Create videos with gaugan2

The gaugan2-renderer is a Python script that automatically uploads an image sequence to http://gaugan.org/gaugan2/ as a segmentation map, generates the output and creates a video from it.

comparison.mp4

A example video created by Gaugan2 Renderer. On the left the input video on the right the output video.

Usage

  1. clone this repository and import the Gaugan2Renderer from gaugan2_renderer or use the example in main.py
  2. install the dependencies via pip install -r requirements.txt
  3. create a folder named input_folder and add there the segmentation maps as PNGs you want to render
from gaugan2_renderer import Gaugan2Renderer # import the gaugan2_renderer class from gaugan2_renderer.py

renderer = Gaugan2Renderer() # create an instance of the gaugan2_renderer class
renderer.run("./input_folder", "./output_folder") # run the renderer
renderer.create_video("./output.mp4") # create a video of the created images

Api

gaugan2_renderer.run(input_folder, output_folder)

  • input_folder the folder with the segmentation maps that should be rendered, PNGs required
  • output_folder the folder with the rendered images - if it does not exist, it will be created automatically

gaugan2_renderer.create_video(output_path)

  • output_path the path to the rendered video

For best results, use:

  • PNG format - required
  • input images with the size of 1024 px x 1024 px
  • the exact segmentation map colors
  • no anti aliasing (every pixel should have a color value specified in Semgmentation Map Colors)

Segmentation Map Colors

  • bridge: #5e5bc5
  • bush: #606e32
  • clouds: #696969
  • dirt: #6e6e28
  • fence: #706419
  • flower: #760000
  • fog: #77ba1d
  • grass: #7bc800
  • gravel: #7c32c8
  • ground-other: #7d3054
  • hill: #7ec864
  • house: #7f4502
  • mountain: #869664
  • mud: #87716f
  • pavement: #8b3027
  • platform: #8f2a91
  • river: #9364c8
  • road: #946e28
  • rock: #956432
  • roof: #9600b1
  • sand: #999900
  • sea: #9ac6da
  • sky: #9ceedd
  • snow: #9e9eaa
  • stone: #a1a164
  • straw: #a2a3eb
  • tree: #a8c832
  • wall-brick: #aad16a
  • wall-stone: #ae2974
  • wall-wood: #b0c1c3
  • water: #b1c8ff
  • wood: #b57b00

gaugan2-renderer's People

Contributors

gormlabenz avatar

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.