How shimekano/plant-disease-detection works
Plant Disease AI is a Streamlit app for classifying uploaded leaf images and presenting Vietnamese results and educational treatment guidance. The main workflow resizes and normalizes an image, runs the saved 15-class model, maps scores to disease information, and displays the leading prediction plus Top-3 scores. The README also describes a training notebook and the model artifact. Runtime behavior is concentrated in app.py; the notebook’s implementation was not sampled, so its internal training steps are not shown.
Main entry points: app.py Streamlit upload UI · best_model.h5 15-class model · plant_disease_training.ipynb Training notebook
Components 12
User interface
- Streamlit upload UI
app.py - Uploaded leaf image
app.py
Image inference
- Model loader
app.py - 15-class model
model/best_model.h5 - Image preprocessing
app.py - MobileNetV2 inference
app.py
Results and guidance
- Class name mapping
app.py - Disease information
app.py - Prediction and Top-3
app.py - Treatment and safety guidance
app.py
Model development
- Training notebook
notebooks/plant_disease_training.ipynb
Other components
- Grower
Connections 11
- Grower → Streamlit upload UI: uploads image
- Streamlit upload UI → Uploaded leaf image: receives image
- Model loader → 15-class model: loads weights
- Streamlit upload UI → Model loader: loads model
- Streamlit upload UI → Image preprocessing: resizes and normalizes
- Streamlit upload UI → MobileNetV2 inference: predicts tensor
- MobileNetV2 inference → Class name mapping: returns scores
- Streamlit upload UI → Prediction and Top-3: renders prediction
- Streamlit upload UI → Treatment and safety guidance: renders guidance
- Class name mapping → Disease information: selects disease details
- Training notebook → 15-class model: trains model