🌿 AgriNova β€” AI-Powered Smart Agriculture Ecosystem

Smart Farming, Better Harvest
A complete AgriTech system combining drone-based crop health monitoring, real-time AI detection, and farmer alerts β€” built for Indian farmers.

πŸš€ What is AgriNova?

AgriNova is a full-stack smart agriculture ecosystem where a drone flies over a farm, detects crop diseases in real time using AI, maps every tree's health status, and instantly alerts the farmer via WhatsApp β€” all from a mobile app.


πŸ—οΈ System Architecture

Drone Camera (PiCamera2)
        ↓
Raspberry Pi 4  ←→  YOLOv8 Model (Edge AI)
        ↓                    ↓
  Pixhawk GPS         Disease Detection
        ↓                    ↓
   Flask Server (Port 8000) on Pi
        ↓
  Android Mobile App
  β”œβ”€β”€ Live Drone Feed (MJPEG Stream)
  β”œβ”€β”€ Real-Time Farm Grid (Farm Tree Map)
  β”œβ”€β”€ Gallery Scan (Plantix-style)
  β”œβ”€β”€ AI Expert Diagnosis
  β”œβ”€β”€ Agri Market
  └── Farm Area Calculator (GPS)
        ↓
  WhatsApp Alerts via Twilio
  β”œβ”€β”€ Per-detection alert (pest + confidence + GPS)
  └── Full farm scan summary report

✨ Features

🚁 Drone Module

  • Live Drone Feed β€” Real-time MJPEG video stream from PiCamera2 to mobile app
  • Edge AI Detection β€” YOLOv8 runs directly on Raspberry Pi (no cloud needed)
  • Drone Capture β€” Capture image on demand with instant AI analysis
  • GPS Geotagging β€” Every detection tagged with GPS coordinates via Pixhawk flight controller
  • Detection Logging β€” All detections saved as images + JSON with GPS + Google Maps link

πŸ—ΊοΈ Farm Grid

  • Live Custom Tree Health Map β€” Each tree shown as Affected / Healthy / Pending input is taken from farm
  • Configurable Grid β€” Set rows, columns, frames per tree, and detection threshold at runtime
  • Auto-refreshes every 5 seconds β€” Live updates as drone scans the farm
  • Visual Web Dashboard β€” Flask serves a live HTML grid page

πŸ“± Mobile App (Android)

  • Multi-language β€” English, Marathi, Hindi
  • Home Dashboard β€” Live weather, your crops, daily farming tips
  • Drone Control Panel β€” Drone Capture, Live Stream, Gallery Scan, Live Farm Grid
  • Gallery Scan β€” Farmer uploads any crop photo β†’ instant pest/disease detection
  • AI Expert β€” Describe problem + upload photo β†’ AI gives diagnosis and advice
  • Agri Market β€” Buy seeds, pesticides, fertilizers directly in app (β‚Ή)
  • Farm Area Calculator β€” Calculate field area via GPS in Acres, Hectares, Guntha
  • User Authentication β€” Login/Register system

πŸ’¬ WhatsApp Alerts (Twilio)

  • Real-time pest alert β€” Sent when disease detected with name, confidence %, GPS, timestamp
  • Full scan summary β€” Sent after complete farm scan with total affected/healthy trees, disease breakdown, and Google Maps location link

🦠 Diseases Detected

# Disease Crop
1 Powdery Mildew Grapes, Tomato
2 Downy Mildew Grapes
3 Early Blight Tomato

πŸ”„ Coming Soon: Nutritional deficiency detection (dataset ready, model training in progress)


πŸ› οΈ Tech Stack

AI & Computer Vision

  • YOLOv8 β€” Object detection model (trained on custom dataset)
  • OpenCV β€” Image processing and video streaming
  • Python β€” Core backend language

Hardware

  • Raspberry Pi 4 β€” Edge computing, runs detection + Flask server
  • PiCamera2 β€” Drone-mounted camera
  • Pixhawk Flight Controller β€” GPS via MAVLink protocol

Backend & API

  • Flask β€” REST API + MJPEG video streaming server on Pi
  • PyMAVLink β€” Drone GPS communication
  • Twilio β€” WhatsApp alert integration

Mobile App

  • Android β€” Native mobile application
  • HTTP β€” Connects to Flask server on Raspberry Pi

Model Training

  • Google Colab β€” YOLOv8 model training
  • Custom Dataset β€” Annotated crop disease images

πŸ“‘ Flask API Endpoints (Runs on Raspberry Pi)

Endpoint Description
/video_feed Live MJPEG drone stream
/latest_detection Latest detected frame as JPEG
/detection_info Latest pest detection as JSON
/status System status + GPS info
/log Full geotagged detection log
/tree_health Farm scan summary JSON
/farm_grid Full grid status JSON
/grid_view 🌿 Visual farm health webpage

βš™οΈ Setup & Configuration

Requirements

pip install ultralytics picamera2 pymavlink twilio flask opencv-python

Configuration

Before running, set your credentials in agrinova_modified.py:

TWILIO_SID    = "your_twilio_sid_here"
TWILIO_TOKEN  = "your_twilio_token_here"
TWILIO_FROM   = "whatsapp:+XXXXXXXXXXXXX"
FARMER_NUMBER = "whatsapp:+91XXXXXXXXXX"

Run on Raspberry Pi

python agrinova_modified.py

You will be prompted to enter:

  • Number of rows and columns (farm grid size)
  • Frames per tree (how many frames to analyze per tree)
  • Detection threshold % (e.g. 20 means 20% pest frames = affected)

πŸ† Achievements

  • πŸ₯‡ 1st Place β€” Open Innovation Track, Sambhaji Rao Jondhale College of Engineering, Dombivli
  • πŸ† Winner β€” ExpoTech Competition, Vision 2026, Walchand College of Engineering, Sangli
  • πŸ₯ˆ Runner-Up β€” Ideathon, Vision 2026, Walchand College of Engineering, Sangli

πŸ‘¨β€πŸ’» Team

Built by a team of 4 β€” Robotics & Automation Engineering students at Walchand College of Engineering, Sangli


πŸ“„ Files in This Repository

File Description
agrinova_modified.py Main Raspberry Pi script β€” detection + Flask server + WhatsApp alerts
galleryscanfeature.py Gallery scan feature β€” farmer uploads photo for detection
collabmodeltraining.ipynb Google Colab notebook for YOLOv8 model training
changingdefaultlabels.ipynb Notebook for customizing dataset labels
data12.yaml YOLOv8 dataset configuration file

⚠️ best.pt (trained model) is not included in this repo due to file size. Contact us to get the model.


AgriNova v1.0 β€’ Made for Indian Farmers 🌾

Built With

Share this project:

Updates