|
@ -27,25 +27,25 @@ Load an image from path './test.png'. |
|
|
import towhee |
|
|
import towhee |
|
|
|
|
|
|
|
|
towhee.glob('./test.png') \ |
|
|
towhee.glob('./test.png') \ |
|
|
.image_decode.cv2() \ |
|
|
|
|
|
|
|
|
.image_decode() \ |
|
|
.img2img_translation.animegan(model_name = 'hayao') \ |
|
|
.img2img_translation.animegan(model_name = 'hayao') \ |
|
|
.show() |
|
|
.show() |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
<img src="./results1.png" height="150px"/> |
|
|
<img src="./results1.png" height="150px"/> |
|
|
|
|
|
|
|
|
*Write a same pipeline with explicit inputs/outputs name specifications:* |
|
|
|
|
|
|
|
|
*Write a pipeline with explicit inputs/outputs name specifications:* |
|
|
|
|
|
|
|
|
```python |
|
|
```python |
|
|
import towhee |
|
|
import towhee |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
towhee.glob['path']('./test.png') \ |
|
|
towhee.glob['path']('./test.png') \ |
|
|
.image_decode.cv2['path', 'origin']() \ |
|
|
|
|
|
|
|
|
.image_decode['path', 'origin']() \ |
|
|
.img2img_translation.animegan['origin', 'facepaintv2'](model_name = 'facepaintv2') \ |
|
|
.img2img_translation.animegan['origin', 'facepaintv2'](model_name = 'facepaintv2') \ |
|
|
.img2img_translation.animegan['origin', 'hayao'](model_name = 'hayao') \ |
|
|
.img2img_translation.animegan['origin', 'hayao'](model_name = 'hayao') \ |
|
|
.img2img_translation.animegan['origin', 'paprika'](model_name = 'paprika') \ |
|
|
.img2img_translation.animegan['origin', 'paprika'](model_name = 'paprika') \ |
|
|
.img2img_translation.animegan['origin', 'shinkai'](model_name = 'shinkai') \ |
|
|
.img2img_translation.animegan['origin', 'shinkai'](model_name = 'shinkai') \ |
|
|
.select('origin', 'facepaintv2', 'hayao', 'paprika', 'shinkai') \ |
|
|
|
|
|
|
|
|
.select['origin', 'facepaintv2', 'hayao', 'paprika', 'shinkai']() \ |
|
|
.show() |
|
|
.show() |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|