Instructions to use nqvii/resnet50-rice-disease with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nqvii/resnet50-rice-disease with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="nqvii/resnet50-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/resnet50-rice-disease") model = AutoModelForImageClassification.from_pretrained("nqvii/resnet50-rice-disease", device_map="auto") - Notebooks
- Google Colab
- Kaggle
resnet50-rice-disease
This model is a fine-tuned version of microsoft/resnet-50 on the imagefolder dataset. It achieves the following results on the evaluation set:
- Loss: 1.2405
- Accuracy: 0.9363
- F1 Score: 0.9385
- Recall: 0.9454
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: 0.0001
- 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.7724 | 1.0 | 20 | 2.7774 | 0.2548 | 0.2320 | 0.2540 |
| 2.7497 | 2.0 | 40 | 2.7553 | 0.2611 | 0.2466 | 0.2559 |
| 2.7167 | 3.0 | 60 | 2.7306 | 0.3949 | 0.3314 | 0.3494 |
| 2.6803 | 4.0 | 80 | 2.6936 | 0.4204 | 0.3092 | 0.3529 |
| 2.6082 | 5.0 | 100 | 2.6261 | 0.4522 | 0.3512 | 0.3889 |
| 2.5054 | 6.0 | 120 | 2.5294 | 0.5796 | 0.5207 | 0.5436 |
| 2.3585 | 7.0 | 140 | 2.3384 | 0.6688 | 0.6220 | 0.6335 |
| 2.1587 | 8.0 | 160 | 2.1049 | 0.7070 | 0.6620 | 0.6738 |
| 1.9580 | 9.0 | 180 | 1.8537 | 0.7516 | 0.7460 | 0.7365 |
| 1.7723 | 10.0 | 200 | 1.6781 | 0.8025 | 0.8037 | 0.8048 |
| 1.6324 | 11.0 | 220 | 1.5635 | 0.8153 | 0.8196 | 0.8219 |
| 1.4625 | 12.0 | 240 | 1.4780 | 0.8790 | 0.8827 | 0.8929 |
| 1.3762 | 13.0 | 260 | 1.4148 | 0.8981 | 0.9011 | 0.9088 |
| 1.3718 | 14.0 | 280 | 1.3859 | 0.9045 | 0.9062 | 0.9161 |
| 1.3044 | 15.0 | 300 | 1.3276 | 0.9108 | 0.9120 | 0.9210 |
| 1.3963 | 16.0 | 320 | 1.2885 | 0.9172 | 0.9177 | 0.9259 |
| 1.2558 | 17.0 | 340 | 1.2743 | 0.9172 | 0.9177 | 0.9259 |
| 1.2366 | 18.0 | 360 | 1.2801 | 0.9236 | 0.9235 | 0.9308 |
| 1.2488 | 19.0 | 380 | 1.2526 | 0.9236 | 0.9248 | 0.9339 |
| 1.2161 | 20.0 | 400 | 1.2495 | 0.9299 | 0.9306 | 0.9388 |
| 1.2081 | 21.0 | 420 | 1.2563 | 0.9172 | 0.9180 | 0.9234 |
| 1.2564 | 22.0 | 440 | 1.2920 | 0.9172 | 0.9190 | 0.9271 |
| 1.1778 | 23.0 | 460 | 1.2459 | 0.9363 | 0.9373 | 0.9462 |
| 1.1535 | 24.0 | 480 | 1.2410 | 0.9299 | 0.9318 | 0.9400 |
| 1.2084 | 25.0 | 500 | 1.2527 | 0.9172 | 0.9173 | 0.9234 |
| 1.1604 | 26.0 | 520 | 1.2605 | 0.9299 | 0.9312 | 0.9369 |
| 1.1478 | 27.0 | 540 | 1.2506 | 0.9299 | 0.9305 | 0.9369 |
| 1.1828 | 28.0 | 560 | 1.2584 | 0.9299 | 0.9306 | 0.9388 |
| 1.1556 | 29.0 | 580 | 1.2603 | 0.9299 | 0.9305 | 0.9369 |
| 1.1251 | 30.0 | 600 | 1.2456 | 0.9299 | 0.9305 | 0.9369 |
| 1.1211 | 31.0 | 620 | 1.2356 | 0.9427 | 0.9448 | 0.9510 |
| 1.1189 | 32.0 | 640 | 1.2556 | 0.9299 | 0.9313 | 0.9374 |
| 1.1509 | 33.0 | 660 | 1.2520 | 0.9363 | 0.9385 | 0.9474 |
| 1.1181 | 34.0 | 680 | 1.2658 | 0.9363 | 0.9385 | 0.9474 |
| 1.1283 | 35.0 | 700 | 1.2746 | 0.9363 | 0.9385 | 0.9474 |
| 1.1417 | 36.0 | 720 | 1.2604 | 0.9363 | 0.9385 | 0.9474 |
| 1.1355 | 37.0 | 740 | 1.2647 | 0.9363 | 0.9385 | 0.9474 |
| 1.0898 | 38.0 | 760 | 1.2626 | 0.9299 | 0.9329 | 0.9393 |
| 1.1613 | 39.0 | 780 | 1.2882 | 0.9236 | 0.9269 | 0.9356 |
| 1.1201 | 40.0 | 800 | 1.2573 | 0.9363 | 0.9385 | 0.9474 |
| 1.1125 | 41.0 | 820 | 1.2405 | 0.9363 | 0.9385 | 0.9454 |
Framework versions
- Transformers 5.0.0
- Pytorch 2.10.0+cu128
- Datasets 5.0.0
- Tokenizers 0.22.2
- Downloads last month
- 136
Model tree for nqvii/resnet50-rice-disease
Base model
microsoft/resnet-50Evaluation results
- Accuracy on imagefoldervalidation set self-reported0.936
- Recall on imagefoldervalidation set self-reported0.945