Journal of Ayurveda and Integrated Medical Sciences

2025 Volume 10 Number 1 JANUARY
Publisherwww.maharshicharaka.in

Identification of Dry Ayurvedic Herbs (Fruits and Seeds) through Computer Vision Technology

Abhishek1*, Arora R2, Nehra S3, Gupta R4
DOI:10.21760/jaims.10.1.10

1* Abhishek, Post Graduate Scholar, Department of Dravyaguna Vigyana, Institute for Ayurved Studies and Research and Shri Krishna AYUSH University, Kurukshetra, Haryana, India.

2 Ravinder Arora, Associate Professor, Department of Dravyaguna Vigyana, Institute for Ayurved Studies and Research and Shri Krishna AYUSH University, Kurukshetra, Haryana, India.

3 Sangeeta Nehra, Director, AYUSH Haryana, India.

4 Rahul Gupta, Assistant Professor, Department of Electronics and Communication Engineering, UIET Kurukshetra University, Kurukshetra, Haryana, India.

The study investigates the use of Computer Vision Technology (CVT) combined with Convolutional Neural Networks (CNNs) to address challenges in the identification of dry Ayurvedic herbs (fruits and seeds). A dataset of 50,000 high-resolution images, encompassing 50 herb species, was utilized to train a CNN model. The architecture comprised convolutional layers with filters and Dropout layers, ensuring efficient feature extraction and overfitting mitigation. The model achieved a peak training accuracy of 91.86% and a validation accuracy ranging from 81% to 83%, with an inference time of 36 milliseconds per step, indicating its potential. Performance evaluations, including accuracy metrics and confusion matrices, highlighted high prediction rates for distinct species. However, misclassifications among visually similar herbs underscored the need for dataset expansion and further optimization. Recommendations include incorporating robust database, additional species, diverse angles, and lighting conditions, as well as addressing class imbalances through data augmentation or resampling. Advanced regularization techniques, are proposed to enhance generalization. This research work Bridges the Traditional identification methods and Modern methods with Technology and establishes a robust framework for leveraging AI and computer vision in Ayurvedic herb identification, contributing significantly to the modernization and quality assurance of traditional herbal medicine. The findings emphasize scalability and future integration of cloud-based systems for large-scale applications.

Keywords: Ayurvedic herbs, Artificial intelligence, Computer Vision Technology, Convolutional Neural Network, Image Classification

Corresponding Author How to Cite this Article To Browse
Abhishek, Post Graduate Scholar, Department of Dravyaguna Vigyana, Institute for Ayurved Studies and Research and Shri Krishna AYUSH University, Kurukshetra, Haryana, India.
Email:
Abhishek, Arora R, Nehra S, Gupta R, Identification of Dry Ayurvedic Herbs (Fruits and Seeds) through Computer Vision Technology. J Ayu Int Med Sci. 2025;10(1):78-86.
Available From
https://jaims.in/jaims/article/view/3947/

Manuscript Received Review Round 1 Review Round 2 Review Round 3 Accepted
2024-12-13 2024-12-23 2025-01-03 2025-01-13 2024-12-25
Conflict of Interest Funding Ethical Approval Plagiarism X-checker Note
None Nill Yes 11.19

© 2025by Abhishek, Arora R, Nehra S, Gupta Rand Published by Maharshi Charaka Ayurveda Organization. This is an Open Access article licensed under a Creative Commons Attribution 4.0 International License https://creativecommons.org/licenses/by/4.0/ unported [CC BY 4.0].

Download PDFBack To ArticleIntroductionNeural NetworkMaterialsMethodologyConclusionReferences

Introduction

