Model Card for Smart Farming Disease Detection Transformer
This model is a Vision Transformer (ViT) designed to identify plant diseases in crops as part of a smart agricultural farming system. It has been trained on a diverse dataset of plant images, including different disease categories affecting crops such as corn, potato, rice, and wheat. The model aims to provide farmers and agronomists with real-time disease detection for better crop management.
Model Details
Model Description
This Vision Transformer model has been fine-tuned to classify various plant diseases commonly found in agricultural settings. The model can classify diseases in crops such as corn, potato, rice, and wheat, identifying diseases like rust, blight, leaf spots, and others. The goal is to enable precision farming by helping farmers detect diseases early and take appropriate actions.
Output: Disease classification labels (healthy or diseased categories)
Diseases from the model
Crop
Diseases Identified
Corn
Common Rust
Corn
Gray Leaf Spot
Corn
Healthy
Corn
Leaf Blight
-
Invalid
Potato
Early Blight
Potato
Healthy
Potato
Late Blight
Rice
Brown Spot
Rice
Healthy
Rice
Leaf Blast
Wheat
Brown Rust
Wheat
Healthy
Wheat
Yellow Rust
Uses
Direct Use
This model can be used directly to classify images of crops to detect plant diseases. It is especially useful for precision farming, enabling users to monitor crop health and take early interventions based on the detected disease.
Downstream Use
This model can be fine-tuned on other agricultural datasets for specific crops or regions to improve its performance or be integrated into larger precision farming systems that include other features like weather predictions and irrigation control.
Can be quantitized or deployed in full precision on edge devices due to its small parameter size without compromising on precision and accuracy.
Out-of-Scope Use
This model is not designed for non-agricultural image classification tasks or for environments with insufficient or very noisy data. Misuse includes using the model in areas with vastly different agricultural conditions from those it was trained on.
Bias, Risks, and Limitations
The model may exhibit bias toward the crops and diseases present in the training dataset, leading to lower performance on unrepresented diseases or crop varieties.
False negatives (failing to detect a disease) may result in untreated crop damage, while false positives could lead to unnecessary interventions.
Recommendations
Users should evaluate the model on their specific crops and farming conditions. Regular updates and retraining with local data are recommended for optimal performance.
The model was trained on a dataset containing images of various crops with labeled diseases, including the following categories:
Corn: Common Rust, Gray Leaf Spot, Leaf Blight, Healthy
Potato: Early Blight, Late Blight, Healthy
Rice: Brown Spot, Hispa, Leaf Blast, Healthy
Wheat: Brown Rust, Yellow Rust, Healthy
The dataset also includes images captured under various lighting conditions, from both controlled and uncontrolled environments and angles, to simulate real-world farming scenarios.
We made use of public available datasets, and our own private data.
Training Procedure
The model was fine-tuned using a vision transformer architecture pre-trained on the ImageNet dataset. The dataset was preprocessed by resizing the images and normalizing the pixel values.
Training Hyperparameters
Batch size: 32
Learning rate: 2e-5
Epochs: 4
Optimizer: AdamW
Precision: fp16
Evaluation
Confusion matrix
Testing Data, Factors & Metrics
The model was evaluated using a validation set consisting of 20% of the original dataset, with the following metrics:
The model uses a Vision Transformer architecture to learn image representations and classify them into disease categories. Its self-attention mechanism enables it to capture global contextual information in the images, making it suitable for agricultural disease detection.
Compute Infrastructure
Hardware
NVIDIA L40S GPUs
48 GB RAM
SSD storage for fast I/O
Software
Python 3.9
PyTorch 2.4.1+cu121
pytorch_lightning
Transformers library by Hugging Face
Citation
If you use this model in your research or applications, please cite it as: