gitwtfhub

wtf is sketchkeras?

lllyasviel/sketchkeras — explained in plain English

Analysis updated 2026-07-25 · repo last pushed 2017-05-04

472PythonAudience · researcherComplexity · 3/5DormantSetup · moderate

TL;DR

Turns finished paintings, especially anime or comic art, into clean hand-drawn line sketches. Main use is generating sketch-color pairs to train automatic colorization models.

Mindmap

mindmap
  root((repo))
    What it does
      Extracts line sketches
      Handles anime art
      Drops noise and detail
    How it works
      U-Net neural network
      Combines with image processing
      Pre-trained model available
    Use cases
      Train colorization models
      Generate sketch datasets
      Create line art variants
    Tech stack
      Python
      Keras
      TensorFlow
      OpenCV
    Audience
      ML researchers
      Anime art developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Generate line-sketch versions of painted anime artwork to create training data for colorization models.

REASON 2

Build an automatic sketch-to-color pipeline by pairing generated sketches with original paintings.

REASON 3

Produce clean line-art extracts from illustrations while preserving optional color highlights.

What's in the stack?

PythonKerasTensorFlowOpenCV

How it stacks up

lllyasviel/sketchkerasensignkazekage/prodigy-hackstiantiangpu/reg-factory
Stars472474469
LanguagePythonPythonPython
Last pushed2017-05-04
MaintenanceDormant
Setup difficultymoderateeasyhard
Complexity3/52/54/5
Audienceresearchergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires installing Keras, TensorFlow, and OpenCV plus downloading a pre-trained model from the releases page.

No license information is provided in the repository, so default copyright restrictions apply.

Wtf does this do

sketchKeras takes a finished painting or illustration, especially anime or comic-style art, and turns it into a clean line sketch, as if a person had drawn the outlines by hand. The main reason you'd want this is to create training data for neural networks that colorize sketches. If you have lots of painted artwork but need matching line-art versions to teach a coloring model, this tool generates them automatically. The problem it solves is that standard edge-detection techniques don't work well on paintings. Artists add shading, texture, and dense lines that confuse those methods, producing noisy results that look more like a grayscale filter than a real sketch. Existing neural network approaches also struggle, they either retain too much noise or, when filtered to remove it, lose important lines and leave strokes too thick and coarse. This project combines traditional image-processing algorithms with a neural network (a type of model called a U-Net) to get closer to what a human-drawn sketch actually looks like. The result drops unimportant detail and noise while keeping clean, natural-looking lines. It can also produce a "colored highlighted" variant that preserves some color information from the original painting alongside the sketch. The ideal user is someone building an automatic colorization system for anime or comic art. You'd feed in painted artwork, get back sketch versions, and use those sketch-color pairs to train your model. The README doesn't go into setup detail beyond listing dependencies like Keras, OpenCV, and TensorFlow, and notes that a paper explaining the approach is forthcoming. A pre-trained model is available via the releases page, so you don't need to train it yourself.

Yoink these prompts

Prompt 1
I have a folder of painted anime artwork. How do I use sketchKeras to batch-convert them into clean line sketches for training a colorization model?
Prompt 2
Help me set up sketchKeras with Keras, TensorFlow, and OpenCV, what Python version and dependency versions are compatible, and where do I download the pre-trained model?
Prompt 3
I want to use the colored-highlighted variant in sketchKeras to preserve some color from the original painting alongside the sketch. How do I enable that output mode?
Prompt 4
Write a Python script that loads the sketchKeras pre-trained model, processes a directory of anime illustration images, and saves the resulting sketches to an output folder.

Frequently asked questions

wtf is sketchkeras?

Turns finished paintings, especially anime or comic art, into clean hand-drawn line sketches. Main use is generating sketch-color pairs to train automatic colorization models.

What language is sketchkeras written in?

Mainly Python. The stack also includes Python, Keras, TensorFlow.

Is sketchkeras actively maintained?

Dormant — no commits in 2+ years (last push 2017-05-04).

What license does sketchkeras use?

No license information is provided in the repository, so default copyright restrictions apply.

How hard is sketchkeras to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is sketchkeras for?

Mainly researcher.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.