DeepHerb: A Vision Based System for Medicinal Plants using Xception features

The conservation of biodiversity is crucial as many plant species are critically under extinction. The traditional medicinal system, an alternative to synthetic drugs, promote healthy living and mainly depends on the wide repository of plants. A vision-based automatic medicinal plant identification system is proposed using different neural network techniques in computer vision and deep learning. The challenge lies in the unavailability of the medicinal herb dataset. The paper showcases a novel medicinal leaf dataset entitled DeepHerb dataset comprising of 2515 leaf images from 40 varied species of Indian herbs. The efficacy of the dataset is revealed by comparing pre-trained deep convolution neural network architectures such as VGG16, VGG19, InceptionV3 and Xception. The work concentrates on adopting the transfer learning technique on the pre-trained models to extract features and classify using Artificial Neural Network (ANN) and Support Vector Machine (SVM). The SVM hyperparameters are tuned further by Bayesian optimization to achieve a better performance model. The proposed DeepHerb model learned from Xception and ANN outperformed by 97.5% accuracy. A cross-platform mobile application entitled HerbSnap developed integrating the DeepHerb model identifies the herb image with a prediction time of 1 second per image and reveals the pertinent details of herbs from the database. This research will further focus on expanding the dataset to benefit stakeholders and thus, enriches society with the knowledge of herbs and their medicinal properties.


I. INTRODUCTION
I NDIA, a developing country is rich in biodiversity. Conservation of biodiversity ensures the sustainment of natural resources by boosting ecosystem productivity. More than sixty per cent of the population in developing countries rely on traditional therapeutic medicinal plants for curing many human ailments [1]. Though in the twentieth century, an impact on medicinal plants being poisonous and dosedependent resulted in great danger to the usage of herbal medicines [2]. This impression moved people drastically towards surgical and allopathic treatments due to their quick response in treating the diseases. However, in recent years, lowcost and reduced chance of side-effects in herbal medicines drew the focus of pharmacopoeias in the world to characterize and encapsulate many of the active plant constituents, and also to synthesize nanomedicine as target action in new drug discovery. The amalgamation of traditional herb knowledge and modern technical approach will eventually upgrade the medicinal system to a greater extent.
WHO (World Health Organization) revealed that eighty per cent of the world depend on traditional herbal medicine as their primary medical care. As per the estimation, the contribution of plant drugs over the total drugs is 80% in India and China whereas 25% in the USA (United States of America). The knowledge of indigenous plants is well known by few experts, rural and native people and lacks easy access to its evidence. Hence, promoting the knowledge of herbs to the general public and researchers is important to promote healthy herbal life and prevent the extinction of the potential herbs [3].
The conventional method of identifying the Indian medicinal plants are time-consuming, tedious and a challenging work as it may be incorrect many a time for the reason that Indian herb wealth composes of more than 8000 species VOLUME 4, 2016 [4]. Classifying the herbs using the algorithms of computer vision show concern on categorizing the plant images into its distinct groups. The classification of plants using digital leaf images are challenging due to their similarities in interclass and intra-class, the possibility of complex background and variations in many parameters such as illumination and colour. Thus, developing tools and solutions to analyze and interpret the patterns in the leaf images with significant results are essential. A model or system to accelerate the automatic recognition of Indian medicinal herbs is yet not concentrated in recent times by many researchers. Instead of relying on skilled botanists or Ayurveda (an ancient medicinal system of India) experts, automatic identification of therapeutic herbs will spring knowledge at ease to the general public and other stakeholders of medicinal plants..
The various trials exhibited by many scientists to classify plants using deep learning techniques [5]- [9]. Deep learning is a branch of artificial intelligence and machine learning, based on neural networks with multiple layers, can classify simple to most complicated problems [10]. In contrast to machine learning techniques, where feature engineering involves the manual selection of the feature extraction methods, deep learning automatically discovers the features from the given data [11]. The multi-layers in deep learning, use a large amount of data to exploit their architecture using the computation techniques with high performance to overcome the issues. The requirement of a large amount of data (millions) is expensive for any researcher to train the deep neural network from scratch.
Numerous applications in deep learning have proved good results towards the recognition of leaf images [12], [13]. Therefore, this research work concentrates to overcome several issues on the recognition and classification of plant leaf images by maintaining high accuracy and reduced prediction time for the system. The paper contributes to two novel approaches, firstly, building a deep learning model for the classification of medicinal herbs. Secondly, the custom medicinal leaf dataset which constitutes 2515 images to identify 40 species of Indian (Ayurveda) herbs. The paper projects two unique models out of six models incorporating the transfer learning approach on different pre-trained Deep Convolution Neural Network (DCNN) architectures (VGG-16, VGG-19, Inception and Xception) used exclusively to extract features. Of the six models, four models classify the extracted features using an Artificial Neural Network (ANN) and the other two use Support Vector Machine (SVM) and SVM with Bayesian optimization technique (to tune the SVM hyperparameters) as classifiers. The custom dataset used is very small to build any Convolution Neural Network (CNN) from scratch because CNN requires a larger dataset for better evaluation. Hence, using the transfer learning technique has proved as a better choice for training the CNN models with a dataset of a smaller size. This result in reduced training time as well as overcoming the overfitting issue.
The proposed model efficiently overcomes the issues such as (1) rejecting the variability found in the same leaf species, (2) accepting the variability in different herb leaf species, (3) extraction of complex and unique features, and so on. Thus, resulting in achieving good results in both accuracy and speed. To summarize, the major contributions proposed are: (1) The custom dataset, built by collecting leaves from varied species of medicinal herbs available locally in the south India region. Several experiments carried over to standardize the dataset to achieve a high classification rate when applied to the proposed models. The proposed dataset attracts many researchers to build automatic image classification models using the artificial intelligence approach. The implemented system is analyzed using the Flavia dataset [14] and the custom dataset to compare the performance of the model.
(2) Extensive review from the related works helped to conclude on DCNN architectures such as VGG16, VGG19, InceptionV3 and Xception, classifiers such as ANN and SVM.
(3) The proposed model entitled DeepHerb model developed by extracting the Xception features and classified using ANN classifier shows high accuracy with less prediction time on real-time images.
(4) A mobile solution by developing a cross-platform mobile application labelled as "HerbSnap". The DeepHerb model is deployed into HerbSnap to classify the medicinal herbs with an accuracy of 95% (top-5 recognition rate) without any delay in recognising them. Table 11 describes the improved recognition time. A curated database (Traditional Medicinal Herb database) consisting of the pertinent details of the medicinal plants is integrated into HerbSnap to reveal the details of the recognized herbs.
The paper is organized as follows: Background study on transfer learning and CNN in section II. Section III describes the proposed methodology; the detailed findings are discussed in section IV. Section V concludes the work with future research ideas.

