🌿 AGRI NOVA — Project Story

Inspiration

Growing up surrounded by agriculture, we witnessed firsthand how a single undetected disease could wipe out an entire season's harvest. Farmers often lack access to agronomists, and by the time symptoms are visible to the untrained eye, it's already too late. We wanted to build something that puts expert-level diagnostics directly in a farmer's hand — no expensive consultants, just a smartphone and a leaf.

What It Does

AGRI NOVA lets farmers instantly identify crop diseases by simply photographing a leaf. The app analyzes the image using a deep learning model, returns a diagnosis with a confidence score, and connects the user to an AI assistant that explains the disease, suggests treatments, and answers follow-up questions — all in plain, accessible language.

How We Built It

The project is structured as three tightly integrated layers:

  1. ML Backend (Python / FastAPI) — A REST API that accepts leaf images, preprocesses them, and runs inference through a trained EfficientNet model exported as .keras. The training pipeline uses TensorFlow with Albumentations for real-world augmentations, including MixUp blending:

$$\tilde{x} = \lambda x_i + (1 - \lambda) x_j, \quad \tilde{y} = \lambda y_i + (1 - \lambda) y_j$$

where $\lambda \sim \text{Beta}(\alpha, \alpha)$, teaching the model to generalize rather than memorize.

  1. Frontend (Next.js / TypeScript) — A responsive web app where users can upload or capture a leaf photo and receive an instant diagnosis with confidence scores.

  2. AI Assistant (features/assistant) — A conversational layer powered by an LLM that explains detected diseases, recommends treatments, and guides farmers through next steps.

Data is persisted via Supabase (PostgreSQL + storage), enabling scan history, user profiles, and analytics.

Challenges We Ran Into

  • Train/inference mismatch — The training script exported a PyTorch .pkl while the FastAPI server expected a TensorFlow .keras model. Reconciling this required a full pipeline rewrite.
  • Real-world accuracy drop — Initial accuracy on controlled datasets was high (~95%), but dropped sharply on noisy field photos with shadows, hands, and uneven lighting. Solving this meant combining PlantVillage with PlantDoc and introducing aggressive augmentations simulating outdoor conditions.
  • Latency vs. accuracy tradeoff — Heavier models like EfficientNetB3 improved accuracy significantly but required careful optimization to keep API response times acceptable for mobile users in low-bandwidth environments.

Accomplishments That We're Proud Of

  • Built a fully functional end-to-end AI pipeline — from raw leaf image to actionable diagnosis — in a single cohesive application.
  • Achieved meaningful real-world accuracy improvements by bridging the gap between lab-condition training data and actual field conditions.
  • Integrated a conversational AI assistant that makes the diagnosis human and approachable, not just a label and a number.
  • Delivered a clean, responsive UI that works for non-technical users like farmers who may be using a smartphone for the first time.

What We Learned

  • Transfer learning — leveraging pre-trained architectures like MobileNetV2 and EfficientNetB3 and fine-tuning them for domain-specific classification.
  • Data quality over quantity — combining datasets and applying real-world augmentations had a far greater impact on accuracy than simply training longer.
  • Full-stack AI integration — connecting a Python ML backend to a modern Next.js frontend is non-trivial; API contracts, error handling, and latency all need deliberate design.
  • User empathy in AI — a raw confidence score means nothing to a farmer. Pairing the model output with a conversational AI that explains why and what to do next is what makes the product truly useful.

What's Next for AGRI NOVA

  • Object detection upgrade — migrating from classification to YOLOv8 / YOLOv11 to draw bounding boxes directly over the diseased region, giving farmers visual proof of exactly where the problem is.
  • Multilingual support — serving farmers in Tamil, Hindi, Telugu, and other regional languages to maximize accessibility across India.
  • Offline mode — exporting a lightweight quantized model for on-device inference, so the app works even without internet connectivity in rural areas.
  • Treatment marketplace — connecting diagnosed crops to verified local suppliers of pesticides and organic remedies directly within the app.
  • Crop health timeline — allowing farmers to track the health of their fields over time with historical scan data and trend analytics.

Built With

Share this project:

Updates

Submission history