AnirudhRahul / FlatAnime

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FlatAnime

Anime Image translation to Minimalist Theme by Anirudh Rahul

Current image to image machine learning models such as style transfer models, seem to have promising applications in the arts especially when it comes to artforms such as paintings and photos.

The goal of this project to explore the application of traditional image to image learning techniques on an anime image dataset, to speicfically study the effectiveness of different image to image techniques for anime style images.

Preliminary Results

Input Output Ground

Dataset Creation

In order to create a paired anime image dataset I had scrape the internet for exact pairs of anime and minimalist anime images, and then somehow align both these images.

To make finding exact image pairs easier, I decided to start searching for minimalist images on art forums such as Pixiv, and DeviantArt using tags such as minimalistflatdesign, and minimalistanime, since artists on these forums typically linked the source images for their minimalist drawings in their descriptions.

In order to align the discovered pairs I used the alignment pipeline shown below

pipeline-white boundingbox-white

Development Notes

Put examples of paired data in the /keyed_data folder with the format basename.ext and basename_flat.ext

Dependencies needed include openCV, Pillow, torchvision

Run process.py to properly mask and align the paired data (alignment simply tries to match up the bounding box of the flat image with the bounding box of the base image) and produce a standardized 512x512 output image in the /aligned dir

Then run format.py to extend the dataset via random image transformations such as affine transforms, padding, and hue jitters.

Be sure to change the output directory for your test/training sets in the last to lines!

Also be sure to create the right subfolders, i.e : folderName/in and folderName/out

About

License:MIT License


Languages

Language:Python 100.0%