From e57956b94c575fe84acfe35eb1864b627ed7b1ce Mon Sep 17 00:00:00 2001 From: shiyu22 Date: Thu, 16 Dec 2021 13:29:03 +0800 Subject: [PATCH] Update README Signed-off-by: shiyu22 --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 544e653..3a189d2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Pipeline: Image Embedding using Resnet50 -Authors: derekdqc, shiyu22 +Authors: derekdqc ## Overview @@ -38,16 +38,14 @@ $ pip3 install towhee >>> from towhee import pipeline >>> from PIL import Image ->>> img = Image.open('path/to/your/image') # for example, './test.jpg' +>>> img = Image.open('path/to/your/image') >>> embedding_pipeline = pipeline('towhee/image-embedding-resnet50') >>> embedding = embedding_pipeline(img) ``` -> This pipeline uses the resnet50 model, you can also change the parameters `resnet50` in the local file **~/.towhee/image_embedding_resnet50&towhee$main/image_embedding_resnet.yaml** to the `resnet101` model. - ## How it works -This pipeline includes two main operators: [transform image](https://hub.towhee.io/towhee/transform-image-operator-class) (implemented as [towhee/transform-image](https://hub.towhee.io/towhee/transform-image)) and [image embedding](https://hub.towhee.io/towhee/image-embedding-operator-class) (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 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. > Refer [Towhee architecture](https://github.com/towhee-io/towhee#towhee-architecture) for basic concepts in Towhee: pipeline, operator, dataframe.