Skip to main content
Iheb Jdey
Back to Work

Applied AI · Computer Vision

AgriDiagnose AI

AI-assisted plant health platform combining a 39-class MobileNetV2 model with a multilingual Flask application.

  • Python
  • TensorFlow
  • MobileNetV2
  • Flask
  • PostgreSQL
  • GitHub Actions
View repository
AgriDiagnose AI result identifying Tomato Leaf Mold from a leaf image.
Model prediction result for Tomato Leaf Mold.

01

Overview

A full-stack machine-learning application for plant-leaf analysis with authentication, prediction history, dashboards, multilingual support and a REST API.

02

Dataset & Model

Audited images
73,563
Training
58,857
Validation
7,362
Internal test
7,344
Classes
39
Crops
14

Model flow

224×224 RGB
MobileNetV2
GlobalAveragePooling2D
Dropout 0.25
Dense 39 softmax

Preprocessing

Resize → float32 → /255.0

Confidence threshold

60%

03

Application Architecture

AI

TensorFlow · Keras · MobileNetV2 · OpenCV

Backend

Flask · Blueprints · SQLAlchemy · REST API

Data

SQLite development · PostgreSQL support

Engineering

pytest · Alembic · GitHub Actions · SHA-256

04

Evaluation

AgriDiagnose model evaluation results
EvaluationAccuracyMacro-F1
Validation95.48%96.01%
Internal test95.44%95.92%
External PlantDoc subset41.41%45.79%

The model performs strongly on the internal audited dataset, but the external PlantDoc subset reveals substantial domain shift. The external result is presented as evidence of the model’s current real-world limitation rather than hidden or treated as a tuning target.

05

External Domain Shift

Internal test performance is not field accuracy. The PlantDoc subset measures transfer to different image conditions and exposes a substantial generalization gap.

06

Application Features

Authentication, Top-3 predictions, history, dashboard, EN/FR/AR localization and Arabic RTL support connect the model to a usable application workflow.

English crop-health dashboard with the leaf upload area.
Leaf-analysis workflow and model coverage.

07

Limitations

  1. 01Internal evaluation does not represent field accuracy.
  2. 02Treatment decisions require qualified local agricultural expertise.
French model-coverage view listing supported crops.
Supported-crop coverage presented in French.
Arabic prediction result for potato late blight.
Arabic RTL prediction result.

08

Documentation

The repository contains the application, model workflow and evaluation documentation used for this case study.

View repository