# AnimeGANv3
**Repository Path**: zyz0577/AnimeGANv3
## Basic Information
- **Project Name**: AnimeGANv3
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-10-15
- **Last Updated**: 2024-10-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# AnimeGANv3
Paper Title: A Novel Double-Tail Generative Adversarial Network for Fast Photo Animation.
## Let's use AnimeGANv3 to produce our own animation.
[](https://github.com/TachibanaYoshino/AnimeGANv3/blob/master/doc/AnimeGANv3_manuscript.pdf)
[](https://www.jstage.jst.go.jp/article/transinf/E107.D/1/E107.D_2023EDP7061/_pdf/-char/en)
[](https://tachibanayoshino.github.io/AnimeGANv3/)
[](https://huggingface.co/spaces/TachibanaYoshino/AnimeGANv3)
[](https://youtu.be/EosubeJmAnE)
[](https://twitter.com/asher_9527)
[](https://github.com/TachibanaYoshino/AnimeGANv3?tab=readme-ov-file#scroll-license)
[](https://github.com/TachibanaYoshino/AnimeGANv3)
[](https://drive.google.com/file/d/1Er23bL36pkr67Q9f1P28BuMP6yZKf-yz/view?usp=sharing)
[](https://hits.seeyoufarm.com)
## 📢 Updates
* `2024-08-28` A [repo](https://github.com/TachibanaYoshino/AnimeGANv3_Portrait_Inference) more suitable for portrait style inference based on the AnimeGANv3 models has been released. Highly recommended.
* `2023-12-10` Added a new AnimeGANv3 model for Portrait to Oil-painting style. Its onnx is available [here](https://www.patreon.com/posts/animeganv3-s-oil-94445425?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link).
* `2023-11-23` The code and the [manuscript](https://github.com/TachibanaYoshino/AnimeGANv3/blob/master/doc/AnimeGANv3_manuscript.pdf) are released. 🦃
* `2023-10-31` Added three new styles of AnimeGANv3: Portrait to Cute, 8bit and Sketch-0 style. :ghost:
* `2023-09-18` Added a new AnimeGANv3 model for Face to Kpop style.
* `2023-01-16` Added a new AnimeGANv3-photo.exe for the inference of AnimeGANv3's onnx model.
* `2023-01-13` Added a new AnimeGANv3 model for Face to comic style.
* `2022-12-25` Added the tiny model (2.4MB) of [~~Nordic myth style~~]() and USA style 2.0. It can go upto 50 FPS on iphone14 with 512*512 input. :santa:
* `2022-11-24` ~~Added a new AnimeGANv3 model for Face to Nordic myth style.~~ 🦃
* `2022-11-06` Added a new AnimeGANv3 model for Face to Disney style **V1.0**.
* `2022-10-31` Added a new AnimeGANv3 model for Face to USA cartoon and Disney style **V1.0**. :jack_o_lantern:
* `2022-10-07` The USA cartoon Style of AnimeGANv3 is integrated to [**ProfileProfile**](https://apps.apple.com/in/app/profileprofile/id1636884362
) with [Core ML](https://developer.apple.com/documentation/coreml). Install it by the Apple Store and have a try.
* `2022-09-26` [Official online demo](https://huggingface.co/spaces/TachibanaYoshino/AnimeGANv3) is integrated to [Huggingface Spaces](https://huggingface.co/spaces) with [Gradio](https://github.com/gradio-app/gradio). [](https://huggingface.co/spaces/TachibanaYoshino/AnimeGANv3)
* `2022-09-24` Added a new great AnimeGANv3 model for Face to USA cartoon Style.
* `2022-09-18` Update a new AnimeGANv3 model for Photo to Hayao Style.
* `2022-08-01` Added a new AnimeGANv3 onnx model [**(Colab)**](https://www.patreon.com/posts/new-animeganv3-69895469?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator) for Face to [Arcane](https://www.netflix.com/sg/title/81435684) style.
* `2022-07-13` Added a new AnimeGANv3 onnx model [**(Colab)**](https://colab.research.google.com/drive/1XYNWwM8Xq-U7KaTOqNap6A-Yq1f-V-FB?usp=sharing) for Face to portrait sketch.
* `2021-12-25` The paper of AnimeGANv3 will be released in 2022. :christmas_tree:
---------
## 🎮 Usage
* Official online demo is released in [](https://huggingface.co/spaces/TachibanaYoshino/AnimeGANv3).
* Download this repository and use AnimeGANv3's [UI tool](https://github.com/TachibanaYoshino/AnimeGANv3_gui.exe) and pre-trained *.onnx to turn your photos or videos into anime. :blush:
* 🛠️ Installation
1. Clone repo
```bash
git clone https://github.com/TachibanaYoshino/AnimeGANv3.git
cd AnimeGANv3
```
1. Install dependent packages
```bash
pip install -r requirements.txt
```
1. Inference with *.onnx
```bash
python deploy/test_by_onnx.py -i inputs/imgs/ -o output/results -m deploy/AnimeGANv3_Hayao_36.onnx
```
1. video to anime with *.onnx
```bash
python tools/video2anime.py -i inputs/vid/1.mp4 -o output/results -m deploy/AnimeGANv3_Hayao_36.onnx
```
## 🚀 Landscape Demos
### :fire: Video to anime (Hayao Style)
____
### :art: Photo to Hayao Style


more surprise 👈





___
### :art: Photo to Shinkai Style


more surprise 👈




___
## 🚀 Portrait Style Demos
**The paper has been completed in 2022. The study of portrait stylization is an extension of the paper.**
Some exhibits 👈
### :art: Face to USA cartoon style


___
### :art: Face to Disney cartoon style


___
### :art: Face to USA cartoon + Disney style

more surprise 👈

___
### :art: Face to Arcane style


___
### :art: Portrait to comic style


___
### :art: Face to Kpop style


___
### :art: Portrait to Oil-painting style

more surprise 👈

___
### :art: Portrait to Cute style


___
### :art: Portrait to 8bit style


___
### :art: Portrait to Sketch-0 style

___
### :art: Face to portrait sketch
[](https://colab.research.google.com/drive/1XYNWwM8Xq-U7KaTOqNap6A-Yq1f-V-FB?usp=sharing)
| input | Face | panoramic image|
| :-: |:-:| :-:|
|
|
|
|
|
|
|
|
more surprise 👈

## 🔨 Train
#### 1. Download dataset and pretrained vgg19
1. [vgg19](https://github.com/TachibanaYoshino/AnimeGAN/releases/download/vgg16%2F19.npy/vgg19_no_fc.npy)
2. [Hayao dataset](https://github.com/TachibanaYoshino/AnimeGANv2/releases/download/1.0/Hayao.tar.gz)
3. [Shinkai dataset](https://github.com/TachibanaYoshino/AnimeGANv2/releases/download/1.0/Shinkai.tar.gz)
4. [photo dataset](https://github.com/TachibanaYoshino/AnimeGAN/releases/download/dataset-1/dataset.zip)
#### 2. Do edge_smooth
```bash
cd tools && python edge_smooth.py --dataset Hayao --img_size 256
```
#### 3. Do superPixel
```bash
cd tools && python visual_superPixel_seg_image.py
```
#### 4. Train
```bash
python train.py --style_dataset Hayao --init_G_epoch 5 --epoch 100
```
## ✒️ Citation
Consider citing as below if you find this repository helpful to your project:
```bibtex
@article{Liu2024dtgan,
title={A Novel Double-Tail Generative Adversarial Network for Fast Photo Animation},
author={Gang LIU and Xin CHEN and Zhixiang GAO},
journal={IEICE Transactions on Information and Systems},
volume={E107.D},
number={1},
pages={72-82},
year={2024},
doi={10.1587/transinf.2023EDP7061}
}
```
## :scroll: 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 AnimeGANv3 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.
## :e-mail: Author
Asher Chan `asher_chan@foxmail.com`