Awesome
LineCloser
Unofficial Keras implementation of Joint Gap Detection and Inpainting of Line Drawings.
Overview
Joint gap for line-drawings. Model1 uses network from the paper. For stable training, BN was added for all Conv2D. Model2 uses common network for inpaint.
Dependencies
- Keras2 (Tensorflow backend)
- OpenCV3
- CairoSVG
Usage
-
Set up directories.
-
Download the model from release and put it in the same folder with code.
-
Run
predict.py
for prediction. Runmodel{NUM}.py
for train.
Data Preparation
There are 3 methods for data generation, DATA_GEN
, DATA_GAP
and DATA_THIN
.
-
Use
DATA_GEN
for training, the data is generated online. -
Collect line-drawings with LineDistiller.
-
Put line-drawings into
data/line
, usingDATA_GAP
for training. -
Thin(normalize) the line-drawings with LineNormalizer or tranditional thinning method.
-
Manually processe line-drawings and thinning results(threshold etc.), then crop them into pieces.
-
Put line-drawings into
data/line
and put thinning results intodata/thin
, usingDATA_THIN
for training.
Models
Models are licensed under a CC-BY-NC-SA 4.0 international license.
From Project HAT by Hepesu With :heart: