Views
No views yet
set_classes, no training needed. Multilingual (SentencePiece, Gemma
vocabulary), with an optional multi_label=True sigmoid scoring mode.1from libreyolo import LibreYOLO
2
3model = LibreYOLO("LibreSigLIP2so400m-cls.pt")
4model.set_classes(["a forklift", "an empty aisle", "a spill"])
5r = model.predict("frame.jpg")[0]
6print(model.names[r.probs.top1], float(r.probs.top1conf))libreyolo[siglip2] extra (SentencePiece tokenizer). Note:
this model runs at 384 px with a 27-layer 1152-wide ViT; it is heavy on CPU,
prefer a GPU.e8e487298228002f3d8a82e0cd5c8ea9c567f57f.
Copyright (c) Google LLC. Licensed under the Apache License 2.0.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.weights/convert_siglip2_weights.py in the
LibreYOLO source repository.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).model.val() zero-shot, prompt "a photo of a {}."):
99.5 top-1 (160 px source images), 99.6 top-1 (320 px source images). Beats
LibreSigLIP2b16-cls on both.