An interesting and special GAN method consisting of convolutional layers to generate pixel perfect anime images.
This project uses pipenv
for dependency management. You need to ensure that you have pipenv
installed on your system.
Here's how to install the dependencies, and get started.
- Install it using
pipenv sync -d
- Once done, spawn a shell to run the files:
pipenv shell
And you're done, and you can run any of the files, and test them.
This project is structured as follows,
src/
Contains the python scripts for training the ML Models.notebooks/
contains the jupyter notebooks with explanations and the outputs of our end goal.models/
contains the exported model to make your work easy.resources/
contain the extra things for usage.
I have personally used some kaggle datasets to train the model. You can also use the script as I have provided in the repository, or download any one dataset as shown in the script, or make your own following the steps given below.
Here are the kaggle datasets I suggest using for training.
I personally recommend using either one of them, or Making a good one yourself from scratch. You could use my script to download and combine the datasets too if you want.
To make your own, Here are the steps. You need a scraper tool called gallery-dl to download the images first, and then use Animeface to process the images and get the faces.
- Download the images using
gallery-dl
. Here is a python script to automate it. Note, You need the tags in a file calledtags.txt
in same folder. The tags are pre-added in the repo, inside theresources
folder.import os with open("tags.txt", "r") as f: tags = f.read() for tag in tags.split("\n"): os.system(f'gallery-dl --images 1000 "https://danbooru.donmai.us/posts?tags={tag}"')
- Once done, You can follow the anime face documentation and process the data and then build the dataset out of it.
Contributions, issues and feature requests are welcome. After cloning & setting up project locally, you can just submit a PR to this repo and it will be deployed once it's accepted.
We love people's support in growing and improving. Be sure to leave a ⭐️ if you like the project and also be sure to contribute, if you're interested!