II. BACKGROUND STUDY
Automatic identification of medicinal herbs is essential and soon replace the manual recognition of enormous plant species by subject experts resulting in many benefits such as the reduced time and cost with acceptable classification accuracy. In the field of computer vision, solving problems using deep learning algorithms has become more prevalent. The study of an identification system for the plant has been carried over previously by many researchers. Analysis of digital images is essential in the research area of plant recognition [15]. The conventional approaches in machine learning techniques involve feature extraction algorithms, feature scaling and classification methods. The application of deep learning techniques on medicinal herb images includes no feature engineering but using convolution neural networks to extract the colour, vein, shape and edge features of a leaf image. Hence, for the classification, the selection of handcrafted features extracted from the leaf image is eliminated. The study shows the different classification techniques in-volved in two folds: to recognize the common/general plants using popular online leaf dataset by developing CNN from scratch and the other to identify the medicinal plants using custom dataset adopting the transfer learning approach using different DCNN architectures.
The CNN demonstrates an exceptional performance on many machine learning and image processing works [16] as it involves automatic extraction of both local and global features of an input image. A three-layer CNN model proposed to identify the plants using vein features from the INTA custom dataset for three different leaf species showed an acceptable accuracy of 92% [17]. A leaf identification system using five modules (2 convolutions and max-pool) followed by 3 Fully Connected Layers (FCL) of CNN architecture over general public leaf datasets such as Flavia with 97.9%, LeafSnap [18] with 86.3% and Foliage [19] demonstrated 95.8% accuracy [20]. Using the MalayaKew Leaf dataset, the five-layer network with two FCL in the CNN architecture built for the classification of leaves showed an accuracy of 97.70% and prove to have obtained a better representation of leaf features compared to the conventional approach [21]. A new three convolutional layer architecture built to extract features and classify using 2 fully connected layers accompanied by a softmax layer on the Flavia dataset showed an accuracy of 94.69%. Similarly, many references on building CNN from scratch on general leaf images depicted in Table 1 prove to be a good solution to replace the choice of multiple combinations of feature extraction techniques. But a large dataset is essential to achieve a high classification rate while performing real-time testing. Because to generalize all the patterns using limited dataset is difficult for any classifier. Also, limited dataset sufficiently representing its original distribution is considered as important in building the models [22].
Building new CNN architecture exclusively for medicinal herbs require a large custom-built herb dataset as the model may result in overfitting using the limited dataset. Currently, there is no availability of a public medicinal leaf dataset. Hence, there exists a huge demand to build one for developing a convenient system for medicinal plants. Although many data augmentation techniques such as horizontal flip, vertical flip, rotation, scaling and addition of noise are used to enlarge the dataset, the results may not be satisfactory. Another alternative approach for the above problem of a small custom dataset is Transfer Learning (TL) technique. The observations inferred from Table 2 summarizes the few works on the application of the transfer learning approach on medicinal plants. Also, the study reveals that the researchers have taken additional effort to build their dataset for model evaluation. The VGG-Net architecture used for feature extraction and SVM for classification on a custom dataset of Indian herbs showed an accuracy of 90.10%. But, no record of the prediction time and real-time testing [23].
The Inception-V3 architecture built along with SVM on a custom dataset showed an accuracy of 98%. The custom Indian herb dataset was constructed by extracting the images from google without maintaining the standard resolution [24]. The Bangladeshi herb dataset used VGG-16 architecture with an additional softmax layer to classify 8 classes, presented an accuracy of 95.13% [25]. The lack of standard images in the dataset has led to reduced accuracy. The AlexNet model with SVM showed an accuracy of 96.76% on 40 species of Indian herb dataset consisting of 2400 images. The dataset comprises 60 images per class (includes both front and back of each leaf face) where every sample image scanned are edited manually by using GIMP editor. Model evaluation time (training and testing), real-time testing and automation of editing the input images are not detailed [26].
The observations derived from Table 1 and 2, reveal that the features extracted from pre-trained convolution layers provide greater accuracy in recognizing the herbs and there exists a need to construct a standard medicinal leaf dataset just like the popular Flavia dataset built on leaves of general plants. The developed CNN models to be evaluated on realtime images for their efficacy on both accuracy and time. These studies motivate to propose a novel model using different DCNN architecture for extracting the leaf features. The proposed work will be a major contribution to the field of automatic identification of medicinal plants.

