Android Based Application for Rhizome Medicinal Plant Recognition Using SqueezeNet

Rhizome is modification of stem that grows below the surface of the soil and produce new bud and roots from its segments. Besides being used as spices, rhizome also used by people as ingredients of traditional medicine to treat various diseases. This proves that rhizome has many benefits. However, the ability to recognize types of rhizome can only be done by certain people because rhizome has variety of types, aromas, and different colors. This study was designed to build an Android based application to recognize the types of rhizome, so that people can recognize types of rhizome without having special knowledge. The application was built using Convolutional Neural Network (CNN) methods with SqueezeNet architecture model. This study used 9 class of rhizome with Zingiberaceae Family, namely Bangle, Jahe, Kunyit Kuning, Kencur, Lengkuas, Temu Kunci, Temu Ireng, Temu Mangga, and Temulawak. Testing is carried out to know the performance of application such as accuracy level of application in recognize types of rhizome. Based on the results of testing with 54 rhizomes sample images, the application is capable of recognizing rhizomes types by obtaining a top-1 accuracy value of 41% and top-5 accuracy value of 81%.


I. INTRODUCTION
Rhizome is modification of stem that grows below the surface of the soil and produce new bud and roots from its segments. Rhizome has many benefits such as raw materials for herbs, cooking spices or spices, aromatherapy (essential oils), fragrances, even as a basic ingredient in the beverage industry. In addition, rhizome also used by people as ingredients of traditional medicine to treat various diseases. Rhizome have a role in storing the results of plant metabolic processes so that these plants contain many active compounds that are beneficial to human body [1]. Rhizome which are commonly used as medicine mostly from Zingiberaceae family.
Rhizome has variety of types, aromas, and different colors. People usually recognize rhizomes based on its aroma and color, however not all people have this knowledge. Its because rhizome has similar characteristic and shape each other, so it's hard for people to recognize rhizome types. Some people usually recognize rhizome by comparing rhizome image that will be identified with rhizomes images on book or internet or bring it to the researcher. This certainly requires a lot of time and cost. Therefore, this study tried to build a mobile application to help people to recognize rhizome without having special knowledge.
The proposed approach in this study is a deep learning approach that recognize the image of rhizome. One of the methods used is Convolutional Neural Network with architecture model namely SqueezeNet. This study tried to utilize SqueezeNet architecture model because this model has techniques for compressing parameters while maintaining accuracy [2]. Therefore, this model has a small model size and can be used on devices with limited memory such as mobile devices.

II. RELATED WORKS
From the research that has been conducted, there are several studies related to this research, such as rhizome identification system using One Minus Correlation Coefficient method [3]. Another research is done by [4] and [5], using Convolutional Neural Network method with Smaller VGGNet-like they try to recognize classify Indonesian herbs and spices and also dragon fruit ripeness. [6] also use Convolutional Neural Network method with GoogleNet architecture to recognize plant leaf. Convolutional Neural Network (CNN) is deep learning method that has best performance in natural image processing. However, the research taken by [3], [4], and [6] only based on desktop. In addition, the CNN method used by [4] and [6] has a large model size, so it is not suitable for devices with limited memory such as mobile devices. Therefore, this study tried to build an Android based application that can recognize medicinal plant rhizome and utilize another architecture from CNN such as SqueezeNet. SqueezeNet firstly introduced by [2]. It has 50 times less parameters and 2 times faster training time. Therefore, this model has a small model size and suitable for mobile devices.

III. PROPOSED APPROACH
This study proposed the use of CNN model to recognize medicinal plant rhizomes image. This study uses SqueezeNet architecture to create the model. With this approach, object inside image automatically recognized from classification process.

A. SqueezeNet
SqueezeNet is an artificial neural network architecture using the CNN method. SqueezeNet is capable to reach AlexNet accuracy level (ILSVRC 2012 winner) with 50× less parameters and 2× faster training time. SqueezeNet replaces many 3×3 convolution layers with 1×1 and fewer filter to minimize the dimensions of activation map. SqueezeNet also replaces the fully-connected layer with global average pool layer to determine predictions by taking the average of the last convolution layer [2]. This model has a small model size so it can be used on mobile devices.

