🌱 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
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support