The identification and quality control of Ayurvedic herbs are critical to ensuring the safety, efficacy, and consistency of traditional medicinal formulations. Ayurveda, an ancient system of medicine, relies heavily on the use of herbs, including fruits and seeds, to treat a variety of ailments. However, the accurate identification of dry herbs, especially in their dry forms, poses a significant challenge due to the morphological similarities among species, the presence of adulterants, and the lack of standardized methods for quality control. And hence adulteration is prevalent; for example, seeds from Carica papaya are sometimes misbranded as Piper longum, and Cinnamomum cassia is often sold as Cinnamomum zeylanicum, despite significant differences between them.[1] The Ayurvedic Pharmacopoeia of India (API)[2] prioritizes macroscopic examination based on visual characteristics for identifying herbal drugs. Acc. to WHO macroscopic examination of herbal materials provide a straightforward and rapid method to determine their identity.[3-5] However, traditional methods face challenges in a global market, necessitating advanced technologies such as Computer Vision Technology (CVT) and molecular analysis. Applications like Ayurleaf[6] and Leafsnap[7] are example of this. Similarly, Praman AI,[8] an app focused on the cardamom trade, uses AI for post-harvest quality assessment, streamlining agricultural processes and ensuring product quality. Computer vision and Artificial intelligence-based modelling are explored by many researchers in recent time for industrial application. Despite the success of these technologies, the application of computer vision for dry Ayurvedic herb.

The emphasis of presented study was on the training a model on the macroscopic features of 50 (fruits and seeds) commonly traded dry herbs through Computer Vision technology using the Multiclass classification and Convolutional neural network approach. The basic concept of NN and Artificial Intelligence with the proposed architecture with detailed parameters are given in the manuscript. The results have been explored and discussed along with the conclusion of paper with further future scope of the presented study. Here is the list of Dry Ayurvedic herbs which were used in the study.

Table 1: List of Dry Herbs used in this project

SNNameBotanical NameFamilyPart Used
1.BhallatakSemicarpus anacardiumAnacardiaceaeFruit
2.PippaliPipier longumPiperaceaeFruit
3.AmlaEmbillica officinalisEuphorbiaceaeFruit
4.BibhitakiTerminali bellaricaEuophorbiaceaeFruit
5.JatiphalMyristica fragransMyristicaceaeFruit
6.Badi elaAmomum subulatumZingiberaceaeFruit
7.HaritakiTerminalia ChebulaEuphorbiaceaeFruit
8.MadanphalRandia spinosumRubiaceaeFruit
9.ShleshmatakCordia dichotomaBoragenaceaeFruit
10.GokshurTribulus terrestrisZygophyllaceaeFruit
11.DadimPunica granatumPunicaceaeFruit
12.KankolPiper cubebaPiperaceaeFruit
13.UnnavZiggiphus sativaRhamnaceaeFruit
14.BilvaAegle marmelosRutaceaeFruit (Majja)
15.AragvadhCassia fistulaFabaceaeFruit (Majja)
16.GunjaAbrus precatoriusFabaceaeSeed
17.PoogAreca catechuArecaceaeSeed
18.Badi kateriSolanum indicumSolanaceaeFruit
19.ErandRicinus communisEuophorbiaceaeSeed
20.KaarvelaakMomordica caharantiaCucurbitaceaeFruit
21.PalashButea monospermaFabaceaeFruit
22.VishalaCitrallus colocynthisCucurbitaceaeFruit
23.DrakshaVitis viniferaVitaceaeFruit
24.VidangaEmbelia tsjeriam-cottamMyrsinaceaeFruit
25.ElaElettaria cardamomumZingiberaceaeFruit
26.LaungSyzygium aromaticumMyrtaceaeFruit
28.KuchlaStrychnous nux-vomicaLoganiaceaeSeed
29.NirgundiVitex negundoVerbenaceaeSeed
30.TilSesamum indicumPedaliaceaeSeed
32.KonchMucuna pruriensFabaceaeSeed
33.ShatpushpaAnethum graveolensUmbelliferaeSeed
34.JambuSyzigium cuminiMyrtaceaeSeed
35.KamalNelumbo nuciferaNymphaceaeSeed
36.LatakaranjaCessalpinia cristaCesalpainodaeSeed
37.JaipalCroton tigliumEuphorbiaceaeSeed
38.Upkunjika (kalonji)Nigella sativaRanunculaceaeSeed
39.IndrayavHolarrhena dysentricaApocynaceaeSeed
40.MethiTrigonella foenum-graecumFabaceaeSeed
41.KaranjaPongamia pinnataFabaceaeSeed
42.Shvet jeeraCuminum cyminumApiaceaeSeed
43.Kali mirchPiper nigrumPiperaceaeSeed
44.DhaanyakCoriandrum sativumApiaceaeSeed
45.NeemAzadirachta indicaMeliaceaeSeed
46.YavaniTachyspermum amiiApiaceaeSeed
47.JavitriMyristica fragransMyristicaeaeAril
48.MaalkaangniCelastrus paniculatusCelastraceaeSeed
49.SaufFoeniculum vulgareUmbelliferaeSeed
50.JambuSyzigium cuminiMyrtaceaeSeed

