Instructions to use prithivMLmods/SigLIP2-ImageShield-90M-256 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/SigLIP2-ImageShield-90M-256 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="prithivMLmods/SigLIP2-ImageShield-90M-256") 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/SigLIP2-ImageShield-90M-256") model = AutoModelForImageClassification.from_pretrained("prithivMLmods/SigLIP2-ImageShield-90M-256", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "SiglipForImageClassification" | |
| ], | |
| "dtype": "float32", | |
| "id2label": { | |
| "0": "Anime", | |
| "1": "Hentai", | |
| "2": "Normal", | |
| "3": "Pornography", | |
| "4": "Sensual" | |
| }, | |
| "initializer_factor": 1.0, | |
| "label2id": { | |
| "Anime": 0, | |
| "Hentai": 1, | |
| "Normal": 2, | |
| "Pornography": 3, | |
| "Sensual": 4 | |
| }, | |
| "model_type": "siglip", | |
| "problem_type": "single_label_classification", | |
| "text_config": { | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 49406, | |
| "dtype": "float32", | |
| "eos_token_id": 49407, | |
| "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, | |
| "pad_token_id": 1, | |
| "projection_size": 768, | |
| "vocab_size": 256000 | |
| }, | |
| "transformers_version": "5.15.0", | |
| "use_cache": false, | |
| "vision_config": { | |
| "attention_dropout": 0.0, | |
| "dtype": "float32", | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 768, | |
| "image_size": 256, | |
| "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 | |
| } | |
| } | |