This paper presents MEDIPI (MEDIcinal Plant Identification), a hierarchical machine learning framework designed to classify medicinal plants using leaf photographs. By combining 52 interpretable features with a structured classification tree, the researchers achieved up to 100% accuracy on a newly released dataset of Sri Lankan medicinal plants, offering a transparent alternative to "black-box" deep learning models.
TL;DR
The authors introduce MEDIPI, a hierarchical statistical machine learning approach that classifies medicinal plant leaves using 52 interpretable features across shape, texture, color, and "scagnostics." Along with the framework, they released MedLEA, an open-source R package and dataset of Sri Lankan medicinal plants, achieving 100% classification accuracy while highlighting significant challenges in model generalization across different datasets.
What Problem Does This Paper Address?
Identifying medicinal plants accurately is critical for both traditional medicine and conservation. Currently, this process relies heavily on the experience of practitioners, which is difficult to scale and prone to human error. While computer vision offers a solution, existing methods face two major hurdles:
- Interpretability: Most state-of-the-art models use Deep Learning (CNNs), which require massive computational power and offer little insight into why a specific leaf was classified as a certain species.
- Data Scarcity: There is a lack of high-quality, standardized image databases for specific regions, such as Sri Lanka, which boasts high medicinal plant diversity but lacks digital repositories.
As shown in Figure 1, Sri Lanka ranks highly in medicinal plant diversity relative to its total flora, making it a vital region for automated botanical tools.
Methods
The researchers developed a pipeline consisting of image processing, feature extraction, and hierarchical classification.
- Feature Extraction: Instead of raw pixels, the model uses 52 hand-crafted, interpretable features. These include standard metrics (shape, color, texture) and a novel application of scagnostics (statistical graphics diagnostics) to leaf contours to capture complex geometric properties.
- Hierarchical Classification: Rather than a "flat" classification (predicting species directly), the model uses a three-level hierarchy:
- Shape (e.g., Diamond, Round, Needle, Heart)
- Edge Type (e.g., Smooth, Toothed, Lobed, Crenate)
- Species
- Algorithms: The study compared eight algorithms, including Random Forest (RF), XGBoost, Support Vector Machines (SVM), and Artificial Neural Networks (ANN).
Datasets
The study utilized four distinct datasets to train and validate the model:
- MedLEA (Medicinal Leaf Dataset for Evaluation and Analysis): A new primary dataset introduced by the authors containing 1,099 color images of 31 Sri Lankan medicinal plant species. It is available as an R package.
- Flavia: 1,907 color images of common plants.
- Swedish Leaf Dataset: 1,125 color images.
- Kaggle Leaf Dataset: 1,584 binary (black and white) images.
Key Insights and Ideas
- The Power of Hierarchy: Moving from a flat model to a hierarchical one provided a small but consistent boost in accuracy (about 1%). More importantly, it allows the model to use different features at different levels—for instance, shape features are vital for the top level, while scagnostics become more important for distinguishing species at the bottom level.
- Beyond Shape: While many botanical studies focus solely on leaf shape, this paper demonstrates that adding color, texture, and scagnostic features raised shape-level accuracy from 90% to 97%.
- Visualizing the "Black Box": By using Linear Discriminant Analysis (LDA), the authors could visualize how the model separates different leaf types. They found that needle-shaped leaves are the easiest to distinguish, while diamond and round shapes often overlap in feature space, leading to most classification errors.
- The Generalization Gap: A sobering finding was that models performing perfectly on their "home" dataset failed significantly when tested on images from other datasets (dropping to 23–50% accuracy). This suggests that differences in camera quality, lighting, and background "noise" remain a massive hurdle for real-world deployment.
Key Results
- Top Performance: The Hierarchical Random Forest was the clear winner, achieving 100% overall accuracy on the MedLEA dataset.
- Algorithm Comparison: Tree-ensemble methods (Random Forest, XGBoost, Gradient Boosting) consistently outperformed traditional neural networks and SVMs in this feature-based approach.
- Economic Context: The paper notes that Sri Lanka’s medicinal plant exports are growing rapidly (Figure 2), underscoring the economic importance of accurate identification for trade and quality control.
Limitations and Future Work
The primary limitation is cross-dataset generalization. The model is highly sensitive to the specific conditions under which the training images were taken. Furthermore, while 31 species is a start, Sri Lanka has over 1,400 medicinal plant species that need to be cataloged.
Future work will focus on:
- Expanding the MedLEA dataset to include more diverse species.
- Testing the model on "in-the-wild" images taken by non-experts in varied environments.
- Directly comparing the accuracy-vs-interpretability trade-offs between this statistical approach and modern deep-learning methods.
Summary updated