Neural Network

An Artificial Neural Network (ANN) is designed to replicate the structure and functionality of neurons in the human brain, enabling it to understand non-linear physical processes.[9,10] ANNs are built by creating artificial neurons and interconnecting them in a way that emulates the behaviour of interconnected brain cells. When these networks contain a large number of neurons (nodes) arranged in layers, they are referred to as Deep Neural Networks (DNNs). NNs have revolutionized artificial intelligence by providing the capability to understand and solve a wide range of complex real-world problems. These networks are characterized by an architecture that includes a single input layer, multiple hidden layers for learning non-linear patterns from input data, and a final output layer. Each layer contains numerous neurons, where each neuron processes multiple inputs according to an activation function and transmits the computed output to the subsequent layer, as illustrated in Fig.1 The inputs (“x1, x2, … xi … xn”) are referred to as input nodes, while the outputs (“y1, y2, … yi … ym”) are called output nodes of the network.[11]

For a logistic regression problem, there is typically one output node; for binary classification, number of output nodes is two; and for more complex problems, the number increases. A typical DNN, depicted in Fig.2, comprises multiple hidden layers that enable network to learn complex features and non-linear patterns from input data. Each layer processes outputs of the previous layer using its neurons (nodes), and final layer produces the overall output of the network. The layers in a DNN are connected by a set of weights (“w1, w2, … wi … wl”), which are adjusted during training process to optimize performance.[12,13]

jaims_3947_01.JPG
Figure 1: Basic structure of Neural Network

jaims_3947_02.JPG
Figure 2: Deep Neural Network architecture

These weights play a crucial role in the computations and decision-making processes of a neural network during deployment. A well-trained network, developed using an appropriate dataset, demonstrates superior performance in unfamiliar real-world scenarios compared to an under-trained or over-trained network.

The greater the number of layers in a Deep Neural Network (DNN), the more complex features it can extract and learn from the input data. However, training a DNN with many layers presents significant challenges, as the training parameters, such as weights, learning rate, and gradients, can vary widely in scale. To address these challenges, an optimal configuration of nodes and hidden layers is carefully designed based on the characteristics of the dataset.

Materials

The study utilized a combination of literary sources, dataset creation, advanced imaging equipment, robust computational systems, and specialized software to achieve its objectives. Ayurvedic texts, journals, and modern resources were thoroughly reviewed to establish a connection between traditional herbal knowledge and image recognition technology.

A comprehensive dataset comprising 5,000 images (150-200 per herb) of 50 dry herbs, including 25 fruits and 25 seeds, was collected from Central Ayurved Research Institute-Jhansi and Departmental Museum of the IASR. High-resolution smartphones, such as the iPhone 14 and Motorola Moto Edge-5, were employed to capture detailed images of the herbs.


For image analysis, a powerful computer system featuring Intel Xeon processors and NVIDIA Tesla V100 GPUs was utilized. Additionally, various software tools, including Photoshop, TensorFlow, Keras, and Python libraries like OpenCV were employed to process and analyze the images effectively.

