Back to Trending
Modelzero-shot-image-classification
google

google/siglip-so400m-patch14-384

SigLIP (shape-optimized model) SigLIP model pre-trained on WebLi at resolution 384x384. It was introduced in the paper Sigmoid Loss for Language Image Pre-Training(https://arxiv.org/abs/2303.15343) by Zhai et al. and first released in this repositor...

697likes
808.1kdownloads
5views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: arxiv:2305.13035

#1 Repository of the week

2
TINIX TRENDING·Topic: arxiv:2209.06794

#2 Repository of the week

2
TINIX TRENDING·Topic: siglip

#2 Repository of the week

SigLIP (shape-optimized model)

SigLIP model pre-trained on WebLi at resolution 384x384. It was introduced in the paper Sigmoid Loss for Language Image Pre-Training by Zhai et al. and first released in this repository.

This model has the SoViT-400m architecture, which is the shape-optimized version as presented in Getting ViT in Shape: Scaling Laws for Compute-Optimal Model Design by Alabdulmohsin et al.

Disclaimer: The team releasing SigLIP did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

SigLIP is CLIP, a multimodal model, with a better loss function. The sigmoid loss operates solely on image-text pairs and does not require a global view of the pairwise similarities for normalization. This allows further scaling up the batch size, while also performing better at smaller batch sizes.

A TLDR of SigLIP by one of the authors can be found here.

Intended uses & limitations

You can use the raw model for tasks like zero-shot image classification and image-text retrieval. See the model hub to look for other versions on a task that interests you.

How to use

Here is how to use this model to perform zero-shot image classification:

from PIL import Image
import requests
from transformers import AutoProcessor, AutoModel
import torch

model = AutoModel.from_pretrained("google/siglip-so400m-patch14-384")
processor = AutoProcessor.from_pretrained("google/siglip-so400m-patch14-384")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

texts = ["a photo of 2 cats", "a photo of 2 dogs"]
inputs = processor(text=texts, images=image, padding="max_length", return_tensors="pt")

with torch.no_grad():
    outputs = model(**inputs)

logits_per_image = outputs.logits_per_image
probs = torch.sigmoid(logits_per_image) # these are the probabilities
print(f"{probs[0][0]:.1%} that image 0 is '{texts[0]}'")

Alternatively, one can leverage the pipeline API which abstracts away the complexity for the user:

from transformers import pipeline
from PIL import Image
import requests

# load pipe
image_classifier = pipeline(task="zero-shot-image-classification", model="google/siglip-so400m-patch14-384")

# load image
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
image = Image.open(requests.get(url, stream=True).raw)

# inference
outputs = image_classifier(image, candidate_labels=["2 cats", "a plane", "a remote"])
outputs = [{"score": round(output["score"], 4), "label": output["label"] } for output in outputs]
print(outputs)

For more code examples, we refer to the documentation.

Training procedure

Training data

SigLIP is pre-trained on the WebLI dataset (Chen et al., 2023).

Preprocessing

Images are resized/rescaled to the same resolution (384x384) and normalized across the RGB channels with mean (0.5, 0.5, 0.5) and standard deviation (0.5, 0.5, 0.5).

Texts are tokenized and padded to the same length (64 tokens).

Compute

The model was trained on 16 TPU-v4 chips for three days.

Evaluation results

Evaluation of SigLIP compared to CLIP is shown below (taken from the paper).

drawing

BibTeX entry and citation info

@misc{zhai2023sigmoid,
      title={Sigmoid Loss for Language Image Pre-Training}, 
      author={Xiaohua Zhai and Basil Mustafa and Alexander Kolesnikov and Lucas Beyer},
      year={2023},
      eprint={2303.15343},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Similar Projects

Discover other similar projects and AI models.

Modelzero-shot-image-classification
openai/clip-vit-base-patch32

Model Card: CLIP Disclaimer: The model card is taken and modified from the official CLIP repository, it can be found here(https://github.com/openai/CLIP/blob/main/model-card.md). Model Details The CLIP model was developed by researchers at OpenAI to...

♥0
16.4M
Feb 29, 2024
Modelzero-shot-image-classification
google/siglip2-giant-opt-patch16-384

SigLIP 2 Giant SigLIP 2(https://huggingface.co/papers/2502.14786) extends the pretraining objective of SigLIP(https://huggingface.co/papers/2303.15343) with prior, independently developed techniques into a unified recipe, for improved semantic under...

♥0
2.1M
Feb 21, 2025
Modelzero-shot-image-classification
google/siglip2-base-patch16-224

SigLIP 2 Base SigLIP 2(https://huggingface.co/papers/2502.14786) extends the pretraining objective of SigLIP(https://huggingface.co/papers/2303.15343) with prior, independently developed techniques into a unified recipe, for improved semantic unders...

♥0
1.2M
Feb 21, 2025
Modelzero-shot-image-classification
google/siglip-base-patch16-224

SigLIP (base-sized model) SigLIP model pre-trained on WebLi at resolution 224x224. It was introduced in the paper Sigmoid Loss for Language Image Pre-Training(https://arxiv.org/abs/2303.15343) by Zhai et al. and first released in this repository(htt...

♥0
904.6k
Sep 26, 2024
Modelzero-shot-image-classification
google/siglip2-so400m-patch14-384

SigLIP 2 So400m SigLIP 2(https://huggingface.co/papers/2502.14786) extends the pretraining objective of SigLIP(https://huggingface.co/papers/2303.15343) with prior, independently developed techniques into a unified recipe, for improved semantic unde...

♥0
702.1k
Feb 21, 2025
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
Modelzero-shot-image-classification
google/siglip2-base-patch16-naflex

SigLIP 2 Base SigLIP 2(https://huggingface.co/papers/2502.14786) extends the pretraining objective of SigLIP(https://huggingface.co/papers/2303.15343) with prior, independently developed techniques into a unified recipe, for improved semantic unders...

♥0
1.2M
Feb 21, 2025
Modelzero-shot-image-classification
google/medsiglip-448

MedSigLIP model card Model documentation: MedSigLIP(https://developers.google.com/health-ai-developer-foundations/medsiglip) Resources: Model on Google Cloud Model Garden: MedSigLIP(https://console.cloud.google.com/vertex-ai/publishers/google/model-...

♥0
20.4k
Jul 10, 2025
Modelimage-text-to-text
autotrust/JEV-27B-VL

autotrust/JEV-27B-VL JEV-27B that can see: the same System 1 decisions and System 2, now on images autotrust/JEV-27B-VL is autotrust/JEV-27B(https://huggingface.co/autotrust/JEV-27B) with vision. | | what it does | output | |---|---|---| | System 1...

♥0
63.7k
Oct 14, 2026