LeafLens plant disease classifier
LeafLens is an image classifier that predicts a plant and leaf-condition label from a photo. It is based on google/vit-base-patch16-224-in21k.
The original training dataset and evaluation split were not recorded in this repository, so the metrics below should not be treated as a measure of real-world garden performance:
- Loss: 0.0100
- Accuracy: 0.9982
Model description
This checkpoint was fine-tuned for plant and leaf-condition image classification. LeafLens uses its predictions as an early observation to help growers decide what to inspect next.
Intended uses & limitations
Use this model for educational demonstrations and preliminary plant-health screening. It can confuse similar symptoms, healthy leaves, species, lighting conditions, or backgrounds. It does not identify every plant and is not a confirmed diagnosis. Confirm important plant-health decisions with a local horticulture or extension professional, and avoid applying treatments based on a single model prediction.
Training and evaluation data
The exact dataset composition, collection conditions, and evaluation split for this published checkpoint are not documented. The score reported above may not generalize to photos taken in gardens or farms.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- 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: 3.0
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.0454 | 1.0 | 6238 | 0.0147 | 0.9969 |
| 0.0200 | 2.0 | 12476 | 0.0146 | 0.9964 |
| 0.0056 | 3.0 | 18714 | 0.0100 | 0.9982 |
Framework versions
- Transformers 5.22.1
- Pytorch 2.14.1+cu130
- Datasets 4.8.5
- Tokenizers 0.23.3