All Projects → racinmat → Anime Style Transfer

racinmat / Anime Style Transfer

Style transfer for between real photos and anime images using CycleGAN

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Anime Style Transfer

cyclegan keras
cyclegan reimplimented in keras
Stars: ✭ 18 (-55%)
Mutual labels:  cyclegan
Pycadl
Python package with source code from the course "Creative Applications of Deep Learning w/ TensorFlow"
Stars: ✭ 356 (+790%)
Mutual labels:  cyclegan
Gan Compression
[CVPR 2020] GAN Compression: Efficient Architectures for Interactive Conditional GANs
Stars: ✭ 800 (+1900%)
Mutual labels:  cyclegan
Hands On Deep Learning Algorithms With Python
Master Deep Learning Algorithms with Extensive Math by Implementing them using TensorFlow
Stars: ✭ 272 (+580%)
Mutual labels:  cyclegan
Attentiongan
AttentionGAN for Unpaired Image-to-Image Translation & Multi-Domain Image-to-Image Translation
Stars: ✭ 341 (+752.5%)
Mutual labels:  cyclegan
Von
[NeurIPS 2018] Visual Object Networks: Image Generation with Disentangled 3D Representation.
Stars: ✭ 497 (+1142.5%)
Mutual labels:  cyclegan
Image-Colorization-CycleGAN
Colorization of grayscale images using CycleGAN in TensorFlow.
Stars: ✭ 16 (-60%)
Mutual labels:  cyclegan
Tensorflow Cyclegan
Lightweight CycleGAN tensorflow implementation 🦁 <-> 🐆
Stars: ✭ 35 (-12.5%)
Mutual labels:  cyclegan
Cyclegan
Tensorflow implementation of CycleGAN
Stars: ✭ 348 (+770%)
Mutual labels:  cyclegan
Gans
Generative Adversarial Networks implemented in PyTorch and Tensorflow
Stars: ✭ 714 (+1685%)
Mutual labels:  cyclegan
Generative models tutorial with demo
Generative Models Tutorial with Demo: Bayesian Classifier Sampling, Variational Auto Encoder (VAE), Generative Adversial Networks (GANs), Popular GANs Architectures, Auto-Regressive Models, Important Generative Model Papers, Courses, etc..
Stars: ✭ 276 (+590%)
Mutual labels:  cyclegan
Cyclegan Tensorflow 2
CycleGAN Tensorflow 2
Stars: ✭ 330 (+725%)
Mutual labels:  cyclegan
Pytorch Cyclegan
A clean and readable Pytorch implementation of CycleGAN
Stars: ✭ 558 (+1295%)
Mutual labels:  cyclegan
traiNNer
traiNNer: Deep learning framework for image and video super-resolution, restoration and image-to-image translation, for training and testing.
Stars: ✭ 130 (+225%)
Mutual labels:  cyclegan
Contrastive Unpaired Translation
Contrastive unpaired image-to-image translation, faster and lighter training than cyclegan (ECCV 2020, in PyTorch)
Stars: ✭ 822 (+1955%)
Mutual labels:  cyclegan
Pytorch-Image-Translation-GANs
Pytorch implementations of most popular image-translation GANs, including Pixel2Pixel, CycleGAN and StarGAN.
Stars: ✭ 106 (+165%)
Mutual labels:  cyclegan
Voice Converter Cyclegan
Voice Converter Using CycleGAN and Non-Parallel Data
Stars: ✭ 384 (+860%)
Mutual labels:  cyclegan
Cyclegan
PyTorch implementation of CycleGAN
Stars: ✭ 38 (-5%)
Mutual labels:  cyclegan
Anime person translation
人脸和动漫脸的互转
Stars: ✭ 35 (-12.5%)
Mutual labels:  cyclegan
Cyclegan Tensorflow
Tensorflow implementation for learning an image-to-image translation without input-output pairs. https://arxiv.org/pdf/1703.10593.pdf
Stars: ✭ 676 (+1590%)
Mutual labels:  cyclegan

Real world to anime style transfer

This is repository of TensorFlow implementation of CycleGAN: https://arxiv.org/abs/1703.10593 CycleGAN is GAN-like neural network for style transfer, which does not require paired training data.

This implementation is heavily based on Otakar Jašek's diploma thesis

Basically tt uses 2 datasets: real and anime. Real data are from common machine learning datasets for computer vision, namely Ade20k, but combined with various cosplay photographs. Anime data are from anime videos, sampled at 1 FPS.

Code is in code/mod-cycle-gan. code/mod-cycle-gan/data_preparation contains data preparation scripts. The input to neural network is native TensorFlow format, protobuf. Videos are sampled to obtain images and then images are converted into .tfrecord files containing protobuf format of training data.

Images in tfrecord can be corrupted, you can check them with script. python data_preparation/check_tfrecords.py --file=<absolute name of tfrecord>

Neural network is then trained in code/mod-cycle-gan/train.py by feeding it two tfrecord files, one with real data, one with anime data. Trained network then can be used for inference, transforming real images to anime data by code/mod-cycle-gan/transform.py script.

Example for start training:

python3 train.py --batchsize=2 --Ytfr=../../datasets/anime/houseki-no-kuni.tfrecord

if you need to run training on server, in background, you can use run-network-bg.sh script. For example, you can run the same network in background by:

./run-network-bg.sh --batchsize=2 --Ytfr='../../datasets/anime/houseki-no-kuni.tfrecord'

Trained network is stored in .pb files, which contain its very compact, protobuf representation. It is much smaller than checkpoints, so it can be even versioned in git.

Trained networks are stored in export/<network name>/<current training step>

When transforming video, we must split it to images, transform them, and then create video from them. Using this approach, audio is lost, obviously. Commands for that, example:

python data_preparation/videos_to_images.py --videos_dir=../../dataset-sources/real/videos/animefest-2017-cosplay --images_dir=../../dataset-sources/real/images/animefest-2017-cosplay
python transform.py --inpath=../../dataset-sources/real/images/animefest-2017-cosplay/*.png --outdir=../../data/images/animefest-2017-cosplay --includein=0 --rundir=20180625-1659-0
python data_preparation/images_to_videos.py --images_dir=../../data/images/animefest-2017-cosplay/20180625-1659-0/80000 --video_path=../../data/videos/animefest-cosplay.avi

Images extracted from videos take lots of space, and are not needed when threcords are generated so you can delete them.

Results (so far)

Trained on 2 datasets: Ade20k and anime series + movie No Game No Life, I obtained following results on Ade20k dataset (training data):

Image of results

Tried on testing data (not used for training), I obtained interesting results, althour with some slight artifacts. Following images are photos of Czech cosplayer Lena, be sure to check her content (Facebook, Instagram)

Image of results

Unfortunately other training did not show any more interesting results so far.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].