欢迎光临散文网 会员登陆 & 注册

生成小透明的漫画风格图片

2022-05-21 22:30 作者:grit-365  | 我要投稿

开源项目:AnimeGANv2

https://github.com/TachibanaYoshino/AnimeGANv2

可以将图片和视频转换成漫画风格的工具。采用的是神经风格迁移+生成对抗网络(GAN)的组合.


测试图片:(如有侵权,请联系我删除或修改)

抖音-小透明

生成漫画风格

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


生成小透明的漫画风格图片的评论 (共 条)

分享到微博请遵守国家法律