Introduction
Medicinal plants play a critical role in traditional healthcare systems such as Ayurveda. However, identifying plant species and detecting diseases from leaf images typically requires expert knowledge.
To address this, I built a full-stack AI application that can:
- Identify medicinal plants from leaf images
- Detect whether the leaf is healthy or diseased
- Provide structured outputs such as scientific name, medicinal properties, and care recommendations
This project combines computer vision, backend APIs, and a modern frontend into a single deployable system.
Problem Statement
The main challenges this project addresses:
- Lack of accessible tools for plant identification
- Difficulty in early disease detection
- Dependence on domain experts
- Limited awareness of medicinal uses and remedies
The goal was to build a system that makes this process automated and accessible.
Problem Statement
The main challenges this project addresses:
- Lack of accessible tools for plant identification
- Difficulty in early disease detection
- Dependence on domain experts
- Limited awareness of medicinal uses and remedies
The goal was to build a system that makes this process automated and accessible.
Tech Stack
System Architecture
The system is divided into three layers:
Frontend
- Image upload interface
- Displays prediction results
Backend (FastAPI)
- Handles file uploads
- Runs model inference
- Returns structured JSON response
ML Model
- Trained on labeled medicinal plant datasets
- Classifies plant type and health status
Model Training Pipeline
The model training involved:
Organizing dataset into class folders
Preprocessing:
1. Resizing to 224×224
2. Normalization
- Data augmentation:
1. Rotationz
2. Flipping
3. Color jitter
- Train/validation/test split
Transfer learning was used with a pretrained model to improve performance.
Prediction Workflow
- User uploads a leaf image
- Backend saves the image temporarily
- Image is passed to the trained model
- Model outputs: class_name, confidence, class_index
- Backend maps the class to structured data using a knowledge file
- Response is returned to frontend
Key Features
- Medicinal plant identification
- Disease detection (healthy vs diseased)
- Confidence-based predictions
- Knowledge integration (scientific name, properties, remedies)
- Unknown class handling for non-medicinal inputs
- Real-time API-based inference
Conclusion
This project demonstrates how AI can be used to make traditional knowledge systems more accessible. By combining computer vision with a structured knowledge base, the system provides meaningful insights beyond basic classification.
Links
GitHub Repo: https://github.com/saketh10-10/Medicinal-plant-leaf-disease-detection
LinkedIn: https://www.linkedin.com/feed/update/urn:li:activity:7428844593728688129/?originTrackingId=1XU4D7RC3aOmWI7Q%2F7P%2BGg%3D%3D


Top comments (0)