How gioaprilino/grape-leaf-disesase-detection works
This repository is a grape-leaf disease classifier with two main workflows: users upload an image for preprocessing, feature extraction, validation and KNN prediction; researchers build a labeled feature dataset, tune the classifier and evaluate results. The UI also presents confidence, class probabilities, feature plots and contour-related information. The graph includes the documented training and validation capabilities, but some app internals are omitted from the excerpts, so those links rely on README statements rather than claims about unseen calls.
Main entry points: app.py Streamlit App · run_pipeline.py Training Pipeline · train.py Feature Dataset Builder · features.py Feature Extraction
Components 14
Image Detection
- Streamlit App
app.py - Image Preprocessing
src/preprocess.py - Feature Extraction
src/features.py - Leaf Validation
app.py - Trained KNN
models/knn_td_model.pkl - Prediction Results
app.py
Model Training
- Training Pipeline
run_pipeline.py - Feature Dataset Builder
src/train.py - KNN Tuning
src/train.py - Saved Model
models/knn_td_model.pkl
Evaluation
- Model Evaluation
src/evaluate.py - Metrics and Plots
results
Other components
- Image Uploader
- Labeled Images
Connections 15
- Image Uploader → Streamlit App: uploads image
README.md - Streamlit App → Image Preprocessing: preprocesses image
README.md - Streamlit App → Feature Extraction: extracts features
README.md - Feature Extraction → Image Preprocessing: builds contour mask
src/features.py - Streamlit App → Leaf Validation: validates leaf
README.md - Streamlit App → Trained KNN: predicts class
README.md - Streamlit App → Prediction Results: displays prediction
README.md - Labeled Images → Training Pipeline: provides images
README.md - Training Pipeline → Feature Dataset Builder: builds features
run_pipeline.py - Feature Dataset Builder → Image Preprocessing: loads and preprocesses
src/train.py - Feature Dataset Builder → Feature Extraction: extracts features
src/train.py - Training Pipeline → KNN Tuning: trains classifier
run_pipeline.py - KNN Tuning → Saved Model: saves model
- Training Pipeline → Model Evaluation: evaluates model
run_pipeline.py - Model Evaluation → Metrics and Plots: writes reports
src/evaluate.py