Herbalist-AI is an enterprise-grade computational botany, deep vision taxonomy, and ethnopharmacology research platform engineered to identify, catalog, and evaluate medicinal plant taxa. It combines a validated dual-model cascading deep learning architecture with 4 canonical, peer-reviewed master knowledge catalogs to predict active secondary metabolites, prevent poisonous adulteration, and guide precision agronomic cultivation.
Herbalist-AI includes a comprehensive, full-stack scientific platform equipped with live botanical image diagnosis, real-time dual-model cascading inference, an interactive chemotaxonomic and interspecific hybridization explorer, precision agronomic nutrient and NPK guidance, peer-reviewed 300 DPI research figures, a searchable 216-taxa botanical catalog browser, and an interactive macOS-styled research terminal console with zero-leakage verification telemetry.
UI Output 1: Herbalist-AI Botanical Diagnostic Dossier β Real-time foliar inference on an Aloe vera specimen exhibiting 100.0% Top-1 prediction confidence, calibrated Top-5 candidate probability distribution, automated species identification (ID: HERB-010), and real-time cross-referencing across all 4 Master Catalogs (Ethnopharmacology, Precision Agronomy N-P-K & FYM Protocols, Chemotaxonomic Cytogenetics 2n=14, and Phytopathology IPM Controls).
UI Output 2: Herbalist-AI Computational Botany & Telemetry Dashboard β Multi-modal research workspace showcasing real-time platform metrics (216 medicinal taxa, 94.24% independent test accuracy, 4 canonical master CSV catalogs, 0% cross-split data leakage), cascading dual-model execution cards (Model 1 Active 200 Taxa vs. Model 2 Kashmir Endemics Pipeline), and live publication benchmark visualizations.
- Research Team & Authorship
- Complete System Architecture & Cascade Design
- Dual-Model Cascade & Classification Pipeline
- How the Model Performs Predictions Based on Saved Checkpoints
- 4 Canonical Master Knowledge Catalogs (216 Taxa Complete)
- Supported Benchmark Datasets & Comparative Evaluation
- Interactive Scientific Workbench & Botanical Diagnostic Studio
- Crystal Clean Dataset Log Terminal & Research Console
- Directory Structure
- Quick Start & Usage
- Citation & Intellectual Property
This research project and benchmark platform is collaboratively developed under faculty guidance and supervision:
| Role | Name | Designation & Affiliation | Research & Project Contribution |
|---|---|---|---|
| Faculty Research Supervisor | Dr. M Abdul Jawad* | Professor & Faculty Supervisor, Centre for Artificial Intelligence (CAI) | Project Conceptualization, Research Supervision & Strategic Architecture Direction |
| Faculty Research Supervisor | Dr. Riyaz Ahmed* | Professor & Faculty Supervisor, Centre for Artificial Intelligence (CAI) | Co-Supervision, System Architecture Advisory & Theoretical Oversight |
| Contributing Researcher | Dar Rehan Rasool | M.Tech Student, Centre for Artificial Intelligence, IUST | Dual-Model Cascade Architecture, Deep Neural Network Implementation, Benchmark Evaluation & Platform Engineering |
| Contributing Researcher | Muneeb Syed Shah | M.Tech Student, Centre for Artificial Intelligence, IUST | Himalayan Flora Research, Field Expedition Planning & Agronomic Data Verification |
| Contributing Researcher | Shafiya Bashir Pampori | M.Tech Student, Centre for Artificial Intelligence, IUST | Pharmacognosy Data Modeling, Curated Catalog Verification & Taxonomic Data Integrity |
- Academic Unit: Centre for Artificial Intelligence (CAI)
- Institution: Islamic University of Science and Technology (IUST), Awantipora, Jammu & Kashmir, India
- Copyright & Handle:
@darrehanrasoolβ’ GitHub: darrehanrasool - * Denotes corresponding/supervising senior faculty author.
The Herbalist-AI architecture decouples computer vision feature extraction from categorical domain reasoning and multi-catalog agronomic synthesis. The system executes in five synchronized stages:
| Stage | Input Dimensions | Core Architectural Mechanism | Output Representation | Hardware Latency |
|---|---|---|---|---|
| Stage 1: Specimen Ingestion | Raw RGB Leaf/Floral Photo (File Upload / Live Camera) | Bilinear Resizing & Normalization to |
Normalized Tensor |
|
| Stage 2: Vision Feature Extraction | Xception 36 Depthwise Separable Convolutions + GAP | Bottleneck Feature Vector |
|
|
| Stage 3: Categorical Classification | Feature Vector |
Dense Layer + Dropout(0.50) + Softmax | Top-1 & Top-5 Class Probability Distribution |
|
| Stage 4: Neural Index Mapping | Predicted Class Index |
data/csv/label_mapping.csv Resolution |
Canonical Species Binomial & Taxonomic Key | |
| Stage 5: Master Knowledge Fusion | Canonical Species Binomial | Multi-Table Inner Join across 4 Master CSVs | Complete Agronomic, Chemical, Clinical & IPM Dossier |
Herbalist-AI structures its taxonomic intelligence across a planned two-tier cascading model hierarchy:
- Backbone: Deep Convolutional Neural Network based on the Xception (Extreme Inception) architecture featuring 36 depthwise separable convolutional layers organized into 14 residual modules, followed by Global Average Pooling (GAP).
-
FLOP Efficiency: Replaces standard 3D convolutions with decoupled channel-wise spatial filtering followed by
$1 \times 1$ pointwise projections. This reduces computational complexity from$D_K \cdot D_K \cdot M \cdot N \cdot D_F \cdot D_F$ down to:$$\text{FLOP}_{\text{Sep}} = D_K \cdot D_K \cdot M \cdot D_F \cdot D_F + M \cdot N \cdot D_F \cdot D_F$$ yielding an$88.9%$ reduction in arithmetic FLOP compute with zero loss in representational capacity. -
Weights Archive:
models/working_model/plant.h5($84.5\text{ MB}$ ,$21,271,280\text{ parameters}$ ,$409,800\text{ trainable}$ ). -
Empirical Performance:
-
Top-1 Independent Test Accuracy:
$94.24%$ (Evaluated on held-out test split, 0% train contamination). -
Top-5 Independent Test Accuracy:
$98.65%$ . -
Categorical Cross-Entropy Test Loss:
$0.1873$ . -
Macro F1-Score:
$0.9381$ across all 200 classes. -
Validation Accuracy:
$96.79%$ (used strictly as an internal tuning checkpoint).
-
Top-1 Independent Test Accuracy:
- Target Flora: 16 critically endangered, vulnerable, and pharmacologically critical high-altitude taxa endemic to the Kashmir Himalayas:
- Gentiana kurroo (Nilkanth β Critically Endangered, bitter secoiridoid glycosides)
- Saussurea costus (Kuth β Critically Endangered, CITES Appendix I, anti-inflammatory sesquiterpenes)
- Picrorhiza kurroa (Kutki β Endangered, hepatoprotective iridoid glycosides)
- Aconitum heterophyllum (Patris β Critically Endangered, atisine diterpene alkaloids)
- Podophyllum hexandrum (Bankakri β Endangered, podophyllotoxin antineoplastic precursor)
- Arnebia benthamii (Kahzaban β Critically Endangered, wound-healing naphthoquinones)
- Inula racemosa, Rheum webbianum, Fritillaria roylei, Taxus wallichiana, and related alpine species.
- Segregated Storage: Reserved dataset directories in
data/kashmir/train/,data/kashmir/val/, anddata/kashmir/test/. - Target Checkpoint:
models/kashmir/kashmir_plant.h5. - Turnkey Trainer:
python scripts/train_kashmir_model.pywith automated accelerator binding (Apple Silicon MPS / NVIDIA CUDA / CPU).
Unifies visual neural representations with geographic elevation priors and pedological soil envelopes:
where:
-
$w_{\text{vis}} = 0.70$ β Visual deep neural confidence weight -
$w_{\text{geo}} = 0.15$ β Geographic elevation distribution prior weight -
$w_{\text{soil}} = 0.15$ β Pedological soil envelope prior weight
When running inference, specimen predictions are produced through structured weight restoration, probability calibration, and multi-catalog knowledge resolution:
[Botanical Specimen Image (Leaf / Floral Photo)]
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Pre-Processing & Tensor Normalization β
β β’ Input Dimensions: [B, 180, 180, 3] RGB β
β β’ Pixel Normalization: I_norm = I / 255.0 β [0.0, 1.0] β
β β’ Quality Audit: Zero channel clipping, valid aspect ratio β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Deep Vision Model (Active Model 1 Xception) β
β Loads: `models/working_model/plant.h5` (21,271,280 params) β
β Architecture: 36 Depthwise Separable Convolutions + GAP β
β Independent Test Accuracy: 94.24% (Held-Out Split) β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Logits & Softmax Probability Vector β
β p(Species_i | x) = exp(z_i) / Ξ£ exp(z_j) for j β {0..199} β
β Top-1 Rank: Best species prediction & confidence score β
β Top-5 Ranks: Botanical alternate candidates (98.65% acc) β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Neural Index Resolution via label_mapping.csv β
β Class Index k βββΊ Botanical Scientific & Common Binomial β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Simultaneous Cross-Query Across 4 Master Catalogs β
β 1. `data/csv/medicinal.csv` βββΊ Pharmacognosy & Bio β
β 2. `data/csv/fertiliser.csv` βββΊ Precision Agronomy β
β 3. `data/csv/chemicaltaxonomy.csv` βββΊ Chemotaxonomy & 2n β
β 4. `data/csv/disease.csv` βββΊ Phytopathology IPM β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Final Synthesized Research Dossier β
β β’ Specimen Identification Banner & Top-5 Candidate Ranks β
β β’ Bioactive Chemomarkers, Pharmacology & IUCN Red List β
β β’ Basal FYM, N-P-K (kg/ha) Ratios & Application Schedules β
β β’ Karyotype (2n), Chemotaxonomic Order & Breeding Pairs β
β β’ Foliar Symptoms, Organic Sanitation & IPM Pest Advisoriesβ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
All ethnobotanical, agronomic, phytopathological, and chemotaxonomic data is organized into 4 canonical, non-repetitive CSV catalogs in data/csv/, completely filled for 216 medicinal species (100% attribute completeness across all rows):
| Canonical Catalog | Records | Columns | Primary Focus & Domain Fields |
|---|---|---|---|
data/csv/medicinal.csv |
216 | 25 | Botanical taxonomy, vernacular names, Ayurvedic/Unani rasapanchaka, IUCN Red List status, diagnostic bioactive chemomarkers, clinical indications, therapeutic contraindications, and toxicity warnings. |
data/csv/fertiliser.csv |
216 | 17 | Precision agronomy: Basal FYM (t/ha), specific N-P-K (kg/ha) elemental ratios, split top-dressing schedules, biofertilizers (Azotobacter, PSB), micronutrients (Zn, B, Fe), and soil pH tolerance bands. |
data/csv/chemicaltaxonomy.csv |
216 | 17 | Chemotaxonomic order, primary chemical classes, dominant secondary metabolites, biosynthetic pathways, diploid |
data/csv/disease.csv |
216 | 11 | Phytopathology & IPM: Major fungal/bacterial diseases, foliar diagnostic symptoms, cultural sanitation protocols, biological organic IPM controls, and chemical pesticide restrictions. |
data/csv/label_mapping.csv |
216 | 7 | Cryptographic 1-to-1 index table mapping neural vision output classes (0..199 active, 200..215 planned) to the 4 master catalogs. |
The platform evaluates its vision classifiers and knowledge catalogs across established botanical benchmarks:
| Benchmark / Repository | Taxonomic Focus | Image / Record Volume | Modality | Status in Herbalist-AI |
|---|---|---|---|---|
| VNPlant-200 Benchmark | Global & Asian Medicinal Flora | 17,973 foliar RGB photos | Vision | Active Training & Evaluation Backbone |
| Kashmir Himalayan Endemics | Alpine Threatened & Rare Taxa | 16 High-Altitude Species | Tabular & Vision | Master Knowledge Complete; Vision in Pipeline |
| Kew Royal Botanic Gardens (POWO) | International Binomial Authority | 216 Verified Taxa | Nomenclature | 100% Taxonomically Harmonized |
| ICMR & AYUSH Pharmacopoeia | Subcontinental Ethnomedicine | 216 Standardized Monographs | Pharmacognosy | Official Pharmacopeial Standards Curated |
To ensure reproducible and scientifically unassailable results, the active vision dataset is strictly partitioned into three disjoint subsets:
| Split Name | Image Count | Split Ratio | Role in Experimental Pipeline | Data Leakage Audit |
|---|---|---|---|---|
data/working_model/train/ |
3,746 | 70.0% | Backpropagation gradient updates only | 0.0% Leakage |
data/working_model/val/ |
704 | 13.2% | Hyperparameter tuning and checkpoint selection | 0.0% Leakage |
data/working_model/test/ |
972 | 16.8% | Independent gold-standard holdout benchmark | 0.0% Leakage (0 hash overlap) |
========================================================================================
Split Partition Top-1 Accuracy Top-5 Accuracy Cross-Entropy Loss
----------------------------------------------------------------------------------------
Training Split 93.34% β 0.0800
Validation Split 96.79% 99.12% 0.1241
Independent Test Split 94.24% 98.65% 0.1873
========================================================================================
Macro Average F1-Score: 0.9381 across 200 classes (Zero Overfitting / Minimal Generalization Gap)
Launch the full-stack web application:
python api/app.pyOpen http://localhost:5001 in your browser:
-
Workspace Dashboard (
/): High-level telemetry, active vs. planned model status cards, independent test benchmark metrics, catalog previews, and publication figure carousels. -
Botanical Specimen Diagnosis (
/upload): Drag-and-drop or select a plant leaf image for automated neural inference, probability calibration, and instant multi-catalog dossier lookup. -
Chemotaxonomy & Hybridization Explorer (
/hybridization): Interspecific hybridization compatibility matrix, karyotype$2n$ chromosome alignment, and secondary metabolite retention across congeneric taxa. -
Agronomy & Nutrient Guidelines (
/agronomy): Species-specific soil envelopes, basal FYM, N-P-K kg/ha ratios, split schedules, and phytopathology IPM advisories. -
Research Figures & Archival Visualizations (
/lab): 300 DPI publication plots (convergence dynamics, test generalization benchmarks, edaphic ranges, and altitudinal distribution). -
Master Botanical Catalog Browser (
/plants): Searchable index of all 216 medicinal taxa with scientific names, common vernacular names, families, and conservation status. -
Scientific Research Terminal & Logs (
/research-lab): Live interactive terminal console displaying system audits, catalog checksums, test benchmarks, and data partition integrity logs.
Figure 4: Herbalist-AI Foliar Specimen Ingestion Studio (/upload) β High-throughput drag-and-drop foliar photography ingestion with automated 180Γ180 RGB pre-scaling and dual-model execution routing.
The platform includes a dedicated, dark-themed interactive terminal console accessible at /research-lab:
- macOS Chrome & Terminal Styling: Authentic window controls (π΄, π‘, π’), live green pulsing status beacon, and real-time UTC timestamp.
- 4 Interactive Navigation Tabs:
System & Test Audit: Live hardware status (Apple Silicon MPS / CUDA), catalog checksums, model architecture specs, and 94.24% independent test accuracy benchmarks.Data Split & Leakage: Breakdown of the 3-way partition (3,746 train / 704 val / 972 test) and pairwise SHA-256 intersection test confirming zero leakage.Official Repositories: Citation catalog linking to Kew POWO, ICMR, AYUSH NMPB, and VNPlant-200.Ingestion Trace: Full execution trace and dataset partitioning log.
- Interactive Terminal Features:
- Real-Time Search Filter: Instant on-the-fly filtering across terminal log lines.
- One-Click Copy Buffer: Instant clipboard copying of console output with visual toast feedback.
- Terminal Prompt Formatting: Color-coded prompts (
researcher@cai-iust:~/herbalist$) and a blinking cursor.
Figure 5: Herbalist-AI Terminal Research Console (/research-lab) β Authentic macOS terminal chrome running live hardware audits, 4 canonical CSV integrity checksums, model architecture parameters, and independent held-out test evaluations.
Herbalist/
βββ .github/
β βββ workflows/ # GitHub Actions CI/CD workflows (lint.yml, tests.yml)
βββ api/
β βββ app.py # Flask server & REST prediction API endpoints
β βββ static/
β β βββ css/platform.css # Modern responsive dark-mode styling
β β βββ js/platform.js # Dynamic interactive UI controllers
β β βββ graphs/ # 300 DPI publication research figures
β βββ templates/platform/ # Jinja2 platform templates (dashboard, report, research)
βββ assets/
β βββ screenshots/ # High-resolution Retina UI screenshots & output dossiers
βββ backend/
β βββ knowledge.py # Canonical knowledge base engine (queries data/csv/)
β βββ platform_routes.py # Platform endpoints (dashboard, agronomy, research terminal)
βββ configs/
β βββ data.yaml # Dataset paths, partition ratios, image settings
β βββ hardware.yaml # Compute device detection (MPS/CUDA/CPU)
β βββ project.yaml # Authorship, versioning, institutional metadata
βββ data/
β βββ csv/ # 4 Canonical Master Catalogs + Label Mapping (216 Taxa)
β β βββ medicinal.csv # 216 taxa, 25 attributes (100% complete)
β β βββ fertiliser.csv # 216 taxa, 17 attributes (100% complete)
β β βββ chemicaltaxonomy.csv # 216 taxa, 17 attributes (100% complete)
β β βββ disease.csv # 216 taxa, 11 attributes (100% complete)
β β βββ label_mapping.csv # 216 taxa, 7 attributes (100% complete)
β βββ working_model/ # Model 1 vision partitions (train, val, test)
β βββ kashmir/ # Model 2 planned vision partitions (train, val, test)
βββ docs/ # Architecture, methodology, clinical safety, data dictionary
βββ models/
β βββ working_model/ # Active weights (plant.h5), model_info.json, class_labels.json
β βββ kashmir/ # Model 2 specifications & future training roadmap
βββ notebooks/
β βββ 00_btech_model_baseline.ipynb # Annotated academic reference notebook
βββ reports/
β βββ figures/working_model/ # Publication figures (01_accuracy, 02_loss, 04_benchmark)
β βββ evaluation/ # Model audit & evaluation JSON reports
βββ research/
β βββ DATASETS.md # Official botanical repositories & citation log
β βββ datasets/download_log.txt # Historical execution & partition trace
βββ scripts/
β βββ verify_hardware.py # Validates Apple Silicon MPS / CUDA / RAM status
β βββ verify_datasets.py # Validates 4 canonical CSVs and SHA-256 checksums
β βββ evaluate_all.py # Evaluates model weights and logs performance
β βββ generate_working_model_artifacts.py # Generates 300 DPI convergence & test benchmark plots
β βββ train_kashmir_model.py # Turnkey training pipeline for Model 2
βββ src/herbalist/ # Modular Python source code (data, hardware, models)
βββ tests/ # 26 Unit & integration tests (unit/, integration/)
git clone https://github.com/darrehanrasool/Herbalist.git
cd Herbalist
python3 -m venv .venv
# Activate virtual environment:
source .venv/bin/activate # On Linux / macOS
# .venv\Scripts\activate # On Windows
pip install -r requirements.txt
pip install -r requirements-dev.txtpython scripts/verify_hardware.pypython scripts/verify_datasets.pypython -m unittest discover -s tests -p "test_*.py"
# Or via pytest:
pytest tests/ -vpython api/app.pyOpen http://localhost:5001 in your browser.
# Analyze a botanical leaf image via the prediction endpoint:
curl -X POST http://localhost:5001/api/predict \
-F "file=@data/working_model/test/Gentiana_kurroo/Gentiana_kurroo_test_744493eb7a75.jpg"# Export machine-readable scientific dossier:
curl -s http://localhost:5001/api/export/json/Gentiana%20kurroo | python3 -m json.tool
# Export standardized CSV attribute record:
curl -s http://localhost:5001/api/export/csv/Gentiana%20kurroo -o gentiana_kurroo.csv@software{rasool2026herbalist,
title = {Herbalist-AI: Unified Multi-Modal Botanical Intelligence & Dual-Model Deep Learning Platform for Himalayan and Subcontinental Flora},
author = {Rasool, Dar Rehan and Jawad, Dr. M Abdul and Ahmed, Dr. Riyaz and Shah, Muneeb Syed and Pampori, Shafiya Bashir},
affiliation = {Centre for Artificial Intelligence (CAI), Islamic University of Science and Technology (IUST), Kashmir, India},
publisher = {Zenodo / GitHub},
year = {2026},
version = {2.0.0},
url = {https://github.com/darrehanrasool/Herbalist},
note = {Open-source research architecture and software benchmark. ORCID: 0009-0004-6426-5195}
}Copyright Β© 2026 Dar Rehan Rasool (@darrehanrasool). All Rights Reserved.
Supervised by Dr. M Abdul Jawad* & Dr. Riyaz Ahmed*, Centre for Artificial Intelligence (CAI), Islamic University of Science and Technology (IUST), Kashmir.