mirror of
https://github.com/qdrant/fastembed.git
synced 2026-09-29 01:18:01 -05:00
3.8 KiB
3.8 KiB
In [5]:
from fastembed import ImageEmbedding
model = ImageEmbedding("Qdrant/resnet50-onnx")
embeddings_generator = model.embed(
["../../tests/misc/image.jpeg", "../../tests/misc/small_image.jpeg"]
)
embeddings_list = list(embeddings_generator)
embeddings_listOut [5]:
Fetching 3 files: 100%|██████████| 3/3 [00:00<00:00, 47482.69it/s]
[array([0. , 0. , 0. , ..., 0. , 0.01139933,
0. ], dtype=float32),
array([0.02169187, 0. , 0. , ..., 0. , 0.00848291,
0. ], dtype=float32)]In [6]:
ImageEmbedding.list_supported_models()Out [6]:
[{'model': 'Qdrant/clip-ViT-B-32-vision',
'dim': 512,
'description': 'CLIP vision encoder based on ViT-B/32',
'size_in_GB': 0.34,
'sources': {'hf': 'Qdrant/clip-ViT-B-32-vision'},
'model_file': 'model.onnx'},
{'model': 'Qdrant/resnet50-onnx',
'dim': 2048,
'description': 'ResNet-50 from `Deep Residual Learning for Image Recognition <https://arxiv.org/abs/1512.03385>`__.',
'size_in_GB': 0.1,
'sources': {'hf': 'Qdrant/resnet50-onnx'},
'model_file': 'model.onnx'}]