Back to selected work
Computer Vision · Deep Learning/Plant Disease Detection

PlantScan AI

Deep-learning powered plant disease diagnosis from a leaf image, with model comparison and a camera-ready Flask application.

Project snapshot
Transfer learning → shipped app

Three CNN backbones were trained and evaluated. EfficientNetB0 and MobileNetV2 share the same 38-class dataset and are the interchangeable models exposed by the application.

98%
Best accuracy
38
Classes
03
Models trained
Flask
Inference
PlantScan AI project preview
01 / The problem

A leaf image should be enough to start a diagnosis.

Plant disease identification can be slow when a grower has to rely on manual inspection or specialist access. PlantScan AI turns a leaf photo into a model-backed diagnosis report with confidence, symptoms, treatment and prevention information.

02 / The ML approach

Transfer learning across three CNN backbones.

The project uses ImageNet-pretrained CNN backbones and a two-phase training recipe: first train a new classification head with the backbone frozen, then unfreeze the last 30 layers and fine-tune at a low learning rate. Images are resized to 224×224 with augmentation and an 80/20 train-validation split.

EfficientNetB0

38-class PlantVillage-color model; 98% final accuracy and the app's default model.

MobileNetV2

38-class PlantVillage-color model; 95% final accuracy and a smaller/faster alternative.

ResNet50

96% on a separate 15-class PlantVillage subset; not directly comparable to the other two.

03 / Model comparison

The numbers are only useful when the datasets match.

ModelDatasetClassesParamsAccuracy
EfficientNetB0PlantVillage-color384.1M98%
MobileNetV2PlantVillage-color382.3M95%
ResNet50PlantVillage subset1523.6M96%

ResNet50 was trained on a different, smaller dataset containing 15 classes from Pepper, Potato and Tomato. Its 96% result should therefore not be presented as a direct head-to-head win or loss against the 38-class EfficientNetB0 and MobileNetV2 models.

04 / Product pipeline

From camera frame to diagnosis report.

Input
Upload or live camera
Quality gate
Brightness · sharpness · motion
Inference
Selected .keras model
Flask API
Prediction + confidence
Report
Symptoms · treatment · prevention

The live camera path uses the browser camera API and canvas capture, then sends the captured frame through the same inference pipeline as an uploaded image. A lightweight browser-side quality check can auto-capture once the frame is well-lit, sharp and steady.

05 / Engineering decisions

Why the production dropdown only exposes two models.

EfficientNetB0 and MobileNetV2 were trained on the same 38-class dataset and share the same class mapping, so they are safe interchangeable choices in the application. ResNet50 is intentionally excluded from that selector because its 15-class dataset uses a different label mapping; wiring it into the same selector without separate handling could produce incorrect labels.

Default

EfficientNetB0 because it reached 98% on the shared 38-class evaluation.

Alternative

MobileNetV2 at 95%, useful when a smaller/faster backbone is preferred.

Separated

ResNet50 remains part of the research comparison, not the shared production selector.

06 / Tech stack

A compact computer-vision stack from training to inference.

PythonTensorFlowKerasEfficientNetB0MobileNetV2ResNet50OpenCVScikit-learnFlaskHTML / CSS / JavaScript
07 / Results

98% on the shared 38-class evaluation.

98%
EfficientNetB0 accuracy
38 classes · PlantVillage-color
95%
MobileNetV2 accuracy
38 classes · PlantVillage-color
96%
ResNet50 accuracy
15 classes · separate dataset
Explore the implementation

The model comparison is only the beginning.

Explore the training notebooks, Flask inference service, camera workflow and full model-comparison report in the repository.