Browse Source
Update
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
5 changed files with
2 additions and
16 deletions
-
README.md
-
BIN
result.png
-
BIN
result1.png
-
BIN
result2.png
-
BIN
towhee.jpeg
|
|
@ -18,21 +18,7 @@ To achieve higher accuracy in image classification, SWAG uses hashtags to perfor |
|
|
|
Load an image from path './towhee.jpg' |
|
|
|
and use the pretrained SWAG model 'vit_b16_in1k' to generate an image embedding. |
|
|
|
|
|
|
|
*Write the pipeline in simplified style:* |
|
|
|
|
|
|
|
```python |
|
|
|
import towhee |
|
|
|
|
|
|
|
( |
|
|
|
towhee.glob('./towhee.jpg') |
|
|
|
.image_decode() |
|
|
|
.image_embedding.swag(model_name='vit_b16_in1k') |
|
|
|
.show() |
|
|
|
) |
|
|
|
``` |
|
|
|
<img src="./result1.png" width="800px"/> |
|
|
|
|
|
|
|
*Write a same pipeline with explicit inputs/outputs name specifications:* |
|
|
|
*Write a pipeline with explicit inputs/outputs name specifications:* |
|
|
|
|
|
|
|
```python |
|
|
|
import towhee |
|
|
@ -45,7 +31,7 @@ import towhee |
|
|
|
.show() |
|
|
|
) |
|
|
|
``` |
|
|
|
<img src="./result2.png" width="800px"/> |
|
|
|
<img src="./result.png" width="800px"/> |
|
|
|
|
|
|
|
<br /> |
|
|
|
|
|
|
|
Width:
|
Height:
|
Size: 80 KiB
|
Width:
|
Height:
|
Size: 3.9 KiB
|
Width:
|
Height:
|
Size: 81 KiB
|
Width:
|
Height:
|
Size: 49 KiB
|