|
@ -28,11 +28,11 @@ import towhee |
|
|
|
|
|
|
|
|
towhee.glob('./teddy.jpg') \ |
|
|
towhee.glob('./teddy.jpg') \ |
|
|
.image_decode() \ |
|
|
.image_decode() \ |
|
|
.image_text_embedding.lightningdot(modality='image') \ |
|
|
|
|
|
|
|
|
.image_text_embedding.lightningdot(model_name='lightningdot_base', modality='image') \ |
|
|
.show() |
|
|
.show() |
|
|
|
|
|
|
|
|
towhee.dc(["A teddybear on a skateboard in Times Square."]) \ |
|
|
towhee.dc(["A teddybear on a skateboard in Times Square."]) \ |
|
|
.image_text_embedding.lightningdot(modality='text') \ |
|
|
|
|
|
|
|
|
.image_text_embedding.lightningdot(model_name='lightningdot_base', modality='text') \ |
|
|
.show() |
|
|
.show() |
|
|
``` |
|
|
``` |
|
|
<img src="https://towhee.io/image-text-embedding/lightningdot/raw/branch/main/vec1.png" alt="result1" style="height:20px;"/> |
|
|
<img src="https://towhee.io/image-text-embedding/lightningdot/raw/branch/main/vec1.png" alt="result1" style="height:20px;"/> |
|
@ -45,12 +45,12 @@ import towhee |
|
|
|
|
|
|
|
|
towhee.glob['path']('./teddy.jpg') \ |
|
|
towhee.glob['path']('./teddy.jpg') \ |
|
|
.image_decode['path', 'img']() \ |
|
|
.image_decode['path', 'img']() \ |
|
|
.image_text_embedding.lightningdot['img', 'vec'](modality='image') \ |
|
|
|
|
|
|
|
|
.image_text_embedding.lightningdot['img', 'vec'](model_name='lightningdot_base', modality='image') \ |
|
|
.select['img', 'vec']() \ |
|
|
.select['img', 'vec']() \ |
|
|
.show() |
|
|
.show() |
|
|
|
|
|
|
|
|
towhee.dc['text'](["A teddybear on a skateboard in Times Square."]) \ |
|
|
towhee.dc['text'](["A teddybear on a skateboard in Times Square."]) \ |
|
|
.image_text_embedding.lightningdot['text','vec'](modality='text') \ |
|
|
|
|
|
|
|
|
.image_text_embedding.lightningdot['text','vec'](model_name='lightningdot_base', modality='text') \ |
|
|
.select['text', 'vec']() \ |
|
|
.select['text', 'vec']() \ |
|
|
.show() |
|
|
.show() |
|
|
``` |
|
|
``` |
|
|