create-girls-moe-pytorch
create-girls-moe-pytorch copied to clipboard
An implementation of paper from NIPS2017 'Towards the Automatic Anime Characters Creation with Generative Adversarial Networks' using pytorch.
Create Girls Moe
This repo contains a PyTorch from-scratch implementation of the paper Towards the Automatic Anime Characters Creation with Generative Adversarial Networks.
What The Paper Did
Generating 二次元(にじげん) MOEst avatars...

Environment
- Python 3.6
- Python-OpenCV 3.4.0
- pyquery 1.2.4
- i2v 1.0.0
- PyTorch 0.4.0
- GPU is better :-D
- and so on.
Attention
This is an unfinished repo. I'm training the models and completing the README.md under src >.<
If you want to use this repo, I strongly recommand you to read codes carefully.
Networks' Structure
I want to call it a DRAGAN-like SRGAN structure because I use the gradient penalty as the paper told and two SRResNet as discriminator and generator.
The SRResNet(modified as the paper described) are like this:
I have some modifications in this structure:
-
I weighted label's loss and tag's loss with half of λadv beacause the loss described in the paper was so hard-core for me. (More details please refer in src/model/gan.py)
-
Remove the sigmoid operation in adversarial loss calculating since the results with sigmoid layer may cause some problems.
-
Using Multi-Label Soft Margin Loss for tags' loss calculating.(Cross Entropy Loss may better because of the imbalance of the images' tag distribution. But I don't have too much time for weights tuning. :-D )
Data Preparing
-
Cause I built an extremely clean dataset for this task. I'm glad to share my data-Preparing method here.
-
Crawled the images from the website as the paper proposed. Read the readme and codes in src/dataset/Spider/ to get more information.
-
I used the lbpcascade_animeface model for face detecting. source codes are in src/dataset/FaceDetect/
-
illustration2vec was used for face tagging. Please check the files in src/tag/
-
Remove the invalid images manually.
Generative Adversarial Network
- The discriminator and generator were defined in src/model/networks/.
- The training strategy of GAN was written in src/model/gan.py.
Tools for statistics
- Currently I have some simple tools for face data statistics. More details in src/statistics/dataset/.
Super Resolution Processing
Coming soon.