Browse Source
Update readme
Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
1 changed files with
1 additions and
16 deletions
-
README.md
|
@ -18,9 +18,7 @@ The default pretrained model weights are from [The 1st Place Solution of ISC21 ( |
|
|
Load an image from path './towhee.jpg' |
|
|
Load an image from path './towhee.jpg' |
|
|
and use the pretrained ISC model ('resnet50') to generate an image embedding. |
|
|
and use the pretrained ISC model ('resnet50') to generate an image embedding. |
|
|
|
|
|
|
|
|
*Write a same pipeline with explicit inputs/outputs name specifications:* |
|
|
|
|
|
|
|
|
|
|
|
- **option 1 (towhee>=0.9.0):** |
|
|
|
|
|
|
|
|
*Write a pipeline with explicit inputs/outputs name specifications:* |
|
|
|
|
|
|
|
|
```python |
|
|
```python |
|
|
from towhee.dc2 import pipe, ops, DataCollection |
|
|
from towhee.dc2 import pipe, ops, DataCollection |
|
@ -36,19 +34,6 @@ DataCollection(p('towhee.jpg')).show() |
|
|
``` |
|
|
``` |
|
|
<img src="./result.png" height="150px"/> |
|
|
<img src="./result.png" height="150px"/> |
|
|
|
|
|
|
|
|
- **option 2:** |
|
|
|
|
|
```python |
|
|
|
|
|
import towhee |
|
|
|
|
|
|
|
|
|
|
|
( |
|
|
|
|
|
towhee.glob['path']('./towhee.jpg') |
|
|
|
|
|
.image_decode['path', 'img']() |
|
|
|
|
|
.image_embedding.isc['img', 'vec']() |
|
|
|
|
|
.select['img', 'vec']() |
|
|
|
|
|
.show() |
|
|
|
|
|
) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
<br /> |
|
|
<br /> |
|
|
|
|
|
|
|
|
## Factory Constructor |
|
|
## Factory Constructor |
|
|