π± Plant Disease Classifier
A professional web application for detecting plant diseases using Convolutional Neural Networks (CNN). Features bilingual support (English/Pashto), RTL/LTR switching, user authentication, admin dashboard, and comprehensive disease management.
π Features
π Multi-Language Support
- English & Pashto interface with automatic RTL/LTR switching
- Real-time language switching without page reload
- Complete bilingual disease information
π₯ User Management
- User registration and login system
- Role-based access control (Admin/User)
- User prediction history tracking
- Profile management
π― Disease Detection
- Real-time plant disease classification
- 8 PlantVillage dataset classes support
- Disease severity analysis
- Treatment recommendations
- Prevention tips
π Admin Dashboard
- Comprehensive system statistics
- User management interface
- Message inbox with reply functionality
- System logs with auto-deletion
- Disease information management
π§ Technical Features
- Flask web framework with SQLAlchemy ORM
- TensorFlow/Keras model integration
- Responsive Bootstrap 5 design
- File upload with validation
- Real-time progress indicators
- Toast notifications
- Sidebar navigation with toggle
- Disclaimer and warning system
π Project Structure
π± Plant Disease Classifier
A professional web application for detecting plant diseases using Convolutional Neural Networks (CNN). Features bilingual support (English/Pashto), RTL/LTR switching, user authentication, admin dashboard, and comprehensive disease management.
π Features
π Multi-Language Support
- English & Pashto interface with automatic RTL/LTR switching
- Real-time language switching without page reload
- Complete bilingual disease information
π₯ User Management
- User registration and login system
- Role-based access control (Admin/User)
- User prediction history tracking
- Profile management
π― Disease Detection
- Real-time plant disease classification
- 8 PlantVillage dataset classes support
- Disease severity analysis
- Treatment recommendations
- Prevention tips
π Admin Dashboard
- Comprehensive system statistics
- User management interface
- Message inbox with reply functionality
- System logs with auto-deletion
- Disease information management
π§ Technical Features
- Flask web framework with SQLAlchemy ORM
- TensorFlow/Keras model integration
- Responsive Bootstrap 5 design
- File upload with validation
- Real-time progress indicators
- Toast notifications
- Sidebar navigation with toggle
- Disclaimer and warning system
π Supported Plant Diseases
The system detects 8 common plant diseases from the PlantVillage dataset:
English Classes:
- Pepper Bell Bacterial Spot
- Pepper Bell Healthy
- Potato Early Blight
- Potato Late Blight
- Potato Healthy
- Tomato Bacterial Spot
- Tomato Early Blight
- Tomato Late Blight
π Project Structure
plant-disease-classifier/
β
βββ app.py # Main Flask application
βββ cnn.h5 # Trained CNN model
βββ requirements.txt # Python dependencies
βββ Procfile # Heroku deployment
βββ runtime.txt # Python version
βββ .gitignore # Git ignore file
β
βββ static/ # Static files
β βββ css/
β β βββ style.css # Main styles
β β βββ rtl.css # RTL styles
β βββ js/
β β βββ script.js # JavaScript functions
β βββ uploads/ # User uploaded images
β
βββ templates/ # HTML templates
β βββ base.html
β βββ index.html
β βββ login.html
β βββ register.html
β βββ profile.html
β βββ prediction.html
β βββ results.html
β βββ analysis.html
β βββ about.html
β βββ contact.html
β βββ admin_dashboard.html
β βββ admin_users.html
β βββ admin_messages.html
β βββ admin_logs.html
β βββ admin_diseases.html
β βββ edit_disease.html
β βββ disease_info.html
β
βββ plant_disease.db # SQLite database
π Quick Start Guide
Prerequisites
- Python 3.8 or higher
- pip (Python package manager)
- Git
Step 1: Clone the Repository
git clone https://github.com/yourusername/plant-disease-classifier.git
cd plant-disease-classifier
π¦ requirements.txt
Flask==2.3.3
flask-sqlalchemy==3.0.5
flask-login==0.6.2
flask-bcrypt==1.0.1
tensorflow==2.13.0
keras==2.13.1
numpy==1.24.3
pillow==10.0.0
schedule==1.2.0
gunicorn==21.2.0
python-dotenv==1.0.0
π’ Deployment
Heroku Deployment
# Login to Heroku
heroku login
# Create Heroku app
heroku create your-app-name
# Set buildpack
heroku buildpacks:set heroku/python
# Deploy
git push heroku main
# Open application
heroku open
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support