Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
AI & ML

Crop Disease Detection from Phone Photographs

An offline phone app for farmers and agriculture extension workers that identifies common diseases in one chosen crop, such as wheat, cotton or tomato, from a leaf photograph. This computer vision final year project focuses on the real challenge: models trained on clean lab images fail on photos taken in the field.

Difficulty

Intermediate

A small team, or one strong student willing to learn something new.
Effort

1 semester · 2 students

Deliverables

7 to ship

4 optional extras

Suggested stack

PythonPyTorchMobileNet or EfficientNet-LiteTensorFlow Lite or ONNX Runtime MobileFlutterSQLite for offline history
A suggestion, not a requirement. Swap anything for what you already know.

What you should ship

  • A classifier covering at least 8 disease classes plus healthy for one crop, trained with transfer learning
  • A field validation set of at least 300 phone photographs taken in real conditions, labelled with help from an agriculture expert and never used in training
  • A comparison of accuracy on the clean public test set against the field set, and a second model trained with augmentation and some field data
  • A quantised model running offline on a mid-range Android phone, with measured inference time and app size
  • Capture guidance in the app (distance, lighting, one leaf in frame) and a photo quality check before classification
  • A low-confidence path that declines to guess and suggests contacting an extension worker
  • Urdu or regional language interface with icon-led results for low-literacy users

If you have time left

  • Treatment guidance per diagnosis sourced from an agricultural extension service and clearly attributed
  • Offline history with sync and a map of reports for extension workers when a connection is available
  • Severity estimation as well as classification
  • An out-of-distribution detector that flags photos of other crops or non-leaf images

The problem farmers have with crop disease

Plant disease is often diagnosed late because the nearest expert is far away and a visit takes days. By then the infection has spread, or the farmer has sprayed the wrong chemical on advice from a shopkeeper. Extension workers cover large areas and cannot see every field. A phone that gives a plausible diagnosis in the field, and knows when it is unsure, is useful.

Connectivity is part of the problem. Many fields have weak or no mobile data, so an app that needs a server round trip fails exactly where it is needed.

What already exists and the gap

  • Plantix is a free crop diagnosis app: take a photo, get a likely disease and treatment suggestions.
  • PlantVillage Nuru is an AI assistant from Penn State's PlantVillage project, designed to run on phones for farmers in low-connectivity areas.
  • The PlantVillage dataset is the most-used public dataset for leaf disease classification.

These show the idea works. The gaps for a student project are specific: many public models are trained mostly on clean, single-leaf lab photos, published accuracies rarely reflect field conditions, and coverage of local crop varieties and languages is uneven. A project that measures the lab-to-field gap honestly, closes part of it, and ships an offline app for one local crop is more valuable than another high number on a clean benchmark.

What you build

Users: a farmer who takes a photo, and an extension worker who reviews reports.

  • Classifier for one crop, trained with transfer learning.
  • Mobile app with capture guidance, on-device inference, confidence and a decline path.
  • Offline history of diagnoses with date and optional location.

The technically interesting part

The hard problem is the gap between lab accuracy and field accuracy. Public datasets in this area are largely single leaves on uniform backgrounds under even lighting. Real photographs have soil, shadows, other leaves, motion blur and inconsistent framing, and models can drop sharply. Measuring that gap, then closing part of it with augmentation, background randomisation and a small amount of your own labelled field data, is the core result.

The second is knowing when not to answer. A system that confidently misdiagnoses is worse than one that says it is unsure, particularly when the outcome is spraying a chemical. Calibrate confidence on the field set and choose the decline threshold from data.

How to evaluate it

  • Lab versus field: accuracy and per-class recall on the clean test set and on your field set, for the baseline and improved model.
  • Calibration: reliability diagram and the error rate among predictions above your confidence threshold.
  • Decline behaviour: share of field photos declined and how many of those would have been wrong.
  • On-device: inference time, model size and battery impact on a named mid-range phone.
  • Field test: an extension worker or agriculture student uses the app with 10 farmers and records whether the result and guidance were understood.

Suggested plan

  1. Weeks 1 to 2: choose the crop with an agriculture department contact; plan field photo collection (disease is seasonal, so start now).
  2. Weeks 3 to 5: baseline model on public data; begin collecting field photos.
  3. Weeks 6 to 8: field set labelling, gap measurement, augmentation and fine-tuning.
  4. Weeks 9 to 11: quantisation, Flutter app, capture guidance, decline path.
  5. Weeks 12 to 14: field test, calibration study, report.

Path to a product

The realistic first customers are organisations, not individual farmers: agri-input companies, seed distributors, agricultural universities and NGOs running farmer programmes, who want a branded diagnostic tool for their field staff. Offer a pilot for one crop and one district, then licence per crop per season. The map of reports is valuable to them as early warning of outbreaks.

Scope warning

  • One crop. Not five.
  • Do not give chemical dosage advice unless it comes from an attributed extension source.
  • Do not build a marketplace or advisory chat.
  • Do not report only clean-dataset accuracy.

Learn what you need on Sefism

Get help with this idea

The field photo set decides the value of this project, and it has to be planned around the crop season. Tauseef can help you pick the crop, plan data collection with an agriculture contact and design an evaluation that shows the lab-to-field gap clearly. If you are new here, create a free account first.

Ideas and guidance, not finished projects

These are project ideas and scoping guidance, published free for students to use as a starting point. I do not build, write, or sell final-year projects, and I do not complete coursework for anyone. Take an idea, make it yours, and build it.

Not sure this one fits you?

I help students pick an idea that matches their skills and their deadline, then scope it down until it is finishable. Guidance only, never done for you.

Discuss this idea
Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.