Instructions to use google/siglip-so400m-patch14-384 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use google/siglip-so400m-patch14-384 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-image-classification", model="google/siglip-so400m-patch14-384") pipe( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png", candidate_labels=["animals", "humans", "landscape"], )# Load model directly from transformers import AutoProcessor, AutoModelForZeroShotImageClassification processor = AutoProcessor.from_pretrained("google/siglip-so400m-patch14-384") model = AutoModelForZeroShotImageClassification.from_pretrained("google/siglip-so400m-patch14-384") - Notebooks
- Google Colab
- Kaggle
Probability always showing zero
#5
by sans07-jd - opened
On inference API, it is showing zero probability for all the classes. Even when I tried the script, it is showing probability always 0 for all my classes. So is there any change in the way where probability are stored. Can anyone please tell how to access the probability.