ILSVRC/imagenet-1k
Viewer • Updated • 1.43M • 94.7k • 798
How to use LEAF-CLIP/OpenCLIP-ViT-bigG-rho50-k1-constrained with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("feature-extraction", model="LEAF-CLIP/OpenCLIP-ViT-bigG-rho50-k1-constrained") # Load model directly
from transformers import AutoProcessor, AutoModelForZeroShotImageClassification
processor = AutoProcessor.from_pretrained("LEAF-CLIP/OpenCLIP-ViT-bigG-rho50-k1-constrained")
model = AutoModelForZeroShotImageClassification.from_pretrained("LEAF-CLIP/OpenCLIP-ViT-bigG-rho50-k1-constrained")Model Initialized from laion/CLIP-ViT-bigG-14-laion2B-39B-b160k. The text encoder is finetuned with LEAF at $k=1$ with $\rho=50$ and semantic constraints.
To load this model use:
from transformers import CLIPProcessor, CLIPModel
model_name = "LEAF-CLIP/OpenCLIP-ViT-bigG-rho50-k1-constrained"
processor_name = "laion/CLIP-ViT-bigG-14-laion2B-39B-b160k"
model = CLIPModel.from_pretrained(model_name)
processor = CLIPProcessor.from_pretrained(processor_name)
Base model
laion/CLIP-ViT-bigG-14-laion2B-39B-b160k