Edge-Optimized Deep learning for Crop Diagnostic
Presented by: Ashna Imtiaz
Institution: MPK University (Indus AI Week Exhibition)
The Silent Crisis in Agriculture
Global Impact
20% to 40% of global crop yields are lost annually to pests and diseases.
The Diagnostic Gap
Small-scale farmers lack access to professional plant pathologists.
Economic Loss
Delayed detection leads to total harvest failure and financial ruin.
Mission: To put a real-time, expert-level diagnostic tool in the pocket of every farmer.
Smart Diagnostics at the Edge
AI-Powered
Uses Convolutional Neural Networks (CNNs) to identify diseases from a single photo.
Edge-Optimized
Specifically designed to run on low-power mobile devices, not just expensive servers.
XAI (Explainable AI)
Provides visual proof (heatmaps) so farmers can trust the AI's decision.
The PlantVillage Dataset
The foundation of our deep learning model is built upon a comprehensive and diverse dataset.
1
Scope
54,303 high-quality images of plant leaves.
2
Diversity
14 different crop species (Tomato, Potato, Corn, Apple, etc.).
3
Classification
38 distinct classes encompassing various bacterial, viral, and fungal diseases, plus healthy samples.
4
Preprocessing
Images resized to 224x224 pixels with RGB normalization for optimal model performance.
MobileNetV2 & Transfer Learning
Why MobileNetV2?
Uses Depthwise Separable Convolutions to reduce parameters, making it 10x faster than standard CNNs.
Transfer Learning
We utilized a model pre-trained on ImageNet to leverage existing "visual knowledge," which was then fine-tuned for agricultural specifics.
Architecture Layers
Making AI Portable
Framework
Built using TensorFlow and Keras.
Quantization
Converted the heavy .h5 model into a lightweight .tflite (TensorFlow Lite) format.
Benefit
  • Reduced model size (easier to download).
  • Faster inference (near-instant results on mobile).
  • Lower battery consumption for field use.
High-Performance Metrics
Metrics
  • Training Epochs: 10
  • Optimizer: Adam (Adaptive Moment Estimation)
  • Loss Function: Categorical Crossentropy
  • Validation Accuracy: ~94.8%
The model shows high generalization capabilities, effectively distinguishing between very similar-looking diseases (like Early vs. Late Blight).
Source Code
Seeing Through the Eyes of AI
The Problem
Most AI is a "Black Box"—it gives a result but doesn't explain why.
Our Solution
Using Grad-CAM (Gradient-weighted Class Activation Mapping).
Visual Proof
The system generates a Heatmap highlighting the specific spots on a leaf that triggered the diagnosis. This builds trust with the farmer.
Beyond the Exhibition
Offline Support
Fully offline mobile application for remote areas without internet.
Multilingual UI
Adding Urdu and Sindhi language support for local farmers.
IoT Integration
Linking the AI with automated pesticide sprayers to treat only the infected areas.
Tech for a Greener Tomorrow
AgriVision proves that advanced AI doesn't need to be expensive or complex. By optimizing for the "Edge," we can democratize plant pathology and secure the future of food.
Contact Info:
Made with