AgriGuard combines dual-stage deep learning with IoT soil sensors to give farmers instant disease diagnosis, treatment advice, and automated water management.
Capabilities
A single system covering the full workflow from disease identification to treatment and water management.
Two-stage classification pipeline identifies the crop species first, then diagnoses the specific disease from 76 possible conditions.
Returns pesticide name, dosage, spray interval, water dilution ratio, and safety notes from a database of 76+ verified records.
Capacitive sensor on ESP32-WROOM reads analog moisture levels every 4 seconds, streamed to the mobile app via backend proxy.
Manual ON/OFF toggle or automatic mode that activates the pump below 30% moisture and deactivates above 70%. Failsafe defaults to OFF.
Email-based OTP for registration and password reset. Passwords hashed with bcrypt, sessions managed via JWT with 30-day expiry.
Field-mounted camera module captures leaf images on demand. Backend resolves device IP dynamically and proxies the connection.
System Design
Four decoupled tiers communicating over REST and HTTP, deployed across cloud and edge.
React Native / Expo
GitHub Releases (APK)
Node.js / Express
Render
Flask / TensorFlow
Hugging Face Spaces
MongoDB Atlas
5 collections
ESP32-CAM + WROOM
Local network
Mobile App
React Native app with tab navigation, secure storage, and real-time device communication.



.jpg)
.png)
.png)
.jpg)
.png)




Machine Learning
Two EfficientNetB3 models execute sequentially with confidence thresholds and a dynamic fallback mechanism.
Step 01
Image is resized to 300×300, converted to RGB, and pixel values normalized to 0–1 range.
Step 02
Model 1 identifies the crop species from 11 classes. Rejected if confidence is below 45% or classified as Unknown.
Step 03
Model 2 diagnoses the disease from 76 conditions, filtered by detected crop. Dynamic fallback evaluates runner-up crops for edge cases.
Step 04
Returns crop name, disease, confidence score, and health flag. Backend fetches matching pesticide advisory from MongoDB.
Technology
Get Started
Download the APK, photograph a leaf, get a diagnosis.