logo
Browse Source

Add README

Signed-off-by: shiyu22 <shiyu.chen@zilliz.com>
main
shiyu22 2 years ago
parent
commit
647118ebe2
  1. 22
      README.md

22
README.md

@ -8,7 +8,7 @@ An image embedding pipeline generates a vector given an image. This Pipeline ext
## Code Example ## Code Example
- Create image embedding pipeline with the default configuration.
### Create pipeline with the default configuration
```python ```python
from towhee import AutoPipes from towhee import AutoPipes
@ -18,9 +18,9 @@ res = p('https://github.com/towhee-io/towhee/raw/main/towhee_logo.png')
res.get() res.get()
``` ```
- Create image embedding pipeline and set the configuration.
### Create pipeline and set the configuration
> More parameters refer to the API Interface.
> More parameters refer to the Configuration.
```python ```python
from towhee import AutoPipes, AutoConfig from towhee import AutoPipes, AutoConfig
@ -35,9 +35,9 @@ res.get()
## **Interface**
## **Configuration**
**ImageEmbeddingConfig**
### **ImageEmbeddingConfig**
> You can find some parameters in [image_decode.cv2](https://towhee.io/image-decode/cv2) and [image_embedding.timm](https://towhee.io/image-embedding/timm) operators. > You can find some parameters in [image_decode.cv2](https://towhee.io/image-decode/cv2) and [image_embedding.timm](https://towhee.io/image-embedding/timm) operators.
@ -63,5 +63,17 @@ The number of GPU device, defaults to -1, which means using CPU.
## Interface
Encode the image and generate embedding vectors.
**Parameters:**
***img***: str
Path or url of the image to be loaded.
**Returns:** np.ndarray
Embedding vectors to represent the image.

Loading…
Cancel
Save