https://github.com/bchao1/anime-generation
🎨 Anime generation with GANs.
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
â—‹CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
â—‹.zenodo.json file
-
â—‹DOI references
-
â—‹Academic publication links
-
â—‹Academic email domains
-
â—‹Institutional organization owner
-
â—‹JOSS paper metadata
-
â—‹Scientific vocabulary similarity
Low similarity (8.4%) to scientific vocabulary
Keywords
Repository
🎨 Anime generation with GANs.
Basic Info
Statistics
- Stars: 70
- Watchers: 2
- Forks: 7
- Open Issues: 1
- Releases: 0
Topics
Metadata Files
README.md
ACGAN Conditional Anime Generation
Note: I have restructured the whole folder, cleaned up training code, pruned my dataset, and updated most of the results. You can see the old version of this repo in
old.
Generate colorful anime characters using GAN.
Generating characters with different hair and eye colors
By interpolating generator input, we can see some interesting results.
By fixing color classes and varying noise, we can generate anime characters with same colors but different identity.
Generate characters with different artistic styles
I noticed that anime produced in different years have distinctive artistic styles. To name a few: - Characters in older anime tend to have larger, angular eyes, while newer anime have characters with round eyes. - Colors are brighter and more saturated in older anime, while newer anime have mild colors.
By conditioning the ACGAN on year labels, we can generate characters with different artistic styles.
Interpolating along the year latent code:
Start training
Modify config.yaml as you wish.
```
python3 run.py ```
The dataset
The current dataset is a composition of 2 datasets:
- One dataset with eye and hair color labels (30k+ images)
- One dataset with year label, which is the year in which the anime is produced (60k+ images).
The dataset format is as follows:
- images/
- XXXXX.jpg
- ...
- labels.pkl
- eye_label.json
- year_label.json
- hair_label.json
After loading in labels.pkl with pickle, you will get a dictionary of { filname : labels }. The labels are formatted as (eye, hair, year) tuples.
{
"32455": (8, 10, 5),
...
}
This means
32455.jpghas eye class 8, hair class 10, year class 5.
Missing labels will be a None. All images from dataset 1 will have year labels None, while all images from dataset 2 will have eye and hair label None.
Source code in the current repo is used to train on the first dataset. This requires some manual preprocessing (see dataset/anime_dataset.py) to extract the first dataset from the whole dataset.
The .json files map discrete labels to semantics.
js
// eye_label.json
{
"aqua": 0,
"black": 1,
...
}
Some notes
- When training on the first dataset, adding some color transformations to images as a preprocessing step traning might help. You can achieve this through various
torchvisions.transforms.functionalmethods. - Train with N(0, 1) but sample from Gaussian of smaller variance when evaluating. Just an engineering hack to get better results.
Owner
- Name: Brian Chao
- Login: bchao1
- Kind: user
- Location: Stanford, California
- Company: Stanford University
- Website: https://bchao1.github.io
- Twitter: BrianCChao
- Repositories: 14
- Profile: https://github.com/bchao1
Stanford Ph.D. student. Research in computational photography, displays, and computer graphics. Open source enthusiast.
GitHub Events
Total
- Watch event: 4
Last Year
- Watch event: 4
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 4
- Total pull requests: 0
- Average time to close issues: 6 months
- Average time to close pull requests: N/A
- Total issue authors: 4
- Total pull request authors: 0
- Average comments per issue: 0.75
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- projectgroup2110 (1)
- Nevermetyou65 (1)
- YangChen666 (1)
- mymelove02 (1)