III. METHODOLOGY
The research focuses on automated identification of medicinal herbs using transfer learning technique in deep learning. Due to the unavailability of the herb dataset, efforts taken to construct a custom medicinal leaf dataset. Forwarding this dataset to build a CNN model in a traditional way result in reduced accuracy because the network requires a larger dataset (thousands or millions of images) for training, to provide competitive accuracy on real-time testing. The previous studies and review of the latest works prove that the use of transfer learning is a better approach to classify any images when the target dataset is limited in size.
Here, the work consists of four phases, data sampling, image pre-processing and segmentation, extraction of features and classification. Initially, the digital images of the herb samples are acquired. The leaf images are fed to preprocess and segmentation phase. The features of the leaf are extracted to obtain significant information by using the CNN architecture. Lastly, the features are classified using two machine learning techniques such as ANN and SVM.
We present a fine-tuned deep learning model for the classification of medicinal herbs. Fig. 1 shows the proposed model based on the transfer learning method using the large ImageNet dataset to learn from the pre-trained architectures (VGG, InceptionV3 and Xception) and classify the custom medicinal herb dataset after fine-tuning the model.

A. DEEP LEARNING ARCHITECTURES
The work consists of using different convolution neural networks based on architectures such as GoogleNet and Visual Geometry Group (VGG). These two architectures showcased high performance in the classification challenge VOLUME 4, 2016

