Giter Club home page Giter Club logo

colorization's Introduction

Automatic Line Art Colorization

Introduction

This repository implements automatic line art colorization. In addition to training the neural network with line arts only, this repository aims to colorize the line art with several types of hints. There are mainly three types of hints.

  • Atari

    • description: Colorization with hint that includes some lines in desired color (ex. PaintsChainer)
    • input: Line art and atari
  • Tag

    • description: Colorization with tag (ex. Tag2Pix)
    • input: Line art and tag
  • Reference

    • description: Colorization with reference images (ex. style2paints V1)
    • input: Line art and reference image

Line extraction method

There are many kinds of line extraction methods, such as XDoG or SketchKeras. If we train the model on only one type of line art, trained model comes to overfit and cannot colorize another type of line art properly. Therefore, like Tag2Pix, various kinds of line arts are used as the input of neural network.

I use mainly three types of line art.

  • XDoG

    • Line extraction using two Gaussian distributions difference to standard deviations
  • SketchKeras

    • Line extraction using UNet. Lines obtained by SketchKeras are like pencil drawings.
  • Sketch Simplification

    • Line extraction using Fully-Convolutional Networks. Lines obtained by Sketch Simplification are like digital drawings.

Examples obtained by these line extraction methods are as follows.

Moreover, I add two types of data augmenation to line arts in order to avoid overfitting.

  • Randomly morphology transformation to deal with various thicks of lines
  • Randomly RGB values of lines to deal with various depths of lines

Experiment without hint

Motivation

First of all, I needed to confirm that methods based on neural networks can colorize without hint precisely and diversely. The training of mapping from line arts to color images is difficult because of variations in color. Therefore, I hypothesized that neural networks trained without hints would come to colorize single color in any regions. In addition to content loss, I try adversarial loss because adversarial learning enables neural networks to match data distribution adequately.

Methods

  • pix2pix
  • pix2pixHD
  • bicyclegan

Results

  • pix2pix & pix2pixHD

  • bicyclegan

Experiment with atari

Motivation

Considering the application systems of colorization, we need to colorize with designated color. Therefore, I try some methods that take the hint, named atari, as input of neural network.

Methods

  • userhint
  • userhint v2
  • whitebox
  • spade

Results

  • userhint here

  • whitebox

  • spade

Experiment with reference

Motivation

I also consider taking the hint, named reference, as input of neural network. At first, I had tried to implement style2paints V1. However, I had difficulities producing the reproduction of results because training came to collapse. Then, I decide to seek for a substitute for style2paints V1.

Methods

  • adain
  • scft
  • video

Result

  • adain here

  • scft

  • video

Reference

colorization's People

Contributors

seriallain3170 avatar

Watchers

James Cloos 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.