Image Classification
Transformers
Safetensors
English
siglip
OpenSDI
Spotting Diffusion-Generated Images in the Open World
AI-vs-Real
SigLIP2
SD2.1
Instructions to use prithivMLmods/OpenSDI-SD2.1-SigLIP2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/OpenSDI-SD2.1-SigLIP2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="prithivMLmods/OpenSDI-SD2.1-SigLIP2") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("prithivMLmods/OpenSDI-SD2.1-SigLIP2") model = AutoModelForImageClassification.from_pretrained("prithivMLmods/OpenSDI-SD2.1-SigLIP2") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "SiglipForImageClassification" | |
| ], | |
| "id2label": { | |
| "0": "Real_Image", | |
| "1": "SD2.1_Generated" | |
| }, | |
| "initializer_factor": 1.0, | |
| "label2id": { | |
| "Real_Image": 0, | |
| "SD2.1_Generated": 1 | |
| }, | |
| "model_type": "siglip", | |
| "problem_type": "single_label_classification", | |
| "text_config": { | |
| "attention_dropout": 0.0, | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 768, | |
| "intermediate_size": 3072, | |
| "layer_norm_eps": 1e-06, | |
| "max_position_embeddings": 64, | |
| "model_type": "siglip_text_model", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "projection_size": 768, | |
| "torch_dtype": "float32", | |
| "vocab_size": 256000 | |
| }, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.50.0", | |
| "vision_config": { | |
| "attention_dropout": 0.0, | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 768, | |
| "image_size": 224, | |
| "intermediate_size": 3072, | |
| "layer_norm_eps": 1e-06, | |
| "model_type": "siglip_vision_model", | |
| "num_attention_heads": 12, | |
| "num_channels": 3, | |
| "num_hidden_layers": 12, | |
| "patch_size": 16, | |
| "torch_dtype": "float32" | |
| } | |
| } | |