Plant Disease Detection — a CNN that works on real leaf photos
Point a phone at a leaf, get the disease, the confidence, and what to do about it.
Most computer-vision projects demo on an image straight from the training set and fall apart on a photo taken in the exam hall. This one trains a CNN with transfer learning on a leaf-disease dataset, runs on a picture snapped in class, returns the diagnosis with a confidence score and the top three possibilities, and maps that to a plain treatment note. It handles the awkward case honestly — a blurry photo or a leaf it has never seen returns low confidence, not a confident wrong answer.
- Level
- Advanced
- Live sessions
- 8
- Seats per college
- 1 / year
What it does
- Upload or capture a leaf image and get the disease with a confidence score
- Top-three predictions, so a close call is shown as a close call
- A treatment / advice note mapped to each diagnosis
- Low-confidence and 'not a leaf' inputs handled gracefully
- The training notebook with honest validation metrics
- A FastAPI model service behind a React capture-and-upload UI
What the sessions cover
- 01Why CNNs for images, and why transfer learning beats training from scratch
- 02The dataset, augmentation, and avoiding data leakage
- 03Training, and validating on data the model never saw
- 04Confidence, thresholds, and designing the unknown case
- 05Serving the trained model with FastAPI
- 06The React capture / upload interface
- 07Deployment, model size, and load time
- 08Full mock viva on the generalisation question
Stack
How it works
A pretrained convolutional network, MobileNetV2 or EfficientNetB0 trained on ImageNet, is used as a feature extractor. Its classification head is replaced with a small dense layer for the disease classes, trained first with the base frozen and then fine-tuned with the top layers unfrozen at a low learning rate.
Training images are augmented with random flips, rotations, zoom and brightness changes, so the model sees leaves at angles and in light it would otherwise never meet. Images are resized to 224 by 224 and normalised exactly as the base network expects.
The trained model is saved and served by FastAPI. A photo uploaded from the React UI goes through the same preprocessing, and the API returns the top three classes with probabilities. If the best probability is below a threshold, it answers that it is not sure instead of naming a disease.
The data
PlantVillage, the public dataset of about 54,000 leaf images across 38 classes of 14 crops, and PlantDoc, a smaller set of about 2,600 photos taken in real fields. PlantVillage photos are single leaves on a plain background, so a model trained only on them does poorly on real photos; testing on PlantDoc shows that gap, and the project reports both scores.
The hard parts examiners ask about
Lab photos versus field photos
A model can reach 99 per cent on PlantVillage and fall sharply on real photos with soil, hands and other leaves in frame. Reporting the field-photo score, and augmenting to narrow the gap, is what makes the project credible.
Inputs that are not leaves
A softmax always picks a class, even for a photo of a cat. A confidence threshold and a not-sure response keep the app from confidently diagnosing nonsense.
Class imbalance
Some diseases have many times more images than others. Class weights during training and per-class recall in the report stop the rare diseases from being ignored.
Viva questions on this project
- What is transfer learning and why use it?
- Reusing a network already trained on a large dataset (ImageNet) and retraining only the last layers for your task. Its early layers already detect edges, textures and shapes, so it needs far fewer images and much less training time than a CNN from scratch.
- Why freeze the base model first?
- The new head starts with random weights, and its large early gradients would wreck the pretrained features. Training the head first, then unfreezing the top layers with a small learning rate, fine-tunes without destroying what was learned.
- What does data augmentation do?
- It creates altered copies of training images, rotated, flipped, zoomed or brightened, so the model learns the disease rather than the exact pose or lighting of the photos. It reduces overfitting.
- Why is your accuracy lower on PlantDoc?
- PlantVillage images have plain backgrounds; PlantDoc photos are from real fields. The drop shows how far lab results are from real use, which is a finding, not a failure.
- How does the app handle a photo that is not a leaf?
- If the top predicted probability is below a set threshold, the API returns a not-sure response asking for a clearer leaf photo, instead of the most likely disease.
Pick what you need
Direct UPI / bank transfer in monthly installments. Sessions start after the first installment; handover is after the final installment. Full terms — including what happens if you stop midway.
Source
₹6,000
single payment
- Full source code
- Local setup guide
- Sample dataset / seed data
- One handover call
Academic
₹11,000
or ₹5,500/month × 2
- Everything in Source
- Project report (synopsis + full document)
- Presentation deck
- ER / DFD / architecture diagrams
- Deployment walkthrough
Mentored
Most picked₹18,000
or ₹6,000/month × 3
- Everything in Academic
- 8 live sessions on Google Meet
- Line-by-line code walkthrough
- Viva question prep + mock viva
- One module varied for you (dataset / domain)
- WhatsApp support until submission
This page has no reviews on it yet. Be the reason it does.
The first 3 students get 40% off in exchange for an honest review and permission to show your finished project here. Same build, same sessions, same handover — the discount is the price of going first, and it is not coming back once those seats are gone.
You are about to send money to a stranger on the internet.
Fair. So here is everything you need to check who I am — all of it public, all of it older than this page.
Two things I hold myself to
- Only 1 students from your college get this project in an academic year. On the Mentored tier one module is varied for you — the dataset, the domain, or a feature — so no two submissions read the same.
- You build nothing. You just have to be able to explain it. The project is delivered finished — code, report, diagrams, deployed. Then daily 60-minute sessions on Google Meet after 8:00 PM IST, walking the code you are submitting, ending in a mock viva. Turn up and you will know it well enough to answer anything the panel asks.
Enquire about this project
Tell me your submission deadline and which tier fits. You get a session schedule and an installment split back — usually within a day.