B. Tensorflow Lite
Tensorflow Lite is a machine learning library designed specifically for deploying model on mobile and embedded devices. Tensorflow Lite provides tools to convert Tensorflow models to Tensorflow Lite format for use on mobile and embedded devices. These tools can also be used to optimize binary size and model performance by using a quantized model. Tensorflow Lite supports Android (Java / C ++ API), iOS (C ++ API) and Linux (Python / Java / C ++ API) platforms [7]. C. Top-N Accuracy Top-N Accuracy is the correct predicted class contained in Top-N. Top-N Accuracy commonly used are Top-1 Accuracy, Top-3 Accuracy, and Top-5 Accuracy. This study uses Top-1 Accuracy and Top-5 Accuracy to test the application performance. Top-1 Accuracy is a prediction class with the highest probability that is classified correctly. Top-5 Accuracy is the 5 highest prediction class where one of the class is correctly classified. The equation used to calculate the accuracy value is refer to (1) as follows [8]: Our proposed approach is to use a Squeeze-Net to build an artificial neural network model. This model's goal is to classify rhizome images. To make this model run on mobile applications, we first need to change the model generated by the library (we use Tensorflow with a Keras Backend) in the form of a .h5 file into a .tflite file type (tensorflow lite model file). After getting the model we have to test the performance of the model using Top-N Accuracy. General system overview of medicinal plant rhizome recognition is shown in Figure 1. Generally, this system consists of two process, namely training process (training and validation) that is drawn with dotted arrow line and testing process that is drawn with black arrow line. .

IV. RESULT
A. Dataset Dataset in this study is created by searching images in Google Image Search and directly take pictures in Bokashi Farm. This study also uses augmentation data to multiply the dataset. As the results, this dataset has 5454 images from 9 classes. Then we have to split the image dataset into training data and testing data. Data structure of this study can be seen in Figure 2. Training data is used for training process with SqueezeNet model and testing data is used for rhizome application testing. After collect the dataset, we have to train our SqueezeNet model using training data. This study used 200 epoch and learning rate value is 1e-3, according to [9] research that best performance of SqueezeNet is obtained when changing learning rate value from 4e-2 to 1e-3. SqueezeNet performance chart during the training process is shown in Figure 3.

C. Application Performance
The application was build using Tensorflow library with Keras backend. SqueezeNet model with Keras format (.h5) must be converted to Tensorflow Lite format (.tflite) using Tensorflow Lite Converter so it can be used on mobile application. Tensorflow Lite provides a converter using quantized models to optimize the model by increasing performance and reducing the binary size of the model but slightly reducing the accuracy of the model. This application uses a floating-point model because SqueezeNet model has produced a small model size after training process, that is 6.589 KB. Then after converting using Tensorflow Lite Converter, the model size becomes 2.173 KB. The model (.tflite) and label (.txt) results then entered into assets in Android Studio software. How medicinal plant rhizome application works can be seen in Figure 4.  hyperlink on rhizome name. The results of rhizome recognition android based application is shown in Figure 5.
Application testing is carried out to determine the performance of the application which is the application accuracy value in recognizing the medicinal plant rhizomes. The application was tested using 54 testing data of medicinal plant rhizome images with 6 data each class. The test data class, image amount of every class, and data correctly recognized described in Table I.
According to the data in Table I, from the correctly recognized (CR) data, we can calculate the testing accuracy value by using equation (1) Based on the calculation (2) and (3) shows the application is capable to recognize medicinal plant rhizomes by obtaining a top-1 accuracy value of 41% and top-5 accuracy value of 81%.

D. Application Testing
Application testing is carried out by comparing the similar application performance, that is accuracy value. The result of application testing is shown in Table II.
Based on the calculation (4), (5), and (6) shows medicinal plant rhizomes application obtain better accuracy value, which is 81% compared to other similar application. This is due to the medicinal plant rhizome application is specifically made to recognize medicinal plant rhizome with Zingiberaceae family, while similar application is made to recognize plants in general. The results of application testing with similar application can be seen in Figure 6.

V. CONCLUSION
This study is capable to build Android based application that can recognize medicinal plant rhizome using Convolutional Neural Network method with SqueezeNet architecture model. Through this application, the user can recognize medicinal plant rhizome without having special knowledge. The application is tested using testing data to determine the application performance. Based on application testing with 54 testing data, the application capable to recognize medicinal plant rhizome by obtaining a top-1 accuracy of 41% and top-5 accuracy of 81%. This application also tested with similar application and obtain better accuracy value which is 81% compared to other similar application.