Instructions to use Qdrant/resnet50-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Qdrant/resnet50-onnx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Qdrant/resnet50-onnx") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Qdrant/resnet50-onnx", dtype="auto") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("Qdrant/resnet50-onnx", dtype="auto")Quick Links
ONNX port of microsoft/resnet-50.
This model is intended to be used for image classification and similarity searches.
You can find the ONNX port implementation here
Usage
Here's an example of performing inference using the model with FastEmbed.
from fastembed import ImageEmbedding
images = [
"./path/to/image1.jpg",
"./path/to/image2.jpg",
]
model = ImageEmbedding(model_name="Qdrant/resnet50-onnx")
embeddings = list(model.embed(images))
# [
# array([-0.1115, 0.0097, 0.0052, 0.0195, ...], dtype=float32),
# array([-0.1019, 0.0635, -0.0332, 0.0522, ...], dtype=float32)
# ]
- Downloads last month
- 428
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Qdrant/resnet50-onnx") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")