diff --git a/README.md b/README.md index f329ad8..9e34d19 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ An image embedding pipeline generates a vector given an image. This Pipeline ext ## Code Example -- Create image embedding pipeline with the default configuration. +### Create pipeline with the default configuration ```python from towhee import AutoPipes @@ -18,9 +18,9 @@ res = p('https://github.com/towhee-io/towhee/raw/main/towhee_logo.png') 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 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. @@ -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.