Built to order

Medicinal Plant Identification from Leaves using CNN

This project builds a convolutional neural network that identifies medicinal plants from leaf photographs — Tulsi, Neem, Aloe vera, Moringa, Ashwagandha and Giloy. Leaves are segmented from the background first, then a MobileNetV3 classifier predicts the species and shows traditional-use notes. It ships with a curated leaf dataset, the training notebook, the trained model and an interactive demo. Suitable for B.E./B.Tech final-year projects in AI & Machine Learning.

Medicinal Plant Identification from Leaves using CNN — project thumbnail preview
More project photos (2)

The problem

Ayurvedic practitioners, herbal product makers and students all face the same problem: many medicinal plants look alike to non-experts, and misidentification has real consequences. This project trains a MobileNetV3-Large classifier on about 2,800 leaf photographs across six medicinal species, with green-hue segmentation isolating the leaf so the model learns leaf morphology instead of backgrounds. MobileNetV3 is chosen deliberately so the model runs offline on a phone in the field. Students learn leaf-image preprocessing, augmentation that respects leaf shape, and mobile deployment via TFLite. The demo identifies sample leaf photos with representative predictions and usage notes — with an explicit educational-use disclaimer.

How it works

  1. Leaf photographs are collected from herbal gardens and nurseries and labelled by species.
  2. Green-hue segmentation masks isolate the leaf from the background in each photo.
  3. Masked leaves are resized to 224×224, normalized and split into stratified train/validation sets.
  4. MobileNetV3-Large, pre-trained on ImageNet, is fine-tuned with a new classification head.
  5. Augmentation uses rotation, flip and perspective warp to simulate varied photo angles.
  6. Training uses AdamW with early stopping; the held-out split gives accuracy and per-species metrics.
  7. The model is exported to TFLite; the web demo identifies sample leaf photos with representative predictions.

Tech stack:

  • Python 3, TensorFlow/Keras
  • MobileNetV3-Large
  • OpenCV (leaf segmentation)
  • NumPy, Matplotlib, scikit-learn
  • Jupyter Notebook (training)
  • HTML/CSS/JS identification demo
  • TFLite export

Dataset & model details

  • Dataset: Custom curated medicinal-leaf set — ~2,800 leaf photographs from herbal gardens and nurseries in the Pune region, labelled into 6 species: Tulsi, Neem, Aloe vera, Moringa, Ashwagandha, Giloy; stratified 80/20 split.
  • Task: 6-class image classification; input = 224×224×3 segmented leaf, output = species probabilities.
  • Model: MobileNetV3-Large backbone (ImageNet pre-trained) → GlobalAveragePooling → Dropout(0.25) → Dense(6, softmax); ~5.4M parameters; green-hue segmentation upstream.
  • Metrics: Species accuracy ~94% (design target), top-2 accuracy ~98% (design target), per-species precision/recall. No accuracy is claimed as measured until the training run is executed for the order.
Parameter Value
Input format 224 × 224 RGB segmented leaf
Classes 6 medicinal species
Dataset size Approximately 2,800 leaf photos
Model parameters Approximately 5,400,000
Species accuracy ~94% (design target, not a measured claim)
Training time Approximately 1–2 h on a free GPU (expected)
Inference Approximately 18 ms on phone CPU (expected)
Model file Approximately 3.4 MB TFLite (expected)
Demo Single-file web app, runs offline after download

Project features

  • Six-species leaf classifier Tulsi, Neem, Aloe vera, Moringa, Ashwagandha, Giloy — common Indian medicinal plants, with per-species metrics.
  • Leaf segmentation Green-hue masking isolates the leaf from the background before classification, removing background bias.
  • Curated leaf dataset About 2,800 leaf photographs from herbal gardens and nurseries, labelled by species.
  • Phone-ready model MobileNetV3-Large exported to TFLite (~3.4 MB) for fully offline field identification.
  • Traditional-use notes Each prediction shows documented traditional uses — educational reference, clearly disclaimed.
  • Interactive identification demo Single-file web app: pick a sample leaf photo and see the predicted species with probability bars.
  • Viva kit Report PDF, PPT and Q&A covering leaf preprocessing, MobileNetV3, augmentation and TFLite deployment.

