Instructions to use AFZALS/siglip2-image-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AFZALS/siglip2-image-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="AFZALS/siglip2-image-classification") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("AFZALS/siglip2-image-classification") model = AutoModelForImageClassification.from_pretrained("AFZALS/siglip2-image-classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
siglip2-image-classification
This model is a fine-tuned version of google/siglip2-base-patch16-224 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.1688
- Model Preparation Time: 0.0029
- Accuracy: 0.9399
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0002
- train_batch_size: 32
- eval_batch_size: 8
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 50
- num_epochs: 10
Training results
| Training Loss | Epoch | Step | Validation Loss | Model Preparation Time | Accuracy |
|---|---|---|---|---|---|
| No log | 1.0 | 29 | 1.5321 | 0.0029 | 0.8003 |
| No log | 2.0 | 58 | 0.7153 | 0.0029 | 0.5 |
| No log | 3.0 | 87 | 0.4940 | 0.0029 | 0.7906 |
| No log | 4.0 | 116 | 0.7103 | 0.0029 | 0.6380 |
| No log | 5.0 | 145 | 0.3911 | 0.0029 | 0.8198 |
| No log | 6.0 | 174 | 0.2756 | 0.0029 | 0.875 |
| No log | 7.0 | 203 | 0.2723 | 0.0029 | 0.8912 |
| No log | 8.0 | 232 | 0.4624 | 0.0029 | 0.8490 |
| No log | 9.0 | 261 | 0.1703 | 0.0029 | 0.9351 |
| No log | 10.0 | 290 | 0.1688 | 0.0029 | 0.9399 |
Framework versions
- Transformers 5.18.0
- Pytorch 2.11.0+cu130
- Datasets 4.8.5
- Tokenizers 0.23.2
- Downloads last month
- 19
Model tree for AFZALS/siglip2-image-classification
Base model
google/siglip2-base-patch16-224Evaluation results
- Accuracy on imagefolderself-reported0.940