Unofficial Keras implementation of Joint Gap Detection and Inpainting of Line Drawings.
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.
- Keras2 (Tensorflow backend)
- OpenCV3
- CairoSVG
-
Set up directories.
-
Download the model from release and put it in the same folder with code.
-
Run
predict.pyfor prediction. Runmodel{NUM}.pyfor train.
There are 3 methods for data generation, DATA_GEN, DATA_GAP and DATA_THIN.
-
Use
DATA_GENfor training, the data is generated online. -
Collect line-drawings with LineDistiller.
-
Put line-drawings into
data/line, usingDATA_GAPfor 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/lineand put thinning results intodata/thin, usingDATA_THINfor training.
Models are licensed under a CC-BY-NC-SA 4.0 international license.
From Project HAT by Hepesu With ❤️