This repo contains a PyTorch from-scratch implementation of the paper Towards the Automatic Anime Characters Creation with Generative Adversarial Networks.
Generating 二次元(にじげん) MOEst avatars...
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 )
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.
Coming soon.