How saadtechie/plant-disease-detection works
This repository is a plant-leaf disease classifier. Its documented workflow downloads and organizes image data, trains an augmented CNN, then serves predictions through a Gradio interface. The sampled code also includes a separate image-prediction script and a directory-setup helper. The README documents the broader pipeline; the graph’s links reflect only relationships visible in the README or sampled source, so it does not assume unsampled orchestration.
Main entry points: demonstration.py Image preprocessing and prediction · repartition.py Train/val/test split · train_model_aug.py Augmented CNN training · download_with_token.py Dataset download
Components 12
Data preparation
- Dataset download
download_with_token.py - Raw images
- Class directories
classement.py - Train/val/test split
repartition.py - Processed images
Model training
- Augmented CNN training
train_model_aug.py - Trained CNN
Diagnosis
- Gradio interface
demonstration.py - Image preprocessing and prediction
demonstration.py - Standalone prediction
predict_aug.py
Other components
- User
- Kaggle dataset
Connections 13
- User → Gradio interface: uploads leaf image
demonstration.py - Gradio interface → Image preprocessing and prediction: dispatches prediction
demonstration.py - Image preprocessing and prediction → Trained CNN: loads and predicts
demonstration.py - Image preprocessing and prediction → User: returns class scores
demonstration.py - User → Standalone prediction: runs image prediction
predict_aug.py - Standalone prediction → Trained CNN: loads and predicts
predict_aug.py - Kaggle dataset → Dataset download: provides dataset
download_with_token.py - Dataset download → Raw images: downloads images
download_with_token.py - Class directories → Processed images: creates class folders
classement.py - Train/val/test split → Raw images: moves images from
repartition.py - Train/val/test split → Processed images: writes image splits
repartition.py - Augmented CNN training → Processed images: loads train and validation
train_model_aug.py - Augmented CNN training → Trained CNN: saves best checkpoint
train_model_aug.py