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

  • Log In
  • Sign Up

BAAI
/
AltCLIP-m18

Zero-Shot Image Classification
Transformers
PyTorch
altclip
Model card Files Files and versions
xet
Community
2

Instructions to use BAAI/AltCLIP-m18 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use BAAI/AltCLIP-m18 with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("zero-shot-image-classification", model="BAAI/AltCLIP-m18")
    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("BAAI/AltCLIP-m18")
    model = AutoModelForZeroShotImageClassification.from_pretrained("BAAI/AltCLIP-m18")
  • Notebooks
  • Google Colab
  • Kaggle
AltCLIP-m18
4.8 GB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 11 commits
xingzhaohu's picture
xingzhaohu
Update README.md
4e7c13d about 3 years ago
  • .gitattributes
    1.53 kB
    Upload 5 files about 3 years ago
  • README.md
    17 kB
    Update README.md about 3 years ago
  • config.json
    4.99 kB
    Update config.json about 3 years ago
  • preprocessor_config.json
    559 Bytes
    Upload 5 files about 3 years ago
  • pytorch_model.bin

    Detected Pickle imports (4)

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

    What is a pickle import?

    4.78 GB
    xet
    Upload pytorch_model.bin about 3 years ago
  • sentencepiece.bpe.model
    5.07 MB
    xet
    Upload 5 files about 3 years ago
  • special_tokens_map.json
    280 Bytes
    Upload 5 files about 3 years ago
  • tokenizer.json
    17.1 MB
    xet
    Upload 5 files about 3 years ago
  • tokenizer_config.json
    517 Bytes
    Update tokenizer_config.json about 3 years ago