# Pipeline: Style Transfer using AnimeGanV2 Authors: filip ## Overview The pipeline is used to **animate images**. It uses the AnimeGanV2 to cartoonize the images. ## Interface **Input Arguments:** - img_path: - the input image path - supported types: `str` **Pipeline Output:** The pipeline 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] ## How to use 1. Install [Towhee](https://github.com/towhee-io/towhee) ```bash $ pip3 install towhee ``` > You can refer to [Getting Started with Towhee](https://towhee.io/) for more details. If you have any questions, you can [submit an issue to the towhee repository](https://github.com/towhee-io/towhee/issues). 2. Run it with Towhee ```python >>> from towhee import pipeline >>> img_path = 'path/to/your/image' >>> embedding_pipeline = pipeline('filip-halt/style-transfer-animegan') >>> embedding = embedding_pipeline(img_path) ``` ## How it works This pipeline includes one operator: [filip-halt/animegan-style-transfer](https://hub.towhee.io/filip-halt/animegan-style-transfer). This operator stylizes the image. > Refer [Towhee architecture](https://github.com/towhee-io/towhee#towhee-architecture) for basic concepts in Towhee: pipeline, operator, dataframe. ## References 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.