The original dataset can be downloaded from the Anime Face Dataset. We then parse the tags using Illustration2Vec and delete those failure cases.
To run the code, we need first run the file preprocess.py
in the model
folder:
python preprocess.py
It will dump all of the images and tags into one binary file, which can speedup our training process.
Then just run the code train.py
with default parameters:
python train.py
The output images and checkpoint models are put in the folder output
and we can visualize the loss with TensorBoard.
Python virtual environment is recommended!
pip install Flask
python3 webapp.py {your .pth model file path}
Example:
python3 webapp.py output/netG_epoch_200.pth
- The anime eye icon in the logo is adapted from Wikipedia.