Aller au contenu
ModelPrésentéExterne
Télécharger

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 setclasses, no training needed. Multilingual (SentencePiece,...

TypeOtherVersionRevision 63505daCClasse

Source du modèle

Type
Other
Taille du fichier
1,40 GB
Version
vRevision 63505da
Mis à jour
11 oct. 2026
Téléchargements
0
Source
Hugging Face

Description de la source

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.

Sources

1 source
Hugging FacePrincipalVersion 63505da1d313c5bdb70059f27b575c49b67a58bd
huggingface.co/LibreYOLO/LibreSigLIP2b16-cls/tree/63505da1d313c5bdb70059f27b575c49b67a58bd

Vérifié 27 août

Artefacts du modèle

1 artefact

LibreSigLIP2b16-cls.pt

pt · 1,40 GB · SHA-256 c532149af6a4…5dd4 · Hugging Face

Download file

Extraits de sources

2 extraits

--- license: apache-2.0 library_name: libreyolo pipeline_tag: zero-shot-image-classification tags: - zero-shot-image-classification - siglip2 --- # 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 ```python 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](https://huggingface.co/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](https://github.com/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](https://github.com/LibreYOLO/libreyolo). 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`](./LICENSE) and [`NOTICE`](./NOTICE) files in this repository. Weights were trained by Google on the WebLI dataset, which is not redistributed here.

Source context: 0 downloads · 0 likes · Pipeline zero-shot-image-classification · Library libreyolo · Repo LibreYOLO/LibreSigLIP2b16-cls