Skip to content

guchengxi1994/Hand-painted-faces-to-real-faces

Repository files navigation

PencilFace

Convert a hand-painted face to a real face. It is a two-phase method with U-GAT-IT. First , convert simple-hand-painted faces to complex-hand-painted faces(short for a2b ). Then, convert complex-hand-painted faces to real faces(short for b2c).

Data preperation

1. Face Segmentation (it is really fast)

2. Use convert.py to get a simple-hand-painted face(with or without salt&pepper noise). Use pencil.py to get a complex-hand-painted face

origin complex-hand-painted simple-hand-painted
image image image

3. 'origin'(a),'complex-hand-painted'(b),'simple-hand-painted'(c) are the three training data. Use 'a' and 'b' to train the a2b model. Use 'b' and 'c' to train the b2c model, respectively. a2b training data can be found here Google Drive Link, b2c training data can be found here Google Drive Link.

Results

Notice.

Phase a2b trained only 10000 times iteration, phase b2c only trained 9000 times iteration. More training should have better results.

Training results(two phases with same training dataset)

a2b10000 b2c9000
image image

Testing results

origin a2b b2c
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image
image image image

About

convert a pencil face to a real face

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages