> <font color=red>**Note:** this is just a **template**, not a runnable pipeline.</font>
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](./image_embedding_pipeline_template.yaml) and update this README file. FYI, [image-embedding-resnet50](https://hub.towhee.io/towhee/image-embedding-resnet50) is based on this template.
This pipeline is used to **extract the feature vector of the image**. It first normalizes the image and then uses a model to generate the vector.
## Interface
**Input Arguments:**
- img_tensor:
- the input image to be encoded
- supported types: `PIL.Image`
**Pipeline Output:**
The pipeline returns a tuple `Tuple[('cnn', numpy.ndarray)]` containing following fields:
> You can refer to [Getting Started with Towhee](https://towhee.io/) for more details. If you have any questions, you can [submit an issue to the towhee repository](https://github.com/towhee-io/towhee/issues).
2. Run it with Towhee
```Python
>>> from towhee import pipeline
>>> from PIL import Image
>>> img = Image.open('path/to/your/image') #for example './test.jpg'
>>> embedding_pipeline = pipeline('user/repo_name') #the pipeline repo, such as 'towhee/image-embedding-resnet50'
>>> embedding = embedding_pipeline(img)
```
## **How it works**
This pipeline includes two main operators: [transform image](https://hub.towhee.io/towhee/transform-image-operator-template) and [image embedding](https://hub.towhee.io/towhee/image-embedding-operator-template). 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.