Instructions to use SABR22/ViT-threat-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SABR22/ViT-threat-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="SABR22/ViT-threat-classification") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("SABR22/ViT-threat-classification") model = AutoModelForImageClassification.from_pretrained("SABR22/ViT-threat-classification") - Notebooks
- Google Colab
- Kaggle
ViT-threat-classification
This model is a fine-tuned version of google/vit-base-patch16-224-in21k on a threat classification dataset. This model was created for a Carleton University computer vision hacking event and serves as a proof of concept rather than complete model. It is trained on an extremely small and limited dataset and the performance is limited. It achieves the following results on the evaluation set:
- Loss: 0.4568
- Accuracy: 1.0
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: 1e-06
- train_batch_size: 4
- eval_batch_size: 4
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 16
- optimizer: Use OptimizerNames.ADAMW_TORCH 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: 500
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.328 | 0.9756 | 10 | 0.4556 | 0.875 |
| 0.3226 | 1.9512 | 20 | 0.4736 | 0.75 |
| 0.3619 | 2.9268 | 30 | 0.4568 | 1.0 |
Framework versions
- Transformers 4.46.2
- Pytorch 2.5.1+cu124
- Datasets 3.1.0
- Tokenizers 0.20.3
- Downloads last month
- 3
Model tree for SABR22/ViT-threat-classification
Base model
google/vit-base-patch16-224-in21k