Inspiration
Farmers often have to make quick decisions when they notice unusual symptoms on crop leaves. However, identifying the cause from visual symptoms alone can be difficult, especially when similar symptoms can come from different diseases, nutrient deficiencies, or environmental stress.
We wanted to build a tool that does more than simply give a disease name. FarmSage AI was designed as an evidence-driven farming assistant that analyzes visual evidence from crop images, communicates uncertainty, ranks possible hypotheses, and provides practical next steps for field verification and management.
What FarmSage AI Does
FarmSage AI allows a farmer to upload a crop or leaf image and provide basic crop information and field observations.
The system performs computer-vision analysis to extract measurable visual evidence such as:
- Image quality and blur assessment
- Brightness and contrast
- Green foliage area
- Chlorotic yellow regions
- Necrotic brown regions
- Dark spot regions
- Spatial distribution and clustering of detected regions
The visual evidence is then used by the reasoning layer to produce a ranked set of possible conditions rather than presenting an unsupported diagnosis as fact.
For example, when early blight is the leading hypothesis, FarmSage explains which observed visual features contributed to that hypothesis and also identifies what additional field observations are still required for confirmation.
Adaptive Decision Making
A key feature of FarmSage AI is its uncertainty-aware decision process.
If an uploaded image is too blurry or poor quality, the system does not force a diagnosis. Instead, it asks the user to provide a clearer image.
When an image is usable but ambiguous, FarmSage presents competing hypotheses and asks targeted field-verification questions.
The decision trace follows:
Perception → Evidence → Hypothesis → Action → Field Verification → Outcome
This makes the system more transparent and helps users understand why a recommendation was produced.
How We Built It
FarmSage AI is a web application built with React and TypeScript.
The computer-vision pipeline uses OpenCV-based image processing to extract measurable visual evidence from crop images. The reasoning layer combines the extracted evidence with crop type, growth stage, and field observations.
The application also includes:
- Live field telemetry simulation
- Crop image comparison
- Crop field diary
- Diagnostic PDF reports
- Voice Agronomist
- English and Telugu support
- Evidence-based management recommendations
- Image-quality and uncertainty gates
The application is maintained in a public GitHub repository with environment variables used for secrets instead of hard-coded API keys.
What We Learned
We learned that a useful AI farming assistant should not simply predict a disease name. It should communicate evidence, uncertainty, alternative explanations, and the next action that a farmer can take.
We also learned the importance of separating measurable computer-vision observations from higher-level agronomic hypotheses. This makes the system easier to understand, test, and improve.
Challenges
One of our main challenges was designing the system so that poor-quality images would not automatically produce misleading results.
Another challenge was distinguishing between visual evidence and disease identity. Color and texture patterns can indicate that something is abnormal, but they do not by themselves prove the presence of a specific pathogen.
We therefore designed FarmSage around an evidence boundary: computer vision measures what is visible in the image, while the reasoning layer produces hypotheses that should be verified through additional field observations.
Future Improvements
Future versions could incorporate larger field datasets, additional crops and diseases, real sensor integrations, stronger validation against expert-labelled datasets, and additional computer-vision models for more robust detection under different lighting and field conditions.
FarmSage AI is intended as an observational decision-support system and not as a replacement for professional agronomic diagnosis.
Built With
- google-gemini
- opencv
- opencv5
- react
- typescript
- vite
Log in or sign up for Devpost to join the conversation.