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")# pip install -U transformers accelerate # 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
# pip install -U transformers accelerate
# 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")Quick Links
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.0651
- Accuracy: 0.9812
- F1 Macro: 0.9812
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: 32
- eval_batch_size: 16
- 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
- num_epochs: 8
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro |
|---|---|---|---|---|---|
| 0.3243 | 1.0 | 180 | 0.2503 | 0.9493 | 0.9495 |
| 0.2877 | 2.0 | 360 | 0.1677 | 0.9563 | 0.9567 |
| 0.1549 | 3.0 | 540 | 0.1368 | 0.9569 | 0.9569 |
| 0.1418 | 4.0 | 720 | 0.1001 | 0.9743 | 0.9745 |
| 0.1020 | 5.0 | 900 | 0.0853 | 0.975 | 0.9751 |
| 0.0455 | 6.0 | 1080 | 0.0665 | 0.9812 | 0.9811 |
| 0.0753 | 7.0 | 1260 | 0.0637 | 0.9806 | 0.9805 |
| 0.0835 | 8.0 | 1440 | 0.0623 | 0.9806 | 0.9805 |
Framework versions
- Transformers 5.16.1
- Pytorch 2.11.0+cu128
- Datasets 4.8.5
- Tokenizers 0.23.1
- Downloads last month
- 62
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.981
# 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")