Methodology

1. Data Collection: Images were collected to cover diverse views for improved model
2. Pre-processing and Augmentation: Images were resized, normalized, and augmented for better model generalization.
3. CNN Model Development: A convolutional neural network (CNN) was trained for herb
4. API and UI Development: An API and user-friendly interface enabled image uploads and classification results.
5. System Integration and Testing: The system was integrated, tested, and deployed, followed by real-world evaluations.

Proposed Work

Ayurvedic herb identification through computer vision has been addressed using a Convolutional Neural Network (CNN). Traditional identification methods based on macroscopic examination are complex and time taking so need experts, making AI-driven approaches viable alternatives. The dataset comprising high-resolution images of dry Ayurvedic herbs were pre-processed and used to train the CNN model. Input parameters such as image size, batch size, and data augmentation techniques (random rotations, flips, and zooms) were optimized to enhance model generalization.

The model architecture includes a single input layer, three convolutional layers with filter sizes of 32, 64, and 128, followed by MaxPooling2D and Dropout layers. The fully connected dense layers culminate in an output layer with a softmax activation function for multi-class classification. The total trainable parameters in the model were computed as 8,784,273, shown in Fig 3. The ReLU activation function is applied to each neuron, introducing the required non-linearity, while the output layer uses softmax for probabilistic classification. The dataset, consisting of 5,000 images, was divided into training (70%), validation (20%), and testing (10%) subsets. Training was conducted over 20 epochs with a batch size of 51 using the Adam optimizer and categorical cross-entropy loss function.

The performance metrics such as accuracy, confidence and confusion matrix score were evaluated, with accuracy stabilizing at 90% by the 10th epoch as shown in Fig 4 & Fig. 5. The confusion matrix (Fig.6) highlighted high prediction accuracy, while some misclassifications indicated the need for further refinement. The optimized architecture with three hidden layers (16, 8, and 4 nodes) demonstrated a balance between model complexity and performance. This optimized CNN model, provides a robust framework for Ayurvedic herb identification and is suitable for large-scale practical applications.

Performance metrics such as confidence scores evaluated effectiveness, with a confusion matrix, as shown in Fig. 6 and Fig. 7 highlighting high prediction accuracy for classes. However, off-diagonal matrix values and fluctuating validation accuracy suggest overfitting and necessitate hyperparameter tuning (e.g., L2 regularization).

jaims_3947_03.JPG
Figure 3: Developed Model and Layers used


jaims_3947_04.JPG
Figure 4: Accuracy Over epochs

jaims_3947_05.JPG
Figure 5: Loss Over epochs

jaims_3947_06.JPG
Figure 6: Confusion Matrix

Visual Predictions and Model Confidence Analysis for Dry Herbs

jaims_3947_07a.JPG



jaims_3947_07b.JPG

jaims_3947_07c.JPG

jaims_3947_07d.JPG

jaims_3947_07e.JPG


jaims_3947_07f.JPG

jaims_3947_07g.JPG

jaims_3947_07h.JPG

jaims_3947_07i.JPG
Figure 7: Confidence Score of Drugs used in the Project.


Conclusion

The CNN model developed for the identification of dry Ayurvedic herbs (fruits and seeds) demonstrated promising potential, achieving a peak training accuracy of 91.86% and validation accuracy ranging between 81% and 83%. This performance highlights the model's capability to extract meaningful features for herb classification. However, misclassifications were observed, particularly among visually similar herbs, indicating areas for improvement. The architecture's inference time of 36 milliseconds per step and robust performance on distinct herb species suggest its practical applicability for real-time herb identification. Despite its effectiveness, the model's generalization issues underline the need for further refinement. To enhance the model's robustness and scalability, several recommendations are proposed. Expanding the dataset to include diverse species, plant parts, and variations in drying and processing conditions, alongside capturing images from multiple angles and lighting conditions, could improve generalization. Addressing class imbalances through augmentation or resampling strategies and optimizing hyperparameters like learning rate, batch size, and dropout rate could mitigate overfitting. Additionally, incorporating advanced regularization techniques, such as L2 regularization or early stopping, and leveraging enhanced computing systems, including GPUs or TPUs, could further refine the model's performance. Implementing cloud-based platforms for distributed training and applying efficient pre-processing techniques like noise reduction and contrast enhancement would also contribute to more accurate classifications. These enhancements would establish a reliable framework for quality assurance in herbal medicine, fostering advancements in the identification and utilization of Ayurvedic herbs.

