00:00
ID: 2427030363  |  PBL-2  |  Jan–May 2026

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.

ResNet-18 PyTorch Transfer Learning 91.21% Fake Detection 99.45% Disease Classification Streamlit

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

Input Image
Upload or Webcam
Fake Detector
ResNet-18 Binary
91.21% acc
If Fake
Pipeline halts
Alert shown
If Real
Disease Classifier
ResNet-18 Multi-class
99.45% acc
Treatment
Recommendation
+ Confidence check
Disease classes: Early Blight · Late Blight · Leaf Mold · Healthy

Literature Review

Mohanty et al. (2016)

2016

CNN on PlantVillage achieved >99% accuracy but all images were lab-controlled. No authenticity check on inputs.

Too et al. (2019)

2019

ResNet and DenseNet outperform older models. Constrained to clean datasets with no out-of-distribution or fake image testing.

Karthik et al. (2020)

2020

Attention-based DenseNet for tomato disease detection. Superior interpretability but no robustness against AI-generated images.

Hasan et al. (2023)

2023

Real-time MobileNetV2 plant disease system for edge devices. Practical but lacks any fake image detection mechanism.

Shoaib et al. (2025)

2025

Comprehensive 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)

2025

Depthwise 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)

2025

MobileNet-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

Fake Detector
91.21%
Val Acc · 2,560 images · ResNet-18
Disease Classifier
99.45%
Val Acc · 5,452 images · 4 classes
Early Stopping at
Epoch 9
Disease model · Patience=4
Architecture
ResNet-18 × 2
Optimizer
Adam lr=0.0001
Regularization
Dropout 0.3 + WD
Train/Val Split
80% / 20%

Academic Credits

Project Guide

Dr. Ashok Kumar Saini

Department of CSE

Student

Garv Jhuremalani

2427030363 | Section-B | IV Sem