Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

openai
/
clip-vit-base-patch16

Zero-Shot Image Classification
Transformers
PyTorch
JAX
clip
vision
Model card Files Files and versions
xet
Community
18

Instructions to use openai/clip-vit-base-patch16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use openai/clip-vit-base-patch16 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("zero-shot-image-classification", model="openai/clip-vit-base-patch16")
    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("openai/clip-vit-base-patch16")
    model = AutoModelForZeroShotImageClassification.from_pretrained("openai/clip-vit-base-patch16")
  • Notebooks
  • Google Colab
  • Kaggle
clip-vit-base-patch16
1.2 GB
Ctrl+K
Ctrl+K
  • 3 contributors
History: 11 commits
mishig's picture
mishig HF Staff
Add widget example input (#3)
57c2164 over 3 years ago
  • .gitattributes
    1.18 kB
    initial commit over 4 years ago
  • README.md
    7.93 kB
    Add widget example input (#3) over 3 years ago
  • config.json
    4.1 kB
    Update config.json over 3 years ago
  • flax_model.msgpack
    598 MB
    xet
    add flax model over 4 years ago
  • merges.txt
    525 kB
    add tokenizer over 4 years ago
  • preprocessor_config.json
    316 Bytes
    add tokenizer over 4 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

    • "torch._utils._rebuild_tensor_v2",
    • "torch.FloatStorage",
    • "collections.OrderedDict",
    • "torch.LongStorage"

    What is a pickle import?

    599 MB
    xet
    add model over 4 years ago
  • special_tokens_map.json
    389 Bytes
    add tokenizer over 4 years ago
  • tokenizer.json
    2.22 MB
    add tokenizer.json about 4 years ago
  • tokenizer_config.json
    905 Bytes
    add tokenizer.json about 4 years ago
  • vocab.json
    961 kB
    add tokenizer over 4 years ago