Plant Disease Detector
with AI-Generated Image Validation System
A two-stage deep learning pipeline using ResNet-18 with pretrained ImageNet weights that first verifies whether a leaf image is real or AI-generated, then classifies the disease — ensuring reliable, tamper-proof plant disease diagnosis.
Problem Statement
All existing plant disease detection systems assume input images are authentic. With the rise of AI image generators like Stable Diffusion and GANs, digitally manipulated leaf images can easily deceive classifiers — causing wrong diagnoses, corrupting research datasets, and enabling misuse like insurance fraud.
No existing system checks image authenticity before diagnosing disease. This project solves that gap.
Research Objectives
- → Detect real vs AI-generated/tampered plant leaf images
- → Classify tomato leaf diseases from authentic images only
- → Integrate both into a secure two-stage AI pipeline
- → Add real-world usability features for practical deployment
- → Analyze impact of fake images on classification accuracy
Methodology
Dataset
PlantVillage (5,452 real images, 4 tomato classes). Fake images generated via custom augmentation pipeline simulating AI artifacts.
Model
ResNet-18 with pretrained ImageNet weights (Transfer Learning). Dropout(0.3) added before final layer to prevent overfitting.
Training
Adam optimizer, lr=0.0001, weight decay 1e-4. 80/20 train-val split. Early stopping with patience=4 to prevent overfitting.
Deployment
Streamlit web app with file upload, webcam capture, confidence thresholding, and session history logging.
System Pipeline
Literature Review
Mohanty et al. (2016)
2016CNN on PlantVillage achieved >99% accuracy but all images were lab-controlled. No authenticity check on inputs.
Too et al. (2019)
2019ResNet and DenseNet outperform older models. Constrained to clean datasets with no out-of-distribution or fake image testing.
Karthik et al. (2020)
2020Attention-based DenseNet for tomato disease detection. Superior interpretability but no robustness against AI-generated images.
Hasan et al. (2023)
2023Real-time MobileNetV2 plant disease system for edge devices. Practical but lacks any fake image detection mechanism.
Shoaib et al. (2025)
2025Comprehensive DL review in Frontiers in Plant Science covering CNNs, Vision Transformers, and hybrid architectures for disease and pest detection. No authenticity verification addressed.
Ashurov et al. (2025)
2025Depthwise CNN with Squeeze-and-Excitation blocks and residual skip connections for enhanced detection accuracy. Evaluated only on clean datasets — no AI-generated image testing.
InsightNet (2025)
2025MobileNet-based low-cost real-time leaf disease detection for mobile/edge deployment. No fake detection; vulnerable to authenticity errors.
Research Gap — What This Project Solves
Every reviewed system — from 2016 to the latest 2025 publications — assumes all inputs are authentic. None include a pre-classification authenticity check. This project directly addresses that gap with a two-stage pipeline that validates image authenticity before any disease prediction is made. As of 2025, no published work combines authenticity verification with plant disease diagnosis in a single pipeline.
PBL-2 Enhancements
Built on top of the PBL-1 foundation during 4th semester (PBL-2)
Webcam Integration
Streamlit's st.camera_input() enables real-time leaf capture directly in the browser — no file upload needed. Useful for field use by farmers.
Treatment Recommendation Engine
Disease predictions are mapped to specific treatment advice via a lookup dictionary. Transforms the system from a pure classifier into a practical decision-support tool for farmers.
Confidence Threshold Warning
If disease classifier confidence is below 60%, the system warns the user to retake the image instead of showing an unreliable prediction. Prevents false positive diagnoses.
Session Prediction History
All predictions within a session are stored using Streamlit session state and displayed as an expandable log in the sidebar — timestamp, authenticity, disease, and confidence per entry.
Training Results
Academic Credits
Project Guide
Dr. Ashok Kumar Saini
Department of CSE
Student
Garv Jhuremalani
2427030363 | Section-B | IV Sem