Downloads · 30 days
5
4% of all-time downloads
zeromodels/siglip2_so400m_p16_384
siglip2_so400m_p16_384 is a zero-shot image classification model from zeromodels. Use it for the zero-shot image classification task on the model card, and read the license before you ship it in a product. It is set up for zeromodels. The card lists the license as apache-2.0.
[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/siglip2/) [](https://huggingface.co/collections/zeromodels/siglip2-6a8eaf393fde5bbc3359a5e8)
Downloads · 30 days
5
4% of all-time downloads
All-time downloads
113
Public
Repo size
4.6 GB
Likes
0
Public
Click a slice to open those files.
.h54.5 GB · 99%
From the Hugging Face model README
Paper: SigLIP 2: Multilingual Vision-Language Encoders with Improved Semantic Understanding, Localization, and Dense Features (arXiv:2502.14786) · HF Papers
SigLIP 2 keeps SigLIP's sigmoid loss and adds captioning-based pretraining, self-distillation, and masked prediction for stronger dense features. It uses a 256k multilingual Gemma vocabulary, so many languages work without a separate multilingual checkpoint.
For more details on the model, please go to the upstream model card.
Pure-Keras 3 conversion of google/siglip2-so400m-patch16-384 for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX.
This is a zero-shot image-text checkpoint (SigLIP2ZeroShotClassify): pass image(s) and text prompts at inference time.
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from zeromodels.models.siglip2 import (
SigLIP2Processor,
SigLIP2ZeroShotClassify,
)
processor = SigLIP2Processor.from_weights("zeromodels/siglip2_so400m_p16_384")
model = SigLIP2ZeroShotClassify.from_weights("zeromodels/siglip2_so400m_p16_384")
labels = [
"a photo of a cat",
"a photo of a dog",
"a photo of a car",
"a photo of a living room",
]
inputs = processor(text=labels, image_paths="your_image.jpg")
output = model(
{
"images": inputs["images"],
"token_ids": inputs["input_ids"],
}
)
print(output["image_logits"].shape)
Load any SigLIP 2 variant the same way with from_weights("zeromodels/<variant>"):
| Variant | Hub |
|---|---|
siglip2_base_p16_224 | zeromodels/siglip2_base_p16_224 |
siglip2_base_p16_256 | zeromodels/siglip2_base_p16_256 |
siglip2_base_p16_384 | zeromodels/siglip2_base_p16_384 |
siglip2_base_p16_512 | zeromodels/siglip2_base_p16_512 |
siglip2_base_p32_256 | zeromodels/siglip2_base_p32_256 |
siglip2_large_p16_256 | zeromodels/siglip2_large_p16_256 |
siglip2_large_p16_384 | zeromodels/siglip2_large_p16_384 |
siglip2_large_p16_512 | zeromodels/siglip2_large_p16_512 |
siglip2_so400m_p14_224 | zeromodels/siglip2_so400m_p14_224 |
siglip2_so400m_p14_384 | zeromodels/siglip2_so400m_p14_384 |
siglip2_so400m_p16_256 | zeromodels/siglip2_so400m_p16_256 |
siglip2_so400m_p16_384 | zeromodels/siglip2_so400m_p16_384 |
siglip2_so400m_p16_512 | zeromodels/siglip2_so400m_p16_512 |
KERAS_BACKEND before importing Keras / zeromodels.Processor.from_weights(...) so image size and tokenizer match the variant.input_ids to model token_ids. No padding mask is required.Processor.from_weights.hf: prefix, e.g. SigLIP2ZeroShotClassify.from_weights("hf:google/siglip2-so400m-patch16-384").A huge thank you to the Google SigLIP 2 authors for creating and releasing these models.
License: Apache 2.0.