diff --git a/README.md b/README.md index 5bf5d10..a038b36 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,23 @@ # Animating using AnimeGanV2 *author: Filip Haltmayer* + + +
+ + + ## Description Convert an image into an animated image using [`AnimeganV2`](https://github.com/TachibanaYoshino/AnimeGANv2). + +
+ + + + ## Code Example Load an image from path './test.png'. @@ -14,27 +26,36 @@ Load an image from path './test.png'. ```python import towhee -towhee.glob('/Users/chenshiyu/workspace/data/pic/test.png') \ +towhee.glob('./test.png') \ .image_decode.cv2() \ .img2img_translation.animegan(model_name = 'hayao') \ .show() ``` -results1 + *Write a same pipeline with explicit inputs/outputs name specifications:* ```python import towhee -towhee.glob['path']('/Users/chenshiyu/workspace/data/pic/test.png') \ +towhee.glob['path']('./test.png') \ .image_decode.cv2['path', 'origin']() \ - .img2img_translation.animegan['origin', 'transformed'](model_name = 'hayao') \ - .select('origin', 'transformed') \ + .img2img_translation.animegan['origin', 'facepaintv2'](model_name = 'facepaintv2') \ + .img2img_translation.animegan['origin', 'hayao'](model_name = 'hayao') \ + .img2img_translation.animegan['origin', 'paprika'](model_name = 'paprika') \ + .img2img_translation.animegan['origin', 'shinkai'](model_name = 'shinkai') \ + .select('origin', 'facepaintv2', 'hayao', 'paprika', 'shinkai') \ .show() ``` -results1 +results1 + + + +
+ + ## Factory Constructor @@ -50,6 +71,12 @@ Model options: - paprika - shinkai + + +
+ + + ## Interface Takes in a numpy rgb image in channels first. It transforms input into animated image in numpy form. @@ -67,11 +94,17 @@ Takes in a numpy rgb image in channels first. It transforms input into animated -**Returns**: *numpy.ndarray* +**Returns**: *towhee.types.Image (a sub-class of dumpy.ndarray)* ​ The new image. + +
+ + + + ## Reference Jie Chen, Gang Liu, Xin Chen diff --git a/results2.png b/results2.png index 4438a54..f8aa53e 100644 Binary files a/results2.png and b/results2.png differ diff --git a/test.png b/test.png new file mode 100755 index 0000000..c3ca0be Binary files /dev/null and b/test.png differ