What is included

  • Curated, labelled medicinal-leaf dataset with split files
  • Segmentation + training Jupyter notebooks
  • Trained MobileNetV3 model + TFLite export
  • Interactive identification web demo with sample photos
  • Confusion matrix and per-species metrics
  • Traditional-use reference notes
  • Project report PDF, PPT presentation
  • Viva Q&A preparation document

Limitations & prerequisites

  • Educational and prototype use only — never use predictions for actual medicinal consumption decisions.
  • Some species have lookalike non-medicinal relatives; the report documents the confusion pairs.
  • 94% is a design target, stated honestly — the report documents the actual achieved figure.
  • Damaged, dried or partial leaves degrade accuracy; fresh whole leaves are recommended.
  • Only the six covered species are supported; new species need new labelled data.

Frequently Asked Questions

Which dataset is used?

A custom curated set of about 2,800 leaf photographs from herbal gardens and nurseries in the Pune region, labelled Tulsi, Neem, Aloe vera, Moringa, Ashwagandha or Giloy, with a stratified split.

Why MobileNetV3?

The use case is field identification on a phone — MobileNetV3-Large gives strong accuracy at ~18 ms on a phone CPU and exports to a 3.4 MB TFLite model that runs fully offline.

How does leaf segmentation help?

It masks out soil, hands and pots so the classifier learns leaf shape, venation and margin — the actual botanical features — instead of background shortcuts.

Is it safe to use for real herbal medicine?

No — and the project states this clearly. It is an educational prototype; species predictions must be verified by a qualified botanist before any real use.

How does the demo work?

Pick a sample leaf photo and press run; the app shows the predicted species with probability bars and traditional-use notes — representative of the trained model on these samples.

Is this project suitable for a final-year project?

Yes — for AI & Machine Learning programs. It demonstrates domain preprocessing, mobile deployment and responsible AI disclaimers. Suitable for B.E./B.Tech final-year projects in AI & Machine Learning.

Components & software requirements
  • Python 3, TensorFlow/Keras
  • MobileNetV3-Large
  • OpenCV (leaf segmentation)
  • NumPy, Matplotlib, scikit-learn
  • Jupyter Notebook (training)
  • HTML/CSS/JS identification demo
  • TFLite export

Dataset & model details

  • Dataset: Custom curated medicinal-leaf set — ~2,800 leaf photographs from herbal gardens and nurseries in the Pune region, labelled into 6 species: Tulsi, Neem, Aloe vera, Moringa, Ashwagandha, Giloy; stratified 80/20 split.
  • Task: 6-class image classification; input = 224×224×3 segmented leaf, output = species probabilities.
  • Model: MobileNetV3-Large backbone (ImageNet pre-trained) → GlobalAveragePooling → Dropout(0.25) → Dense(6, softmax); ~5.4M parameters; green-hue segmentation upstream.
  • Metrics: Species accuracy ~94% (design target), top-2 accuracy ~98% (design target), per-species precision/recall. No accuracy is claimed as measured until the training run is executed for the order.
Delivery information

Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.

Support terms

Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of multiple decision trees voting together into one final predictionStudents with basic Python and pandas skills who want a reliable first classifier for ML coursework and tabular data projects.

Random Forests Explained: Why Decision Trees Vote Better Together

Decision trees are readable but overfit; random forests fix this by training hundreds of varied trees on bootstrapped data with random feature subsets, then letting them vote. This guide explains Gini impurity, bagging, out-of-bag validation and the four hyperparameters that matter, with a complete scikit-learn workflow, honest feature-importance practices, and the mistakes students keep making.

Read guide
Illustration of object tracking showing video frames with bounding boxes and persistent ID labels following people and vehicles, comparing motion prediction and appearance matching.B.E./B.Tech Computer Science and Electronics students building video analytics projects — people counting, vehicle tracking, sports analysis — who have detection working and need

Object Tracking: DeepSORT and ByteTrack Explained

Detection finds objects per frame; tracking keeps their identities across frames. This guide explains tracking-by-detection, Kalman motion models, DeepSORT's appearance embeddings vs ByteTrack's low-confidence box recovery, tracking metrics (HOTA, IDF1, ID switches), and the tuning parameters that determine real-world quality.

Read guide
Illustration of image segmentation showing U-Net's U-shaped encoder-decoder with skip connections producing pixel masks, alongside Mask R-CNN detecting instances with masks.B.E./B.Tech Computer Science and AI/ML students moving from image classification or detection to pixel-level understanding — medical imaging, defect detection, autonomous driving

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide
Get a quotation