Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

openai
/
clip-vit-base-patch32

Zero-Shot Image Classification
Transformers
PyTorch
google-tensorflow TensorFlow
JAX
clip
vision
Model card Files Files and versions
xet
Community
74

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

  • Libraries
  • Transformers

    How to use openai/clip-vit-base-patch32 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-patch32")
    pipe(
        "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png",
        candidate_labels=["animals", "humans", "landscape"],
    )
    # pip install -U transformers accelerate
    # Load model directly
    from transformers import AutoProcessor, AutoModelForZeroShotImageClassification
    
    processor = AutoProcessor.from_pretrained("openai/clip-vit-base-patch32")
    model = AutoModelForZeroShotImageClassification.from_pretrained("openai/clip-vit-base-patch32", device_map="auto")
  • Notebooks
  • Google Colab
  • Kaggle
clip-vit-base-patch32
1.82 GB
Ctrl+K
Ctrl+K
  • 4 contributors
History: 16 commits
drAbreu's picture
drAbreu
Could not find image processor class in the image processor config or the model config. Loading based on pattern matching with the model's feature extractor configuration. Please open a PR/issue to update to use instead of . This warning will be removed in v4.40.
65fa2a6 over 2 years ago
  • .gitattributes
    690 Bytes
    initial commit over 5 years ago
  • README.md
    7.94 kB
    Add widget example input (#2) about 4 years ago
  • config.json
    4.19 kB
    Update config.json about 4 years ago
  • flax_model.msgpack
    605 MB
    xet
    add model over 5 years ago
  • merges.txt
    525 kB
    add files over 5 years ago
  • preprocessor_config.json
    314 Bytes
    Could not find image processor class in the image processor config or the model config. Loading based on pattern matching with the model's feature extractor configuration. Please open a PR/issue to update to use instead of . This warning will be removed in v4.40. over 2 years ago
  • pytorch_model.bin
    605 MB
    xet
    add files over 5 years ago
  • special_tokens_map.json
    389 Bytes
    add files over 5 years ago
  • tf_model.h5
    606 MB
    xet
    add tf model almost 5 years ago
  • tokenizer.json
    2.22 MB
    update `tokenizer.json` for new CLIPTokenizerFast class over 4 years ago
  • tokenizer_config.json
    592 Bytes
    Updates incorrect tokenizer configuration file (#13) over 2 years ago
  • vocab.json
    862 kB
    add files over 5 years ago