sketchKeras
an u-net with some algorithm to take sketch from paints
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.
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.
Where it fits
- Generate line-sketch versions of painted anime artwork to create training data for colorization models.
- Build an automatic sketch-to-color pipeline by pairing generated sketches with original paintings.
- Produce clean line-art extracts from illustrations while preserving optional color highlights.