animegan
copied
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Readme
Files and versions
55 lines
1.1 KiB
55 lines
1.1 KiB
3 years ago
|
# AnimeGanV2 Style-Transfer Operator
|
||
|
|
||
|
Authors: filip
|
||
|
|
||
|
## Overview
|
||
|
|
||
|
AnimeGanV2 is a style transfer net that transforms images to looking like they fit in an anime movie.
|
||
|
|
||
|
## Interface
|
||
|
|
||
|
```python
|
||
|
__init__(self, model_name: str, framework: str = 'pytorch')
|
||
|
```
|
||
|
|
||
|
**Args:**
|
||
|
|
||
|
- model_name:
|
||
|
- which weights to use for inference.
|
||
|
- supports 'celeba', 'facepaintv1', 'facepaitv2', 'hayao', 'paprika', 'shinkai'
|
||
|
- framework:
|
||
|
- the framework of the model
|
||
|
- supported types: `str`, default is 'pytorch'
|
||
|
|
||
|
```python
|
||
|
__call__(self, image: 'towhee.types.Image')
|
||
|
```
|
||
|
|
||
|
**Args:**
|
||
|
|
||
|
- image:
|
||
|
- the input image
|
||
|
- supported types: `towhee.types.Image`
|
||
|
|
||
|
**Returns:**
|
||
|
|
||
|
The Operator returns a tuple `Tuple[('styled_image', numpy.ndarray)]` containing following fields:
|
||
|
|
||
|
- styled_image:
|
||
|
- styled photo
|
||
|
- data type: `numpy.ndarray`
|
||
|
- shape: (3, x, x)
|
||
|
- format: RGB
|
||
|
- values: [0,1]
|
||
|
|
||
|
## Requirements
|
||
|
|
||
|
You can get the required python package by [requirements.txt](./requirements.txt).
|
||
|
|
||
|
|
||
|
## Reference
|
||
|
|
||
|
Jie Chen, Gang Liu, Xin Chen
|
||
|
"AnimeGAN: A Novel Lightweight GAN for Photo Animation."
|
||
|
ISICA 2019: Artificial Intelligence Algorithms and Applications pp 242-256, 2019.
|