Instructions to use nqvii/vit-rice-disease with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nqvii/vit-rice-disease with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nqvii/vit-rice-disease") 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("nqvii/vit-rice-disease") model = AutoModelForImageClassification.from_pretrained("nqvii/vit-rice-disease", device_map="auto") - Notebooks
- Google Colab
- Kaggle
vit-rice-disease
This model is a fine-tuned version of google/vit-base-patch16-224 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 1.1385
- Accuracy: 0.9682
- F1 Score: 0.9692
- Recall: 0.9731
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-05
- train_batch_size: 64
- eval_batch_size: 64
- 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: cosine
- lr_scheduler_warmup_steps: 150
- num_epochs: 50
- mixed_precision_training: Native AMP
- label_smoothing_factor: 0.15
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Score | Recall |
|---|---|---|---|---|---|---|
| 2.9037 | 1.0 | 20 | 2.9992 | 0.2229 | 0.1992 | 0.2055 |
| 2.6661 | 2.0 | 40 | 2.8086 | 0.3248 | 0.2916 | 0.2944 |
| 2.3527 | 3.0 | 60 | 2.5086 | 0.4713 | 0.4337 | 0.4307 |
| 1.9695 | 4.0 | 80 | 2.1277 | 0.6306 | 0.6090 | 0.5984 |
| 1.6318 | 5.0 | 100 | 1.7679 | 0.7452 | 0.7420 | 0.7276 |
| 1.3582 | 6.0 | 120 | 1.5133 | 0.8535 | 0.8567 | 0.8552 |
| 1.2231 | 7.0 | 140 | 1.3629 | 0.9045 | 0.9072 | 0.9136 |
| 1.2005 | 8.0 | 160 | 1.2944 | 0.9236 | 0.9249 | 0.9308 |
| 1.0999 | 9.0 | 180 | 1.2554 | 0.9363 | 0.9373 | 0.9462 |
| 1.0716 | 10.0 | 200 | 1.2232 | 0.9363 | 0.9366 | 0.9406 |
| 1.0572 | 11.0 | 220 | 1.2030 | 0.9427 | 0.9430 | 0.9486 |
| 1.0421 | 12.0 | 240 | 1.1992 | 0.9490 | 0.9491 | 0.9560 |
| 1.0298 | 13.0 | 260 | 1.1828 | 0.9490 | 0.9490 | 0.9536 |
| 1.0341 | 14.0 | 280 | 1.1787 | 0.9554 | 0.9550 | 0.9585 |
| 1.0144 | 15.0 | 300 | 1.1642 | 0.9554 | 0.9550 | 0.9585 |
| 1.0131 | 16.0 | 320 | 1.1651 | 0.9554 | 0.9560 | 0.9596 |
| 1.0032 | 17.0 | 340 | 1.1606 | 0.9554 | 0.9560 | 0.9596 |
| 0.9809 | 18.0 | 360 | 1.1584 | 0.9554 | 0.9572 | 0.9608 |
| 0.9980 | 19.0 | 380 | 1.1463 | 0.9682 | 0.9691 | 0.9706 |
| 0.9842 | 20.0 | 400 | 1.1544 | 0.9618 | 0.9631 | 0.9657 |
| 0.9821 | 21.0 | 420 | 1.1542 | 0.9682 | 0.9692 | 0.9731 |
| 0.9810 | 22.0 | 440 | 1.1553 | 0.9554 | 0.9574 | 0.9633 |
| 0.9764 | 23.0 | 460 | 1.1354 | 0.9682 | 0.9692 | 0.9731 |
| 0.9810 | 24.0 | 480 | 1.1282 | 0.9745 | 0.9752 | 0.9780 |
| 0.9744 | 25.0 | 500 | 1.1473 | 0.9682 | 0.9692 | 0.9731 |
| 0.9775 | 26.0 | 520 | 1.1464 | 0.9554 | 0.9562 | 0.9621 |
| 0.9709 | 27.0 | 540 | 1.1477 | 0.9554 | 0.9562 | 0.9621 |
| 0.9733 | 28.0 | 560 | 1.1382 | 0.9682 | 0.9692 | 0.9731 |
| 0.9766 | 29.0 | 580 | 1.1407 | 0.9618 | 0.9633 | 0.9682 |
| 0.9810 | 30.0 | 600 | 1.1458 | 0.9618 | 0.9633 | 0.9682 |
| 0.9704 | 31.0 | 620 | 1.1332 | 0.9682 | 0.9692 | 0.9731 |
| 0.9707 | 32.0 | 640 | 1.1292 | 0.9745 | 0.9752 | 0.9780 |
| 0.9691 | 33.0 | 660 | 1.1380 | 0.9682 | 0.9692 | 0.9731 |
| 0.9709 | 34.0 | 680 | 1.1385 | 0.9682 | 0.9692 | 0.9731 |
Framework versions
- Transformers 5.0.0
- Pytorch 2.10.0+cu128
- Datasets 5.0.0
- Tokenizers 0.22.2
- Downloads last month
- -
Model tree for nqvii/vit-rice-disease
Base model
google/vit-base-patch16-224Evaluation results
- Accuracy on imagefoldervalidation set self-reported0.968
- Recall on imagefoldervalidation set self-reported0.973