Downloads · 30 days
8
14% of all-time downloads
brishen/CLIP-ViT-H-14-laion2B-s32B-b79K-onnx
CLIP-ViT-H-14-laion2B-s32B-b79K-onnx is a zero-shot image classification model from brishen. Use it for the zero-shot image classification task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
ONNX export of laion/CLIP-ViT-H-14-laion2B-s32B-b79K, produced with optimum-onnx (task=zero-shot-image-classification). Weights are unmodified; only the graph/serialization format changed. See the base model for licen…
Downloads · 30 days
8
14% of all-time downloads
All-time downloads
56
Public
Repo size
3.9 GB
Likes
0
Public
Click a slice to open those files.
.onnx_data3.9 GB · 100%
From the Hugging Face model README
ONNX export of laion/CLIP-ViT-H-14-laion2B-s32B-b79K,
produced with optimum-onnx (task=zero-shot-image-classification).
Weights are unmodified; only the graph/serialization format changed. See the base model for license (MIT) and details.
from transformers import CLIPProcessor
import onnxruntime as ort
processor = CLIPProcessor.from_pretrained("brishen/CLIP-ViT-H-14-laion2B-s32B-b79K-onnx")
sess = ort.InferenceSession("model.onnx") # + model.onnx_data alongside it
inputs = processor(text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="np", padding=True)
logits_per_image = sess.run(["logits_per_image"], dict(inputs))[0]
Or via optimum.onnxruntime.ORTModelForZeroShotImageClassification.