@ -14,27 +14,28 @@ This Operator generates feature vectors from the pytorch pretrained **Resnet50**
**Args:**
- model_name (`str`):
The model name for embedding, for example 'resnet50'.
- framework (`str`):
The framework of the model, the default is 'pytorch'.
- model_name:
- the model name for embedding
- supported types: `str`, for example 'resnet50'
- framework:
- the framework of the model
- supported types: `str`, default is 'pytorch'
`__call__(self, img_tensor: torch.Tensor)`
**Args:**
img_tensor (`torch.Tensor`):
The image tensor.
- img_tensor:
- the input image tensor
- supported types: `torch.Tensor`
**Returns:**
(`Tuple[('feature_vector', numpy.ndarray)]`)
The Operator returns a tuple `Tuple[('feature_vector', numpy.ndarray)]` containing following fields:
The embedding of image.
- feature_vector:
- the embedding of the image
- data type: `numpy.ndarray`
## Requirements
@ -42,7 +43,7 @@ You can get the required python package by [requirements.txt](./requirements.txt
## How it works
The `towhee/resnet50-image-embedding` Operator implements the function of image embedding, which can add to the pipeline, for example, it's the key Operator named embedding_model within [image-embedding-resnet50](https://hub.towhee.io/towhee/image-embedding-resnet50) pipeline, and it is the red box in the picture below.
The `towhee/resnet50-image-embedding` Operator implements the function of image embedding, which can add to the pipeline. For example, it's the key Operator named embedding_model within [image-embedding-resnet50](https://hub.towhee.io/towhee/image-embedding-resnet50) pipeline, and it is the red box in the picture below.