On this page
Point a phone at a spotted tomato leaf, and an app may name the disease within seconds. India's government now uses a similar idea to spot crop pests across the country. The short version: these tools are very good at photos that look like their training data, and much weaker at photos that don't.
How is AI used to detect crop diseases in India?
One government tool is the National Pest Surveillance System (NPSS). According to a written reply in the Rajya Sabha on 28 March 2025, NPSS uses AI and machine learning to detect pest infestation and lets farmers capture images of pests to help them reduce crop losses. The same reply says NPSS supports 61 crops and over 400 pests, holds about 1 lakh uploaded images, and is used by over 10,000 extension workers.
The stakes are high. Researchers at IIT Gandhinagar open their PlantDoc paper by noting that India loses 35% of its annual crop yield to plant diseases, and that early detection is hard without lab infrastructure and expertise. A phone photo can reach far more fields than experts can visit in person.
How does a phone app learn to recognise a diseased leaf?
The app uses supervised learning. Training data is a large set of photos, each labelled with the crop and the disease (or "healthy"). A deep learning model studies thousands of these and adjusts itself until its guesses match the labels. It never reads about blight; it learns which visual patterns go with each label.
A clear early test came from Mohanty, Hughes and Salathé in Frontiers in Plant Science (2016). They trained models on 54,306 images from the PlantVillage dataset, covering 14 crop species and 26 diseases, 38 classes in all. On held-back images from the same dataset, the best model reached 99.35% accuracy.
Here is the biology catch. A leaf spot is a symptom, not a diagnosis, and different causes can leave similar-looking marks. The authors themselves wrote that laboratory tests are "ultimately always more reliable than diagnoses based on visual symptoms alone". If you want to revise the organisms behind many leaf diseases, our guide to the four classes of Kingdom Fungi is a good refresher.
Why does accuracy drop in real fields?
The same 2016 study then tested its best models on two small, verified sets of photos from trusted online sources, of 121 and 119 images. Accuracy fell to 31.40% and 31.69%. That is still far above the 2.6% you would get by guessing among 38 classes, but it is a long way from 99%.
The reason is in how the training photos were taken. The authors explain that their model was limited to single leaves, facing up, on a plain background. They also note that many diseases show up on other parts of the plant, not just the upper side of leaves. A real field adds soil, shadows and overlapping leaves. When real-world photos differ from the training photos like this, it is called dataset shift.
The fix is better data. The PlantDoc team built a dataset of 2,598 internet-scraped images across 13 plant species and up to 17 disease classes, which took about 300 human hours to annotate. They report that training with their dataset can increase classification accuracy by up to 31%.
Worked example: test a leaf app like a biologist
You can see this shift yourself with a school garden or balcony plant.
Pick one plant with a visible symptom, such as spots or yellowing on a leaf.
Write a hypothesis first: "The app will give the same answer whatever the background."
Photograph the same leaf three ways: detached on plain white paper, still on the plant in daylight, and the whole plant from about a metre away.
For each photo, record the app's top answer and any confidence score it shows.
Compare. If the answer changes with the background, you have seen dataset shift.
Before anyone sprays anything, ask an agriculture extension worker or your local Krishi Vigyan Kendra to check.
Before trusting any app's answer, ask three questions:
Does the photo look like a typical training image: one clear leaf, in focus, with the symptom visible?
Is the symptom only on the leaf, or also on the stem, fruit or roots?
Does the suggested treatment make biological sense? Our explainer on biocontrol agents and biofertilisers shows how some microbes protect crops without chemical sprays.
What can biology students take from this?
Building a crop disease app takes plant pathology as much as code: which pathogen causes which symptom, and how to collect data that matches real fields. If terms like pathogen, host or symptom still feel shaky, the Fermi Concept Library covers every concept in biology, each with its own lesson. And if you want help planning a project like the one above, Fermi's AI tutor can work out what you already know and build a plan for the session.
Chatbots are trained differently, but the lesson carries over; see how large language models work.



