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
|
Download README.md from nexusbert/tomato-disease-vit: direct link, hf CLI and curl.
- Browser
- Download file 2.42 kB
-
https://huggingface.co/nexusbert/tomato-disease-vit/resolve/main/README.md
- Command line
-
hf download hf://nexusbert/tomato-disease-vit/README.md
-
curl -L -o README.md https://huggingface.co/nexusbert/tomato-disease-vit/resolve/main/README.md
2.42 kB
metadata
library_name: transformers
license: apache-2.0
base_model: google/vit-base-patch16-224-in21k
tags:
- generated_from_trainer
datasets:
- imagefolder
metrics:
- accuracy
model-index:
- name: tomato-disease-vit
results:
- task:
type: image-classification
name: Image Classification
dataset:
name: imagefolder
type: imagefolder
config: default
split: train
args: default
metrics:
- type: accuracy
value: 0.98125
name: Accuracy
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