|
9 | 9 | from fastembed.image.image_embedding_base import ImageEmbeddingBase |
10 | 10 | from fastembed.image.onnx_image_model import ImageEmbeddingWorker, OnnxImageModel |
11 | 11 |
|
12 | | -supported_onnx_models = [ |
13 | | - { |
14 | | - "model": "Qdrant/clip-ViT-B-32-vision", |
15 | | - "dim": 512, |
16 | | - "description": "Image embeddings, Multimodal (text&image), 2021 year", |
17 | | - "license": "mit", |
18 | | - "size_in_GB": 0.34, |
19 | | - "sources": { |
20 | | - "hf": "Qdrant/clip-ViT-B-32-vision", |
21 | | - }, |
22 | | - "model_file": "model.onnx", |
23 | | - }, |
24 | | - { |
25 | | - "model": "Qdrant/resnet50-onnx", |
26 | | - "dim": 2048, |
27 | | - "description": "Image embeddings, Unimodal (image), 2016 year", |
28 | | - "license": "apache-2.0", |
29 | | - "size_in_GB": 0.1, |
30 | | - "sources": { |
31 | | - "hf": "Qdrant/resnet50-onnx", |
32 | | - }, |
33 | | - "model_file": "model.onnx", |
34 | | - }, |
35 | | - { |
36 | | - "model": "Qdrant/Unicom-ViT-B-16", |
37 | | - "dim": 768, |
38 | | - "description": "Image embeddings (more detailed than Unicom-ViT-B-32), Multimodal (text&image), 2023 year", |
39 | | - "license": "apache-2.0", |
40 | | - "size_in_GB": 0.82, |
41 | | - "sources": { |
42 | | - "hf": "Qdrant/Unicom-ViT-B-16", |
43 | | - }, |
44 | | - "model_file": "model.onnx", |
45 | | - }, |
46 | | - { |
47 | | - "model": "Qdrant/Unicom-ViT-B-32", |
48 | | - "dim": 512, |
49 | | - "description": "Image embeddings, Multimodal (text&image), 2023 year", |
50 | | - "license": "apache-2.0", |
51 | | - "size_in_GB": 0.48, |
52 | | - "sources": { |
53 | | - "hf": "Qdrant/Unicom-ViT-B-32", |
54 | | - }, |
55 | | - "model_file": "model.onnx", |
56 | | - }, |
57 | | - { |
58 | | - "model": "jinaai/jina-clip-v1", |
59 | | - "dim": 768, |
60 | | - "description": "Image embeddings, Multimodal (text&image), 2024 year", |
61 | | - "license": "apache-2.0", |
62 | | - "size_in_GB": 0.34, |
63 | | - "sources": { |
64 | | - "hf": "jinaai/jina-clip-v1", |
65 | | - }, |
66 | | - "model_file": "onnx/vision_model.onnx", |
67 | | - }, |
| 12 | +from fastembed.common.model_description import ModelDescription, ModelSource |
| 13 | + |
| 14 | +supported_onnx_models: list[ModelDescription] = [ |
| 15 | + ModelDescription( |
| 16 | + model="Qdrant/clip-ViT-B-32-vision", |
| 17 | + dim=512, |
| 18 | + description="Image embeddings, Multimodal (text&image), 2021 year", |
| 19 | + license="mit", |
| 20 | + size_in_GB=0.34, |
| 21 | + sources=ModelSource(hf="Qdrant/clip-ViT-B-32-vision"), |
| 22 | + model_file="model.onnx", |
| 23 | + ), |
| 24 | + ModelDescription( |
| 25 | + model="Qdrant/resnet50-onnx", |
| 26 | + dim=2048, |
| 27 | + description="Image embeddings, Unimodal (image), 2016 year", |
| 28 | + license="apache-2.0", |
| 29 | + size_in_GB=0.1, |
| 30 | + sources=ModelSource(hf="Qdrant/resnet50-onnx"), |
| 31 | + model_file="model.onnx", |
| 32 | + ), |
| 33 | + ModelDescription( |
| 34 | + model="Qdrant/Unicom-ViT-B-16", |
| 35 | + dim=768, |
| 36 | + description="Image embeddings (more detailed than Unicom-ViT-B-32), Multimodal (text&image), 2023 year", |
| 37 | + license="apache-2.0", |
| 38 | + size_in_GB=0.82, |
| 39 | + sources=ModelSource(hf="Qdrant/Unicom-ViT-B-16"), |
| 40 | + model_file="model.onnx", |
| 41 | + ), |
| 42 | + ModelDescription( |
| 43 | + model="Qdrant/Unicom-ViT-B-32", |
| 44 | + dim=512, |
| 45 | + description="Image embeddings, Multimodal (text&image), 2023 year", |
| 46 | + license="apache-2.0", |
| 47 | + size_in_GB=0.48, |
| 48 | + sources=ModelSource(hf="Qdrant/Unicom-ViT-B-32"), |
| 49 | + model_file="model.onnx", |
| 50 | + ), |
| 51 | + ModelDescription( |
| 52 | + model="jinaai/jina-clip-v1", |
| 53 | + dim=768, |
| 54 | + description="Image embeddings, Multimodal (text&image), 2024 year", |
| 55 | + license="apache-2.0", |
| 56 | + size_in_GB=0.34, |
| 57 | + sources=ModelSource(hf="jinaai/jina-clip-v1"), |
| 58 | + model_file="onnx/vision_model.onnx", |
| 59 | + ), |
68 | 60 | ] |
69 | 61 |
|
70 | 62 |
|
|
0 commit comments