PlantCare AI is a deep learning-based project designed to automatically detect and classify plant diseases from leaf images. Plant diseases significantly affect crop productivity, and early detection is essential for preventing large-scale agricultural losses. Traditional disease identification methods rely on manual inspection by experts, which can be time-consuming and sometimes inaccurate.
This project uses transfer learning with the MobileNetV2 Convolutional Neural Network (CNN) to build an efficient and accurate plant disease classification model. The model is trained on the New Plant Diseases Dataset, which contains 87,000+ labeled plant leaf images across 38 different classes, including healthy and diseased leaves from crops such as Apple, Corn, Grape, Potato, and Tomato.
Real-time Image Classification: Upload leaf images and get instant diagnostic results.
Persistent Image Display: The UI "remembers" your uploaded image on the result page using unique filename logic.
Dual View Optimization: Fully responsive layout for both Desktop (camera-enabled) and Mobile (home-focused) use.
Confidence Scoring: Provides an AI confidence percentage for every diagnosis.
Source: New Plant Diseases Dataset (Kaggle) via SkillWallet.
Scale: 87,000+ augmented RGB images.
Diversity: 38 classes covering 14 different plant species (Apple, Tomato, Corn, etc.).
Format: JPEG images originally 256Γ256 pixels.
Base Model: MobileNetV2 (using Transfer Learning).
Input Shape: 224Γ224Γ3 (RGB).
Optimizer: Adam with categorical cross-entropy loss.
Accuracy: Achieved ~93.6% validation accuracy.
Result Page: Displays the processed image (224x224), the AI confidence score, and recommended actions required for the specific plant/disease diagnosis.
git clone https://github.com/your-username/PlantCare-AI.git
cd "Plantcare Website"conda create -n plantcare python=3.11 -y
conda activate plantcarepip install -r requirements.txtpython app.pyAccess the site at: http://127.0.0.1:5000
Our Link :
https://sayan04-plantcare-web.hf.space/βββ model/
β βββ class_indices.json # Maps AI output indices to disease names
β βββ plant_disease_recog.keras # Pre-trained Keras model
βββ static/
β βββ style.css # Global styles, variables, and animations
β βββ Photos/ # UI assets and logos
β βββ uploads/ # Temporary storage for analyzed images
βββ templates/
β βββ base.html # Master layout, Nav, and Footer
β βββ home.html # Landing page
β βββ about.html # Technology and Mission details
β βββ upload.html # Drag-and-drop & Webcam interface
β βββ result.html # Dynamic diagnosis and recommendation page
βββ app.py # Flask application and routing logic
βββ requirements.txt # Python dependencies
βββ .gitignore # Ignored files and cache
The PlantCare AI result page provides a comprehensive breakdown of the AI's analysis:
Visual Confirmation: Displays the uploaded leaf image directly on the results dashboard for immediate verification.
Target Crop Identification: Correctly identifies the plant species (e.g., Tomato).
Disease Diagnosis: Provides the specific detected condition (e.g., Early blight).
AI Confidence Meter: A visual progress bar showing the model's certainty (e.g., 91.66%).
Actionable Insights: Includes a Recommended Actions section to guide users on pruning, fungicide application, and proper watering techniques.
TensorFlow 2.17.0: The primary deep learning framework used to load and run the MobileNetV2 model.
Keras: Used for high-level neural network API implementation and handling the .keras model format.
MobileNetV2: A lightweight, efficient CNN architecture utilized via Transfer Learning for fast image classification.
Python 3.11: The programming language powering the entire backend logic.
Flask 3.0.2: A micro-web framework used to create the server, handle routing, and manage user sessions.
NumPy: Used for high-performance multidimensional array processing, specifically for converting images into tensors for the model.
-
HTML5 : For the responsive styling of the web interface.
-
CSS3: For the responsive styling of the web interface.
-
Vanilla JavaScript (Webcam API, DOM manipulation)
-
FontAwesome (Icons)
Google Colab: Used for training the deep learning model with GPU support and handling large datasets efficiently.
Hugging Face.com: Used to deploy and host the Flask web application for online access.
Anaconda/Conda: Used for environment management to ensure library version compatibility.
Git & GitHub: For version control and project documentation.
PlantCare AI successfully demonstrates the power of transfer learning in agriculture, providing a high-accuracy, real-time diagnostic tool. By utilizing the MobileNetV2 architecture, we created a system that is lightweight enough for web deployment while remaining robust enough to handle 38 different plant categories.
Offline Mode: Implementing PWA features for use in remote fields without internet.
Treatment Database: Adding automated care suggestions based on the specific disease detected.
IoT Integration: Connecting the model to field sensors for automated health monitoring.
SkillWallet: For the guided learning path and technical project support.
Kaggle: For providing the New Plant Diseases Dataset.
Images: 87,000+ RGB images.
Classes: 38 (Healthy and Diseased categories).
Specifications: Images originally 256Γ256 pixels, resized to 224Γ224 for MobileNetV2 compatibility.
This project is jointly developed by SAYAN PAUL and SAYANDIP DEY.
We worked together on Machine Learning, Backend, Frontend, and Deployment aspects of the project.
| Contributor | Role | GitHub | |
|---|---|---|---|
| SAYAN PAUL | ML, Frontend Development , Backend Integration & Deployment | ||
| SAYANDIP DEY | ML Model Development & Training, Backend DEvelopment, API Integration |
Also team Members SHANTANU MONDAL & RAJASHREE DUTTA