2) INCEPTION V3 AND XCEPTION
Inception network V3 [32] is ideally a convolution extractor of the features and learns complex representations with few parameters. Here, one convolution kernel can map simultaneously the spatial and cross channel correlations by factoring explicitly into a series of operations. The Xception architecture [33] is one of the latest and accurate models developed in 2017. The vital concept of the model is based on depthwise separable convolutions and residual connections. It is stimulated by the Inception architecture, where the modules in inception are replaced by depthwise seperable convolutions.
Here, the modified depthwise convolution in Xception means (1×1) convolution (pointwise convolution) is followed by channel-wise spatial convolution (n×n). The model is much lighter with few connections. Xception stands for "Extreme Inception" and outperforms Inception V3 on the ImageNet database exclusively for image classification. The parameters used are very similar in both models. Xception consists of 36 convolution layers structured into 14 modules and three major flows known as entry flow, middle flow and exit flow. The images in the training set are forwarded first to the entry flow, which generates the feature maps. The feature maps are further fed to the middle flow (repeated eight times). Lastly, the feature maps in exit flow generate 2048 -dimensional vectors. The separable convolutions are followed by batch normalizations. The implementation of this architecture is much simpler in Keras.

3) DEPTHWISE SEPARABLE CONVOLUTIONS
It is a substitute to traditional convolutions commonly known as "seperable convolution" in TensorFlow. The main limitation of general convolutions is that the convolution operations are expensive. To illustrate, consider an input image with (100×100) dimension with 'c' number of channels. After applying the convolution filter of size (d×d), the number of convolution operations involved for 'n' kernels is given by k 2 ×k 2 ×c×n. Here, k denotes the resulting dimension after the application of convolution. To overcome the above expensive convolution operation, the depthwise separable convolution is initiated, consisting of two steps -depthwise convolution and pointwise convolution. It aims to decrease the memory requirement and computational complexity. In depthwise convolution, convolution computation is not carried over all the 'c' channels (d×d×c) rather it is (d×d×1). The first volume created has size (k×k×c), which is a convolution operation for one kernel or filter and not for n. In pointwise convolution, the traditional convolution is operated with size (1×1×n) over the volume (k×k×c). This result in the volume of shape (k×k×n). The above two steps reduce the number of operations to a factor proportional to 1 over n.
The explicitness of Xception is that pointwise convolution is followed by depthwise convolution as shown in Fig. 3. Transfer Learning is a new paradigm with increased attention lately in machine learning and deep learning to solve many domain problems [34]. When the target domain training data are insufficient to study the predictive models efficiently, TL influences supplementary data to learn from other linked source domains. The general approach of transfer learning adopted in this research is depicted in Fig. 4. In this paper, we fine-tune four widely known CNN models such as VGG-16, VGG-19, Inception V3 and Xception pre-trained on ImageNet database. ImageNet is a huge dataset of labelled 15 million high-resolution digital images of about 22,000 classes. In these models, the knowledge obtained from the larger dataset i.e., ImageNet is forwarded to the proposed domain problem. All the above DL architectures have 1000 classes as output. The proposed transfer learning approach adopted for all the four CNN models on the custom medicinal leaf dataset (DeepHerb dataset) is in Fig. 5. The fully connected layers are removed from the source architecture,  The leaf image captured or scanned is resized to 1600× 1200 resolution and forwarded for segmentation to separate the foreground and background. The various OpenCV techniques are applied systematically to replace the background of the original image with white colour. Initially, a structured forest algorithm is applied to detect the edges, filters are applied to remove the salt and pepper noise, approximate contour and masking of foreground and background are followed by a grab-cut method to identify the sure background and foreground of the image. The complete process is automated by using the necessary libraries in python programming.
The detailed steps carried out to segment the foreground and background of the query leaf image using the Python libraries such as Open CV2, Python image library (PIL) and NumPy are discussed in the algorithm and shown in Fig. 6 for Nyctanthes Arbor-tristis leaf. Algorithm: Image segmentation Input: Query leaf image I(m) with any lighter background Output: A new leaf image with white background Step 1: Resize the query input image I(m) to 1600×1200 pixels.
Step 2: Apply Gaussian blur technique to blur the image I(m) as shown in Fig. 6a.
Step 3: Detect edges using structured edge detection technique as shown in Fig. 6b.
Step 4: Filter out salt and pepper noise from I(m) obtained from step 3 as shown in Fig. 6c.
Step 5: Detect and draw the contour of I(m) as shown in Fig. 6d.
Step 6: Calculate the sure foreground and background area of I(m) as shown in Fig. 6e.
Step 7: Apply grab cut image segmentation technique to separate the leaf image from its background Step 8: Place the segmented leaf image I(m) on a white background as shown in Fig. 6f. Every input leaf image resized to size 400×300 and fed to Xception goes through the pointwise convolutions followed by depthwise convolutions, which result in a feature map of size 13×10×2048. This feature map is then flattened and forwarded to the FCL ending in 40 softmax neural units (one neuron for every class in the dataset). To note that, Xception is not retrained but independent of the ANN network, trained separately. The proposed DeepHerb model in Fig. 7 proves as a state-of-the-art model for any classification problems. For the DeepHerb dataset, the model showcased an average testing accuracy of 97.5% and a prediction time of 44.10 seconds (excluding the image segmentation stage) for 521 test images.

