logo
Browse Source

add image into doc.

Signed-off-by: wxywb <xy.wang@zilliz.com>
main
wxywb 2 years ago
parent
commit
157235c87f
  1. 16
      README.md
  2. BIN
      tabular1.png
  3. BIN
      tabular2.png
  4. BIN
      vec1.png
  5. BIN
      vec2.png

16
README.md

@ -28,15 +28,15 @@ import towhee
towhee.glob('./teddy.jpg') \ towhee.glob('./teddy.jpg') \
.image_decode() \ .image_decode() \
.image_text_embedding.japanese_clip(model_name='clip_vit_b32', modality='image') \
.image_text_embedding.japanese_clip(model_name='japanese-clip-vit-b-16', modality='image') \
.show() .show()
towhee.dc(["スケートボードに乗っているテディベア。"]) \ towhee.dc(["スケートボードに乗っているテディベア。"]) \
.image_text_embedding.japanese_clip(model_name='clip_vit_b32', modality='text') \
.image_text_embedding.japanese_clip(model_name='japanese-clip-vit-b-16', modality='text') \
.show() .show()
``` ```
<img src="https://towhee.io/image-text-embedding/clip/raw/branch/main/vec1.png" alt="result1" style="height:20px;"/>
<img src="https://towhee.io/image-text-embedding/clip/raw/branch/main/vec2.png" alt="result2" style="height:20px;"/>
<img src="./vec1.png" alt="result1" style="height:20px;"/>
<img src="./vec2.png" alt="result2" style="height:20px;"/>
*Write a same pipeline with explicit inputs/outputs name specifications:* *Write a same pipeline with explicit inputs/outputs name specifications:*
@ -45,17 +45,17 @@ import towhee
towhee.glob['path']('./teddy.jpg') \ towhee.glob['path']('./teddy.jpg') \
.image_decode['path', 'img']() \ .image_decode['path', 'img']() \
.image_text_embedding.japanese_clip['img', 'vec'](model_name='clip_vit_b32', modality='image') \
.image_text_embedding.japanese_clip['img', 'vec'](model_name='japanese-clip-vit-b-16', modality='image') \
.select['img', 'vec']() \ .select['img', 'vec']() \
.show() .show()
towhee.dc['text'](["スケートボードに乗っているテディベア。"]) \ towhee.dc['text'](["スケートボードに乗っているテディベア。"]) \
.image_text_embedding.japanese_clip['text','vec'](model_name='clip_vit_b32', modality='text') \
.image_text_embedding.japanese_clip['text','vec'](model_name='japanese-clip-vit-b-16', modality='text') \
.select['text', 'vec']() \ .select['text', 'vec']() \
.show() .show()
``` ```
<img src="https://towhee.io/image-text-embedding/clip/raw/branch/main/tabular1.png" alt="result1" style="height:60px;"/>
<img src="https://towhee.io/image-text-embedding/clip/raw/branch/main/tabular2.png" alt="result2" style="height:60px;"/>
<img src="./tabular1.png" alt="result1" style="height:60px;"/>
<img src="./tabular2.png" alt="result2" style="height:60px;"/>
<br /> <br />

BIN
tabular1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

BIN
tabular2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
vec1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

BIN
vec2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Loading…
Cancel
Save