towhee
copied
Readme
Files and versions
1.1 KiB
Pipeline: Image Embedding using resnet50
Authors: Filip
Overview
The pipeline is used to extract the feature vector of a given image. It uses the the resnet50 model from Ross Wightman's timm
to generate the vector.
Interface
Input Arguments:
- img_path:
- the input image path
- supported types:
str
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
- shape: (1, 2048)
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
>>> img_path = 'path/to/your/image'
>>> embedding_pipeline = pipeline('towhee/image-embedding-resnet50')
>>> embedding = embedding_pipeline(img_path)
1.1 KiB
Pipeline: Image Embedding using resnet50
Authors: Filip
Overview
The pipeline is used to extract the feature vector of a given image. It uses the the resnet50 model from Ross Wightman's timm
to generate the vector.
Interface
Input Arguments:
- img_path:
- the input image path
- supported types:
str
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
- shape: (1, 2048)
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
>>> img_path = 'path/to/your/image'
>>> embedding_pipeline = pipeline('towhee/image-embedding-resnet50')
>>> embedding = embedding_pipeline(img_path)