DeepCrop
An AI-based crop disease identification system built as a digital plant doctor.
DeepCrop
A digital plant doctor: point a phone camera at a diseased leaf, get the disease, the confidence, and what to do about it.
View CodeProject Overview
Crop losses to pests and disease run 20–40% a year, and the current answer is a human expert who may not be in the field that day. DeepCrop is meant to be the first look instead of the last: a photographer uploads a leaf image and gets back the disease, a confidence score, and a treatment recommendation. The model is a custom CNN built from scratch — four convolutional blocks with batch normalisation and dropout — trained by supervised learning on the PlantVillage dataset. The design choice that mattered most was adding Grad-CAM, which overlays a heatmap of the regions the network actually used, so a farmer can see the model is looking at the lesion and not at the soil in the background.
The Challenge
Accuracy on a clean dataset says very little about field performance. PlantVillage images are tidy and evenly lit, while a real phone photo is angled, shadowed, and full of distractions. A model can score well on the benchmark and still be unusable on the crop it is meant to judge.
Our Approach
Train a custom CNN with aggressive augmentation, and make the output legible rather than just numeric. Grad-CAM forces the model to show its evidence, confidence scoring tells the user how much to trust it, and treatment recommendations turn a label into something actionable. The whole pipeline ships as a Streamlit app with sub-100ms inference.
Technology Stack
Key Features
Built so a non-technical user can act on the result without second-guessing it.
Multi-crop classification
Eight-plus disease classes spanning tomato, potato, pepper and more, trained on PlantVillage.
Grad-CAM visualisation
A heatmap over the image showing exactly which pixels drove the decision, so a wrong prediction is visible rather than mysterious.
Confidence scoring
Every prediction reports how sure the model is, letting the app say "unclear, try a closer photo" instead of guessing.
Treatment recommendations
The output is advice, not just a label — each disease class maps to an action the farmer can take the same day.
Sub-100ms inference
Fast enough for an interactive upload-and-result loop in the Streamlit app.