7) SUPPORT VECTOR MACHINE (SVM)
The SVM is a classical supervised learning method with high capability in dealing with bigger dimensional space and nonlinear data points [35]. SVM aims to keep the maximum marginal distance between the data points of the classes to be classified. This marginal distance indicates the farthest distance from the decision boundary. The position of the separating hyperplane is decided by the data points lying closer to the hyperplane.
In the research, two models are developed using an SVM classifier, where one model consists of an SVM classifier without application of Bayesian optimization technique and another model optimizes SVM hyperparameters (kernel and C values) using the Bayesian algorithm on the featured data to improve the accuracy and the execution speed. The C parameter, known as cost parameter controls the compromise between the correct classification of training data points and the smooth decision boundary. To provide the best predictive power of the model, the hyperparameter tuned for SVM are shown in Table 3. Bayesian optimization technique requires few iterations when compared to grid search optimization technique to reach the optimal values of the SVM hyperparameters such that its categorical cross-entropy loss shown in (1) is minimized.
where, N is the number of classes, P is the probability score of the model, C the class and y i the datapoints.

8) BAYESIAN OPTIMIZATION (BO)
In the world of machine learning, BO [36] is a sequential model-based optimization (SMBO) algorithm, one of the hyperparameter tuning techniques among manual search, grid search and random search techniques. BO differs from other techniques by improving the search speed using past performances. Hence, the future decisions are based on the past performance of the hyperparameters, which are not witnessed in random and grid search methods. The BO technique requires very few iterations to reach the optimal predicted performance values. It aims to minimize the objective function f (a) by building a probability model to identify the hyperparameters needed to evaluate the true objective function. The three main components comprising of the minimization process: (a) Acquisition function A(a); (b) Gaussian process model for objective function f (a), specified by its mean and covariance function; (c) After each new evaluation of f (a), the bayesian update process modifies the Gaussian model. The next evaluation point is identified by maximizing the acquisition function so that the Expected Improvement (EI) in the objective function is measured by discarding the values that increase it. The EI is given in (2).
a best is the least posterior mean location and µ Q (a best ) is the least value of the posterior mean.

