Inspiration

Agriculture is the backbone of civilization, yet farmers lose approximately 20-40% of their crops to pests and diseases annually. In many rural areas, access to professional agronomists is expensive or non-existent. I was inspired to build CropSight to bridge this gap. The goal was to democratize agricultural expertise using specific, context-aware AI. I wanted to move beyond simple image classification and create a tool that "reasons" like a human expert taking into account visual symptoms, environmental data, and geographic context.

What it does

CropSight (also known as Plant Doctor) is an AI-powered Progressive Web App (PWA) designed to help farmers and gardening enthusiasts instantly diagnose plant diseases, identify species, and receive actionable treatment plans. By leveraging the multimodal capabilities of Google's Gemini API, CropSight acts as a field expert in your pocket.

How we built it

Tech Stack

  • Frontend: React (TypeScript) for a responsive, component-based UI.
  • Styling: Tailwind CSS for a clean, nature-inspired aesthetic.
  • AI Engine: Google Gemini API via @google/genai.
  • Visualization: Recharts for confidence score visualization.
  • Icons: Lucide React.

Challenges we ran into

  • The "Hallucination" Problem: Early versions of the AI would confidently diagnose a healthy plant with a rare disease.
  • Context Blindness: A picture of a yellow leaf could be lack of water or a virus. Visuals alone aren't enough.
  • Audio Handling in the Browser: Streaming raw PCM audio from the Gemini API and decoding it for playback in the browser was technically tricky.
  • Lack of IoT devices for real world testing: A significant limitation during development was the lack of IoT devices for real world testing. Without physical sensors (moisture probes, temperature loggers), i had to rely on simulated data streams to validate the integration logic. This meant i could not fully test the end-to-end data pipeline from device to dashboard.

What we learned

  • Prompt Engineering is Key: The difference between "Analyze this image" and "Act as an expert agronomist look for concentric rings indicating Early Blight" is massive.
  • The Power of Grounding: Giving the AI access to tools (Google Search) transforms it from a creative writer into a research assistant.
  • User Experience in AI: Showing where the information came from (Sources) is just as important as the answer itself. It builds trust.

What's next for CropSight

  • Offline Mode: Caching common diseases for offline diagnosis using TensorFlow.js.
  • Community Map: Visualizing disease outbreaks on a map to warn nearby farmers.
  • Real IoT Hardware: Integrating with ESP32 sensors via MQTT.

Built With

Share this project:

Updates