towhee
Readme
Files and versions
2.1 KiB
Template: Image Embedding Pipeline
Authors:
Overview
Note: this is just a template, not a runnable pipeline.
This pipeline cannot be run, which is the template for the image embedding pipeline class and defines YAML template file for embedding images, as well as the standard inputs and outputs. You can complete the pipeline by filling in the parameters(init_args
) of the Operator section in image_embedding_pipeline_template.yaml and update this README file. FYI, image-embedding-resnet50 is based on this template.
This pipeline is used to extract the feature vector of the image. It uses XX model to generate the vector.
Interface
Input Arguments:
- img_path:
- the input image to be encoded
- supported types:
str
(path to the image)
Pipeline Output:
The pipeline returns a tuple Tuple[('feature_vector', numpy.ndarray)]
containing following fields:
- feature_vector:
- the embedding of input image
- data type:
numpy.ndarray
How to use
- Install Towhee
$ pip3 install towhee
You can refer to Getting Started with Towhee for more details. If you have any questions, you can submit an issue to the towhee repository.
- Run it with Towhee
>>> from towhee import pipeline
>>> embedding_pipeline = pipeline('user/repo_name') #the pipeline repo, such as 'towhee/image-embedding-resnet50'
>>> embedding = embedding_pipeline('path/to/your/image') #such as './readme_res/pipeline.png'
How it works
This pipeline includes one operator: 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 for basic concepts in Towhee: pipeline, operator, dataframe.
2.1 KiB
Template: Image Embedding Pipeline
Authors:
Overview
Note: this is just a template, not a runnable pipeline.
This pipeline cannot be run, which is the template for the image embedding pipeline class and defines YAML template file for embedding images, as well as the standard inputs and outputs. You can complete the pipeline by filling in the parameters(init_args
) of the Operator section in image_embedding_pipeline_template.yaml and update this README file. FYI, image-embedding-resnet50 is based on this template.
This pipeline is used to extract the feature vector of the image. It uses XX model to generate the vector.
Interface
Input Arguments:
- img_path:
- the input image to be encoded
- supported types:
str
(path to the image)
Pipeline Output:
The pipeline returns a tuple Tuple[('feature_vector', numpy.ndarray)]
containing following fields:
- feature_vector:
- the embedding of input image
- data type:
numpy.ndarray
How to use
- Install Towhee
$ pip3 install towhee
You can refer to Getting Started with Towhee for more details. If you have any questions, you can submit an issue to the towhee repository.
- Run it with Towhee
>>> from towhee import pipeline
>>> embedding_pipeline = pipeline('user/repo_name') #the pipeline repo, such as 'towhee/image-embedding-resnet50'
>>> embedding = embedding_pipeline('path/to/your/image') #such as './readme_res/pipeline.png'
How it works
This pipeline includes one operator: 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 for basic concepts in Towhee: pipeline, operator, dataframe.