LibreSigLIP2b16-cls

SigLIP 2 base patch-16 (256 px) dual-tower zero-shot image classifier, repackaged for LibreYOLO. Open vocabulary: define your own class set at runtime with set_classes, no training needed. Multilingual (SentencePiece, Gemma vocabulary), with an optional multi_label=True sigmoid scoring mode.

Usage

from libreyolo import LibreYOLO

model = LibreYOLO("LibreSigLIP2b16-cls.pt")
model.set_classes(["a forklift", "an empty aisle", "a spill"])
r = model.predict("frame.jpg")[0]
print(model.names[r.probs.top1], float(r.probs.top1conf))

Requires the libreyolo[siglip2] extra (SentencePiece tokenizer).

Source

Derived from google/siglip2-base-patch16-256 at commit 3f9f96cb90da5dbc758b01813f2f6f1aee24c1ab. Copyright (c) Google LLC. Licensed under the Apache License 2.0.

Reference implementations: google-research/big_vision and the Hugging Face transformers SigLIP code (both Apache-2.0). This fixed-resolution SigLIP 2 checkpoint uses the original SigLIP transformer architecture (model_type: "siglip"); the NaFlex variants are not included.

Modifications

State-dict metadata wrap only (LibreYOLO v1.0 checkpoint schema). Learned parameters are unchanged. See weights/convert_siglip2_weights.py in the LibreYOLO source repository.

Parity vs the reference transformers model at fp32 CPU: text tower and vision encoder are bit-identical (max_abs_diff == 0); the attention-pooled image feature differs by < 1e-6 (a torch MultiheadAttention fused-kernel residual, documented in weights/parity_siglip2.py).

Zero-shot accuracy

Imagenette (10-class, val, model.val() zero-shot, prompt "a photo of a {}."): 99.2 top-1 (160 px source images), 99.5 top-1 (320 px source images).

License

Apache License 2.0. See the LICENSE and NOTICE files in this repository. Weights were trained by Google on the WebLI dataset, which is not redistributed here.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support