Skip to content

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

Notifications You must be signed in to change notification settings

t04glovern/deep-dune-coloring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published