OpenCLIP (LAION-2B)
Collection
6 items • Updated
How to use cs-giung/clip-vit-giant-patch14-laion2b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("zero-shot-image-classification", model="cs-giung/clip-vit-giant-patch14-laion2b")
pipe(
"https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png",
candidate_labels=["animals", "humans", "landscape"],
) # Load model directly
from transformers import AutoProcessor, AutoModelForZeroShotImageClassification
processor = AutoProcessor.from_pretrained("cs-giung/clip-vit-giant-patch14-laion2b")
model = AutoModelForZeroShotImageClassification.from_pretrained("cs-giung/clip-vit-giant-patch14-laion2b")Contrastive Language-Image Pretraining (CLIP) model pre-trained on LAION-2B at resolution 224x224. It was introduced in the paper Learning Transferable Visual Models From Natural Language Supervision and further reproduced in the follow-up paper Reproducible scaling laws for contrastive language-image learning.
The weights were converted from the laion/CLIP-ViT-g-14-laion2B-s34B-b88K presented in the OpenCLIP LAION-2B collections.