Browse Source
Update
Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
main
3 changed files with
9 additions and
11 deletions
-
README.md
-
image_embedding_resnet50.yaml
-
BIN
readme_res/pipeline.png
|
|
@ -10,9 +10,9 @@ The pipeline is used to **extract the feature vector of a given image**. It firs |
|
|
|
|
|
|
|
**Input Arguments:** |
|
|
|
|
|
|
|
- image: |
|
|
|
- img_path: |
|
|
|
- the input image to be encoded |
|
|
|
- supported types: `PIL.Image` |
|
|
|
- supported types: `str` (path of the image) |
|
|
|
|
|
|
|
**Pipeline Output:** |
|
|
|
|
|
|
@ -36,11 +36,9 @@ $ pip3 install towhee |
|
|
|
|
|
|
|
```python |
|
|
|
>>> from towhee import pipeline |
|
|
|
>>> from PIL import Image |
|
|
|
|
|
|
|
>>> img = Image.open('path/to/your/image') |
|
|
|
>>> embedding_pipeline = pipeline('towhee/image-embedding-resnet50') |
|
|
|
>>> embedding = embedding_pipeline(img) |
|
|
|
>>> embedding = embedding_pipeline('path/to/your/image') |
|
|
|
``` |
|
|
|
|
|
|
|
## How it works |
|
|
|
|
|
@ -7,7 +7,7 @@ operators: |
|
|
|
inputs: |
|
|
|
- |
|
|
|
df: '_start_df' |
|
|
|
name: 'img' |
|
|
|
name: 'img_path' |
|
|
|
col: 0 |
|
|
|
outputs: |
|
|
|
- |
|
|
@ -23,7 +23,7 @@ operators: |
|
|
|
inputs: |
|
|
|
- |
|
|
|
df: 'image' |
|
|
|
name: 'img' |
|
|
|
name: 'img_path' |
|
|
|
col: 0 |
|
|
|
outputs: |
|
|
|
- |
|
|
@ -65,14 +65,14 @@ dataframes: |
|
|
|
name: '_start_df' |
|
|
|
columns: |
|
|
|
- |
|
|
|
name: 'img' |
|
|
|
vtype: 'PIL.Image' |
|
|
|
name: 'img_path' |
|
|
|
vtype: 'str' |
|
|
|
- |
|
|
|
name: 'image' |
|
|
|
columns: |
|
|
|
- |
|
|
|
name: 'img' |
|
|
|
vtype: 'PIL.Image' |
|
|
|
name: 'img_path' |
|
|
|
vtype: 'str' |
|
|
|
- |
|
|
|
name: 'image_preproc' |
|
|
|
columns: |
|
|
|
Width:
|
Height:
|
Size: 263 KiB
Width:
|
Height:
|
Size: 264 KiB
|