9) SAMPLING MEDICINAL LEAF DATASET (DEEPHERB DATASET)
A standard medicinal leaf dataset by the name, DeepHerb is built by gathering the medicinal leaves commonly found VOLUME 4, 2016  Fig. 8. The intra-class similarity is due to variations such as maturity, illumination, colour, texture and shape. Fig. 9 shows the complete dataset that comprise of 2515 images with a resolution of 1600×1200. For the experiments, the dataset is divided into an 80:20 ratio for training and testing. The scientific name of the species se-  The leaves of the above plants have medicinal values that benefit in treating many ailments in human beings. The different parts of the selected plants, such as bark, fruit and seeds are useful in preparing many types of medications. All these plants can be grown in local gardens without much effort. The knowledge of these Ayurveda leaves and tips to use them has to be spread widely to the public.
Here, the experiments are performed on both the medicinal leaf dataset (DeepHerb) and the publicly available Flavia dataset. The popular Flavia dataset [14] is used to compare the analysis of the proposed model against the custom dataset. Flavia dataset consists of 32 leaf species and 1907 clean images with fewer luminance variations. All the CNN models are fine-tuned as per the parameters given in Table 5. To run the experiments, we used the Keras and TensorFlow deep learning framework using Python programming language. The images in the training set are augmented by rotating, horizontal and vertical flip, resize and adding some noise to images. The accuracy of all the CNN models for the DeepHerb dataset is analyzed.
The train set and test set of the DeepHerb dataset consists of 1994 images and 521 images respectively. The resultgraphs (epoch vs accuracy score (%)) of four pre-trained models (M1 to M4) on DeepHerb dataset depicted in Fig.  10 shows that Xception architecture (model M4) outperforms all the others with a highest validation accuracy. Hence,  further experiments are carried on classifying the Xception features in models M5 and M6, where Xception is used as the source model and SVM and (SVM + BO) classifiers as target models. The findings from the training and testing classification reports of all the models stated in Table 6 and 7 show that model M4 shows highest testing accuracy of 97.5% when compared to all other models. The bar graph (training and testing accuracy vs model) in Fig. 11 reveals the efficacy of all six models on the DeepHerb dataset. This proves that the Xception features classified by ANN is better than SVM classifier for the DeepHerb dataset.
All the models are run on Google Colab Pro. Table 8 shows the training and prediction time of the models on the Deep-Herb dataset. The findings from the table show that model M5 and M6 trains faster compared to other models because SVM classifier consumes less computation time than ANN. Though the model M6 predicts faster, its testing accuracy rate (95.20%) is less when compared to model M4 recognition rate (97.5%). By analyzing the results obtained from Tables 6, 7, 8, and Fig. 11, the findings encourage to choose model M4 as the best model to classify the species in DeepHerb dataset. VOLUME 4, 2016 Further, the performance of both models (M4 and M6) is benchmarked using the Flavia dataset -a popular public dataset of leaves to compare their classification performance. Fig. 12 shows the comparison between accuracy and the models (M4 and M6) using both the datasets. The accuracy obtained by M4 (97.22%) on Flavia dataset is competitive to model M6 (98.23%). But, for DeepHerb dataset, model M6 accuracy dropped to 95.02% where as model M4 performed well with an accuracy of 97.5%. Hence, model M4 is considered as the top performer and titled as "DeepHerb" model for our research. The state-of-the-art performance showcased by using the Xception features is ideal for any image classification problems where the dataset is of limited size. The top-1 training and testing accuracy obtained by Deep-Herb model is 98.45% and 97.5% respectively for 40 classes. Some of the misclassifications are observed due to the similarity issues in DeepHerb dataset (1) Out of 8 images of Trigonella Foenum-graecum, 6 images are classified correctly and 2 misclassified as Moringa Oleifera and Amaranthus Viridis (2) Out of 10 images of Piper Betel, 7 are classified correctly and 3 misclassified as Jasminum. The prediction results of 9 misclassified herbs is detailed in Table  9. The remaining 31 herbs are classified correctly with an accuracy of 100%. Both the top-3 and top-5 prediction results of the model is 99.8%.
The DeepHerb model is integrated into the mobile application. The single image prediction time of the DeepHerb model through the mobile application is around 1 second which includes its image segmentation, classification and retrieval of top-5 images from the database. The real-time testing of the DeepHerb model was carried on leaf images with different background colours. The image segmentation stage incorporated in the model efficiently worked on black, pink and off-white backgrounds. The real-time accuracy prediction rate is more than 95% for top-5 classification though more failures fall under top-1 and top-3 accuracy because herbs possess very close features, and image luminosity. Few query images captured under low light and slightly blur conditions are recognized in top-5 rather than in top-1 class prediction. Table 10 shows the comparison of the DeepHerb model with other state-of-the-art techniques adopted to classify the plant leaves using the Flavia dataset. It is evident from Table 10 that the proposed system shows improvement when compared to other works. However, the P-Leaf Net model proposed by Beikmohammadi, A., et al., [37] use image patches of the leaf instead of the complete image and 10000 epochs to store the highest accuracy weights. It shows the test accuracy of 97.72% on the Flavia dataset (1907 images) that is slightly higher than the accuracy scored by the DeepHerb model. Besides that, the accuracy of the P-Leaf Net model falls to 95.35% on the larger dataset (MalayaKew of 2816 images). The DeepHerb model, on the contrary, shows 97.22% on the Flavia dataset and testing performance of 97.5% on a larger dataset (DeepHerb dataset of 2515 images) with 60 epochs using whole leaf image as input. Comparing the performance of the DeepHerb model on both the datasets and its ability in real-time prediction exhibits significant improvement in recognizing plants. The above comparison proves that the amalgamation of features from Xception architecture and ANN classifier achieves improved prediction results. Table 11 details the comparison of the techniques employed, dataset size, accuracy and prediction time of related works that have shown interest in building a mobile solution. The table further suggests the uses of the mobile application and their interest in developing an Android application for plant recognition. It is evident from the table that the camera module based prediction is much faster [38] in comparison to microcontroller based prediction [39]. The other works show no record of the recognition time of the system [40]- [42]. Though the accuracy obtained by the model in [39] is slightly more compared to the proposed system, it shows a high prediction time as it uses a microcontroller and LCD screen. The DeepHerb model, in comparison to other works, shows a fast recognition time of 1 second through its HerbSnap mobile application. To the best of our knowledge, the HerbSnap (cross-platform mobile application) integrated with the DeepHerb model is the first of a kind to identify the Indian medicinal herbs at low cost and time with a high   few details of the medicinal plant like botanical name, common name and medicinal uses. More time is spent on gathering additional information associated with medicinal plants such as common name (s), botanical name, conservation status, growing weather condition (s) and many more for the selected 40 herbs in the DeepHerb dataset, which benefits the general public, researchers and experts to infer the additional knowledge easily.
2) The "HerbSnap" mobile application The DeepHerb model integrated into the HerbSnap mobile application is available in both android and iOS platforms shown in Fig. 13. The mobile application is developed using Flutter, an open-source software created by Google to build cross platform mobile application for iOS, Android, macOS and Microsoft Windows. The proposed DeepHerb model (M4) consists of extracting the features of the input image by using the Xception architecture and classification using ANN to identify the medicinal herb. Currently, the app identifies and displays the TMH database for 40 different species of herbs presented in the DeepHerb dataset is shown in Fig. 14. The HerbSnap allow users to either capture a herb image (preferable on a lighter background) or upload a herb image captured from its camera module for prediction. It displays the predicted top-5 images along with the model confidence scores. The user can choose the best similar leaf image by clicking on one of the predicted top-5 images. The app fulfils the big gap in identifying the medicinal plant between the general public and the experts. Eventually, the knowledge of medicinal herb gathered from the HerbSnap mobile application and the TMH database will stimulate the growth and uses of herbs in agriculture and help to conserve biodiversity.

