πΏ 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
- jupyter-notebook
- python