Agri Vision
Agri Vision is a simple crop health classification application that uses a pre-trained deep learning model to identify possible diseases from crop leaf images.
The application is designed to give farmers a quick preliminary assessment of crop health and provide simple guidance based on the detected condition.
All the work was done by me and my teammate, Ajohn, we just did it on the school computer so the PR was required.
https://github.com/user-attachments/assets/d34747e4-0481-42de-b469-03e264ff1c39
Features
- Upload a crop leaf image
- Detect possible crop diseases using a trained deep learning model
- Supports pepper, potato, and tomato crops
- Displays the detected crop
- Displays the possible disease or healthy condition
- Shows prediction confidence
- Provides simple guidance based on the prediction
- Checks basic image quality before analysis
- Simple and accessible Streamlit interface
Supported Crops
Agri Vision currently supports:
- Pepper Bell
- Potato
- Tomato
The model can identify 15 different crop conditions across these crops.
How It Works
The application follows a simple process:
- The user uploads a photo of a crop leaf.
- The application checks the basic quality of the image.
- The image is resized to the required input size.
- The image is processed and passed to the trained deep learning model.
- The model predicts the most likely crop condition.
- The application displays the crop and possible disease.
- The user receives simple guidance based on the prediction.
Technology Used
- Python
- TensorFlow
- OpenCV
- NumPy
- Streamlit
Model
Agri Vision uses a pre-trained TensorFlow model stored in the following file:
crop_disease_model.h5
The model expects input images with a size of:
224 x 224 pixels
The model predicts one of 15 possible crop conditions.
These include:
- Pepper Bell Bacterial Spot
- Pepper Bell Healthy
- Potato Early Blight
- Potato Late Blight
- Potato Healthy
- Tomato Bacterial Spot
- Tomato Early Blight
- Tomato Late Blight
- Tomato Leaf Mold
- Tomato Septoria Leaf Spot
- Tomato Spider Mites
- Tomato Target Spot
- Tomato Yellow Leaf Curl Virus
- Tomato Mosaic Virus
- Tomato Healthy
Image Guidelines
For the best results, users should:
- Take a clear photo of the crop leaf
- Use good natural lighting
- Make sure the leaf is clearly visible
- Avoid blurry