File size: 801 Bytes
0e77bf0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
---
license: apache-2.0
pipeline_tag: image-feature-extraction
---
ONNX port of [Unicom](https://arxiv.org/abs/2304.05884) model from [open-metric-learning](https://github.com/OML-Team/open-metric-learning).
This model is intended to be used for similarity search.
### Usage
Here's an example of performing inference using the model with [FastEmbed](https://github.com/qdrant/fastembed).
```py
from fastembed import ImageEmbedding
images = [
"./path/to/image1.jpg",
"./path/to/image2.jpg",
]
model = ImageEmbedding(model_name="Qdrant/Unicom-ViT-B-32")
embeddings = list(model.embed(images))
# [
# array([ 0.04177791, 0.0550059 , 0.00025418, 0.0252876 , ..., dtype=float32),
# array([2.23932182e-03, 4.68995124e-02, 3.28772422e-03, 7.57176951e-02, ...], dtype=float32)
# ]
``` |