Giter Site home page Giter Site logo

t04glovern / deep-dune-coloring Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 5.33 MB

Automatic coloring and shading of Dune coloring book using manga-style lineart model from deepcolor. Makes use of Tensorflow + cGANs

Home Page: https://devopstar.com/2019/03/25/dune-coloring-book-using-cgan-tensorflow/

Shell 0.67% Python 66.48% CSS 0.67% HTML 16.16% JavaScript 16.01%
tensorflow cgan gan dune

deep-dune-coloring's Introduction

DeepDune Coloring

Automatic coloring and shading of Dune coloring book using manga-style lineart model from deepcolor. Makes use of Tensorflow + cGANs

example01

example02

Dune PDF

First download a copy of the coloring book from my S3 bucket

aws s3 cp s3://devopstar/resources/deep-dune-coloring/dune-coloring-book-remaster.pdf dune-coloring-book-remaster.pdf

Optional - Convert the PDF into pages

./convert.sh

This will dump out the Dune book images to the dune folder along with splitting the pages. You will need to have imagemagick to do this. The alternative is you can download these pages from my S3 bucket.

aws s3 sync s3://devopstar/resources/deep-dune-coloring/dune dune/

Deepcolor

Setup Deepcolor using the handy version built by Kevin Frans that I've tweaked slightly and put in this repository

Setup Repo

Create the output directories that will be needed

cd deepcolor
mkdir results
mkdir imgs
mkdir samples

Python Environment

Conda

## GPU
conda create -n tensorflow_gpuenv_py27 tensorflow-gpu python=2.7 numpy
conda activate tensorflow_gpuenv_py27
pip install opencv-python untangle bottle

Alternatives

The requirements you will need are:

  • Python 2.7
  • Tensorflow 1.12
  • numpy, opencv-python, untangle, bottle

Training

If you would like to train your own version you will need to download the training data from Safebooru. This can be done by running the following script.

# From within deepcolor/
python download_images.py

Alternatively you can sync the training set I used down from S3 (If this gets hammers I will remove acces to it)

# From within deepcolor/
aws s3 sync s3://devopstar/resources/deep-dune-coloring/imgs imgs/

At this point you can start training by running the following

python main.py train

Pre-trained model

If you would like to use the pre-trained model you can pull down a copy from my S3 (If this gets hammers I will remove access to it. Contact me @nathangloverAUS on twitter if you would like access)

# From within deepcolor/
aws s3 sync s3://devopstar/resources/deep-dune-coloring/checkpoint checkpoint/

You should have a folder structure as follows:

# From within deepcolor/
checkpoint/
    tr/
        checkpoint
        model-10900500.index
        model-10900500.data-00000-of-00001
        model-10900500.meta

Web Interface

Once you have either run the training task (and have a checkpoint folder) or have downloaded the pretrained model using the command above you should be able to run the web interface that can be used to interact with the model

# From within deepcolor/
python server.py

Open up the web interface on http://localhost:8000

Attribution

deep-dune-coloring's People

Contributors

t04glovern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.