References

1. Food Safety and Standards Authority of India. Guidance Note: Cinnamon [Internet]. New Delhi: FSSAI; 2014 Mar 10 [cited 2024 Oct 19]. Available from: https://www. fssai.gov.in/upload/advisories/2018/04/5ac47df86d178Guidance_Note_Cinnamon_CCASIA_10_03_2014.pdf [Crossref][PubMed][Google Scholar]

2. Government of India, Ministry of Health and Welfare, Department of AYUSH. The Ayurvedic Pharmacopeia of India. New Delhi: Government of India. . [Crossref][PubMed][Google Scholar]

3. World Health Organization. Quality Control Methods for Medicinal Plant Materials. Geneva: WHO; 1992. . [Crossref][PubMed][Google Scholar]

4. World Health Organization. Quality Assurance of Pharmaceuticals: A Compendium of Guidelines and Related Materials, Good Manufacturing Practices and Inspection. Geneva: WHO; 1996. . [Crossref][PubMed][Google Scholar]

5. World Health Organization. Guidelines for the Assessment of Herbal Medicines. WHO Technical Report Series 863. Geneva: WHO; 1996. [Crossref][PubMed][Google Scholar]

6. Patil A, Jain S, Arakeri M, Kulkarni S, Sangeetha M. AyurLeaf: A deep learning approach for classification of medicinal plants [Internet]. 2019 [cited 2024 Oct 19]. Available from: https://ieeexplore. ieee.org/document/8929394 [Crossref][PubMed][Google Scholar]

7. Leafsnap. Plant identification [Internet]. c2024 [cited 2022 Dec 15]. Available from: https://leafsnap. com/ [Crossref][PubMed][Google Scholar]

8. Intello Labs. Praman - AI powered by Intello Labs [Internet]. [cited 2023 Dec 22]. Available from: https://www. praman.ai/ [Crossref][PubMed][Google Scholar]

9. Kandel ER, Schwartz JH, Jessell TM, Siegelbaum SA, Hudspeth AJ. Principles of Neural Science. 5th ed. New York: McGraw-Hill; 2013. [Crossref][PubMed][Google Scholar]

10. Purves D, Augustine GJ, Fitzpatrick D, Hall WC, LaMantia AS, White LE. Neuroscience. 6th ed. Sunderland: Sinauer Associates; 2018. [Crossref][PubMed][Google Scholar]

11. Chatterjee I. Machine Learning and Its Application: A Quick Guide for Beginners. Sharjah: Bentham Science Publishers; 2021. p. 170-193. ISBN: 978-1-68108-940-9 (Online), 978-1-68108-942-3 (Paperback), 978-1-68108-941-6 (Print) [Crossref][PubMed][Google Scholar]


12. Sharma S. Introduction to Neural Networks and Deep Learning. In: Artificial Intelligence and Machine Learning. New Delhi: Tech Publications; 2021. p. 105-135 [Crossref][PubMed][Google Scholar]

13. GeeksforGeeks. Introduction to Convolutional Neural Networks [Internet]. 2024 Jul 11 [cited 2024 Jul 11]. Available from: https://www. geeksforgeeks.org/introduction-convolution-neural-network/ [Crossref][PubMed][Google Scholar]

Disclaimer / Publisher's Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of Journals and/or the editor(s). Journals and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.