V. CONCLUSION
The work proposed in the paper mainly concentrates on classifying the medicinal herbs to enhance the knowledge of medicinal plants available locally, to use and grow them for healthy living. The best use of advanced techniques such as transfer learning in computer vision and deep learning, motivate the building of an automatic recognition system for medicinal plants. The work proposes four CNN models such as VGG16, VGG19, InceptionV3 and Xception with ANN as a classifier and two CNN models such as Xception-SVM and Xception-SVM-BO with SVM as machine learning classifier. Of the six models, the proposed DeepHerb model extracts the features from the Xception architecture and classifies the herbs using an artificial neural network classifier shows an average accuracy of 97.5% using the DeepHerb dataset. The findings show that Xception architecture has outperformed when compared to the other three popular DCNN architectures. In this research, we claim that the combination of CNN features with ANN classifier works most appropriate because of the stability feature in ANN. The results obtained prove that Xception along with ANN showcase good accuracy results when compared to the model with Xception and SVM classifier fine-tuned by the bayesian optimization technique. The suggested DeepHerb model can further be used for any image classification problems. The work also proves that transfer learning is an efficient approach to build any neural network model with a limited dataset. However, failing to recognize the compound leaves and leaf images on the complex background is the limitation of the DeepHerb model.
Building the DeepHerb dataset involves tremendous human effort in collecting and standardizing the leaf images of forty different plant species. The dataset will be expanded further to concentrate more on rare and extinct species to attract more researchers to work for the betterment of herbal life in human society.
The proposed HerbSnap mobile application is an evidence of the base work of building an intelligent recognition system for Indian medicinal herbs using Flutter software. The Traditional Medicinal Herb (TMH) database is a small step towards building a curated database revealing multiple details of medicinal herbs, which attract many stakeholders of plants, including farmers.
The future scope of the work focuses on extending both the TMH database and DeepHerb dataset, providing easy access to the evidence of Ayurveda herbs to the world. Also, improving the classification technique to identify the very close classes, will support improving the real-time accuracy of the proposed system. The domain of medicinal plant seeks immediate attention, to identify and collect the rare and extinct herb species from remote places, as many herbs can be regrown and thus, provide a herbal solution to many ailments and improve the biodiversity of the country.