Instructions to use nexusbert/tomato-disease-vit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nexusbert/tomato-disease-vit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nexusbert/tomato-disease-vit") 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("nexusbert/tomato-disease-vit") model = AutoModelForImageClassification.from_pretrained("nexusbert/tomato-disease-vit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
tomato-disease-vit
This model is a fine-tuned version of google/vit-base-patch16-224-in21k on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 0.2779
- Accuracy: 0.9083
- F1 Macro: 0.9081
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: 5e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- 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: 0.1
- num_epochs: 8
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro |
|---|---|---|---|---|---|
| 0.7613 | 1.0 | 90 | 0.6598 | 0.7319 | 0.7314 |
| 0.5505 | 2.0 | 180 | 0.7253 | 0.7111 | 0.6945 |
| 0.4291 | 3.0 | 270 | 0.4152 | 0.8472 | 0.8485 |
| 0.4423 | 4.0 | 360 | 0.3808 | 0.8611 | 0.8592 |
| 0.3619 | 5.0 | 450 | 0.3967 | 0.8639 | 0.8616 |
| 0.2751 | 6.0 | 540 | 0.3346 | 0.8889 | 0.8873 |
| 0.2944 | 7.0 | 630 | 0.3226 | 0.8917 | 0.8910 |
| 0.1867 | 8.0 | 720 | 0.2779 | 0.9083 | 0.9081 |
Framework versions
- Transformers 5.12.1
- Pytorch 2.11.0+cu128
- Datasets 4.0.0
- Tokenizers 0.22.2
- Downloads last month
- 10
Model tree for nexusbert/tomato-disease-vit
Base model
google/vit-base-patch16-224-in21kSpace using nexusbert/tomato-disease-vit 1
Evaluation results
- Accuracy on imagefolderself-reported0.908