This repository contains a project that uses a pre-trained machine learning model to classify diseases on corn leaves. The project includes a Streamlit-based web application for easy interaction and deployment.
Corn is a vital crop worldwide, and early detection of leaf diseases is critical for maximizing yield. This project focuses on:
- Providing an interactive web application using Streamlit.
- Enabling predictions using a trained classification model (
corn_leaf_classifier.h5
).
The app predicts the condition of a corn leaf (e.g., Blight, Common Rust, Gray Leaf Spot, or Healthy) with confidence scores.
- Streamlit Web App: User-friendly interface for uploading and classifying leaf images.
- Pre-trained Model: Efficient classification with
corn_leaf_classifier.h5
. - Error Handling: Robust validation for image uploads and model predictions.
.
βββ .devcontainer/ # Development container configuration (optional)
βββ corn_leaf_classifier.h5 # Pre-trained model for classification
βββ new_streamlit.py # Streamlit app script
βββ requirements.txt # Dependencies for the project
-
Clone the Repository:
git clone https://github.com/nnatureall/Corn_Leaf_Diseases_Classifier_With_CNN.git cd corn-leaf-disease-classification
-
Install Dependencies:
Ensure Python is installed on your system (Python 3.8+ recommended). Install dependencies using:pip install -r requirements.txt
-
Run the App:
Launch the Streamlit app locally:streamlit run new_streamlit.py
- Open the Streamlit app in your browser (usually at
http://localhost:8501
). - Upload an image of a corn leaf (supported formats:
.png
,.jpg
,.jpeg
). - Click on the Classify button to predict the condition of the leaf.
- Push the repository to GitHub.
- Visit Streamlit Community Cloud.
- Select your repository and set the entry point as
new_streamlit.py
. - Deploy and share the app link!
https://cornleafdiseasesclassifierwithcnn-iqbkasqkm53kgctun5m2vj.streamlit.app/```
---
## π License
This project is licensed under the [MIT License](LICENSE).
Feel free to use, modify, and deploy this project for educational or research purposes.
---