AnimeGANv2

[开放源代码] AnimeGAN 的改进版。风景照片/视频到动漫。([Open Source]. The improved version of AnimeGAN. Landscape photos/videos to anime)

Github星跟蹤圖

AnimeGANv2

「Open Source」. The improved version of AnimeGAN.
Project Page」 | Landscape photos/videos to anime

If you like what I'm doing you can tip me on patreon.

Photos Colab

Videos Colab for videos


News


Focus:

News:

The improvement directions of AnimeGANv2 mainly include the following 4 points:  
  • 1. Solve the problem of high-frequency artifacts in the generated image.

  • 2. It is easy to train and directly achieve the effects in the paper.

  • 3. Further reduce the number of parameters of the generator network. (generator size: 8.17 Mb), The lite version has a smaller generator model.

  • 4. Use new high-quality style data, which come from BD movies as much as possible.

          AnimeGAN can be accessed from here.


Requirements

  • python 3.6
  • tensorflow-gpu 1.15.0 (GPU 2080Ti, cuda 10.0.130, cudnn 7.6.0)
  • opencv
  • tqdm
  • numpy
  • glob
  • argparse
  • onnxruntime (If onnx file needs to be run.)

Usage

1. Inference

python test.py --checkpoint_dir checkpoint/generator_Hayao_weight --test_dir dataset/test/HR_photo --save_dir Hayao/HR_photo

2. Convert video to anime

python video2anime.py --video video/input/お花見.mp4 --checkpoint_dir checkpoint/generator_Hayao_weight --output video/output

3. Train

1. Download vgg19

vgg19.npy

2. Download Train/Val Photo dataset

Link

3. Do edge_smooth

python edge_smooth.py --dataset Hayao --img_size 256

4. Train

python train.py --dataset Hayao --epoch 101 --init_epoch 10

5. Extract the weights of the generator

python get_generator_ckpt.py --checkpoint_dir ../checkpoint/AnimeGANv2_Shinkai_lsgan_300_300_1_2_10_1 --style_name Shinkai


Results


:heart_eyes: Photo to Paprika Style













:heart_eyes: Photo to Hayao Style













:heart_eyes: Photo to Shinkai Style











License

This repo is made freely available to academic and non-academic entities for non-commercial purposes such as academic research, teaching, scientific publications. Permission is granted to use the AnimeGANv2 given that you agree to my license terms. Regarding the request for commercial use, please contact us via email to help you obtain the authorization letter.

Author

Xin Chen

主要指標

概覽
名稱與所有者TachibanaYoshino/AnimeGANv2
主編程語言Python
編程語言Python (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2020-08-07 21:52:41
推送於2024-08-27 12:44:47
最后一次提交2024-08-27 12:44:47
發布數2
最新版本名稱1.1 (發布於 )
第一版名稱1.0 (發布於 )
用户参与
星數5.3k
關注者數59
派生數756
提交數56
已啟用問題?
問題數65
打開的問題數46
拉請求數0
打開的拉請求數5
關閉的拉請求數3
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?