This is an implementation of CartoonGAN. We provide both ".py" and "ipynb" version for tha training. The testing file will be uploaded soon.
We got greate inspiration from ComixGAN, and we used the implementation from this repository for blurring the comic images.
─datasets
├─comic
│ ├─001.jpg
│ ├─002.jpg
│ ├─...
│ └─xxx.jpg
├─comic_blurred
└─real
├─001.jpg
├─002.jpg
├─...
└─xxx.jpg
python comic_blurring.py
You need to delete the tmp.txt in the three sub-dir in datasets before you save images in the corresponding directories.
run python train3.py
to start training.
The Training consists of three parts, which is inspired by ComixGAN, they are
1) Pretrain the Generator to reconstruct the input clear comic images;
2) Pretrain the Discriminator to distinguish images among comic, blurred comic and real images;
** we use LSGAN instead.
3) Adversarially train both the Generator and Discriminator.
Note that because of the portraiture right of some real images, we just display the cartoonized results of some data.