Downloads · 30 days
8
8% of all-time downloads
wtzhang-nlp/siglip2-navit-google
siglip2-navit-google is a image feature extraction model from wtzhang-nlp. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This is a SigLIP2 NaViT (Native Resolution Vision Transformer) vision encoder model, initialized with Google's pretrained SigLIP2 checkpoint. The vision encoder weights are from Google's checkpoint, while the merger l…
Downloads · 30 days
8
8% of all-time downloads
All-time downloads
101
Public
Parameters
97.4M
391 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors195 MB · 100%
From the Hugging Face model README
This is a SigLIP2 NaViT (Native Resolution Vision Transformer) vision encoder model, initialized with Google's pretrained SigLIP2 checkpoint. The vision encoder weights are from Google's checkpoint, while the merger layer is randomly initialized.
from transformers import AutoModel, AutoImageProcessor
from PIL import Image
import torch
# Load model and processor
model = AutoModel.from_pretrained("wtzhang-nlp/siglip2-navit-google", trust_remote_code=True)
processor = AutoImageProcessor.from_pretrained("wtzhang-nlp/siglip2-navit-google", trust_remote_code=True)
# Load and process image
image = Image.open("path/to/image.jpg")
inputs = processor(images=image, return_tensors="pt")
# Forward pass
with torch.no_grad():
outputs = model(**inputs)
print(f"Output shape: {outputs.last_hidden_state.shape}")
# Expected: [batch_size, num_patches, 896]
Apache 2.0