logo
Browse Source

Update

Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
main
shiyu22 2 years ago
parent
commit
b3bf21ff6c
  1. 11
      README.md
  2. BIN
      readme_res/pipeline.png

11
README.md

@ -4,15 +4,15 @@ Authors: derekdqc
## Overview
The pipeline is used to **extract the feature vector of a given image**. It first normalizes the image and then uses Resnet50 model to generate the vector.
The pipeline is used to **extract the feature vector of a given image**. It uses Resnet50 model to generate the vector.
## Interface
**Input Arguments:**
- img_path:
- the input image to be encoded
- supported types: `str` (path of the image)
- path to the input image
- supported types: `str`
**Pipeline Output:**
@ -38,12 +38,13 @@ $ pip3 install towhee
>>> from towhee import pipeline
>>> embedding_pipeline = pipeline('towhee/image-embedding-resnet50')
>>> embedding = embedding_pipeline('path/to/your/image')
>>> embedding = embedding_pipeline('path/to/your/image') #such as './readme_res/pipeline.png'
```
## How it works
This pipeline includes two main operators: [transform image](https://hub.towhee.io/towhee/transform-image-operator-template) (implemented as [towhee/transform-image](https://hub.towhee.io/towhee/transform-image)) and [image embedding](https://hub.towhee.io/towhee/image-embedding-operator-template) (implemented as [towhee/resnet-image-embedding](https://hub.towhee.io/towhee/resnet-image-embedding)). The transform image operator will first convert the original image into a normalized format, such as with 512x512 resolutions. Then, the normalized image will be encoded via image embedding operator, and finally we get a feature vector of the given image.
This pipeline includes one operator: [image embedding](https://hub.towhee.io/towhee/image-embedding-operator-template) (implemented as [towhee/resnet-image-embedding](https://hub.towhee.io/towhee/resnet-image-embedding)). The image will be encoded via image embedding operator, then we can get a feature vector of the given image.
> Refer [Towhee architecture](https://github.com/towhee-io/towhee#towhee-architecture) for basic concepts in Towhee: pipeline, operator, dataframe.

BIN
readme_res/pipeline.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 KiB

After

Width:  |  Height:  |  Size: 215 KiB

Loading…
Cancel
Save