: JANAPATI | 127 LEAF HEALTH IDENTIFICATION ON MELON PLANTS USING CONVOLUTIONAL NEURAL NETWORK (CNN)

Plants require complete nutrients to grow well and produce good-quality products. Some examples of symptoms in plants that lack nutrients such as wrinkled leaves and slow ripening of fruit, so plants are less productive. Plants that lack nutrients are unhealthy plants. This research aims to identify healthy and unhealthy leaves on melon plants so that immediate action can be taken to deal with them. This research will be useful for melon farmers everywhere. The dataset used is data taken directly using a digital camera with the help of melon farmers to label each data, both healthy and unhealthy leaves. This research has two main works, they are the training process and the testing process. The proposed research uses the Convolutional Neural Network (CNN) method with 10 epochs. The test results on the 20-test data achieve 100% accuracy. We used accuracy, precision, recall, and f1-score to evaluate the classification method.


INTRODUCTION
Nutrients are some of the minerals found in the soil that are needed by plants to carry out photosynthesis. Nutrients are also nutrients in liquid form. These minerals are in liquid form which can be absorbed by the roots to be channeled into the green substance of the leaves.
Plant growth and development are strongly influenced by the availability of nutrients in the soil. Plants require complete nutrients to grow well and produce good-quality products.
The main nutrients that must be available for growth and the development of melon plants are nutrients N, P, and K [1]- [2]. The provision of nutrients can be through fertilization periodically to produce quality fruit, in addition to fertilization also required pruning, especially fruit.
Technology in agriculture nowadays is strongly correlated with human-machine technology [3], by utilizing image processing [4]- [6] and artificial intelligence [7] will facilitate the work of melon farmers. Early identification of disease is very crucial. Damage created by plant diseases can adversely affect production both in terms of quality and quantity. To ensure the quality and quantity of crops it is important to protect plants from diseases that affect plant leaves, stems, and fruits [8].
One of the previous types of research related to the current research is a plant leaf identification system using a convolutional neural network [9]. The research aims to identify five types of local Malaysia leaves. The accuracy achieved was above 98%. The other related research is deep learning models for plant disease detection and diagnosis [10]. It used 30 class labels and 87.848 images for a dataset. The research aims to identify healthy and diseased plants using deep learning. The best performance achieved 99,53%. The other previous research is convolutional neural networks in the detection of plant leaf diseases: a review [11]. The research has reviewed 100 of the most relevant CNN articles on detecting various plant leaf diseases over the last five years. The research identified and summarized several problems and solutions corresponding to the CNN used in plant leaf disease detection. Plant diseases recognition on images using convolutional neural networks: a systematic review is a systematic review of the literature that aims to identify the state of the art of the use of convolutional neural networks (CNN) in the process of identification and classification of plant diseases, delimiting trends, and indicating gaps [12]. Based on [9] and [10], the CNN method has good enough performance and achieves above 90%. Therefore, this research uses CNN approach to identify leaf health.
This research aims to identify melon plants that are healthy and unhealthy based on symptoms on the leaves. Unhealthy plants can result in slow melon growth compared to healthy melon plants. This can affect the quality and quantity of melons. Immediate action can be taken to deal with them by farmers. Our contribution will be useful in the agriculture technology field. This research is using a convolutional neural network to identify healthy and unhealthy melon plants based on the leaves. This research is using melon leaves images as input to predict the leaf health condition. Therefore, farmers can decide what steps are appropriate to overcome them.
Our contributions are: • This study proposes novel melon plant images as a dataset. • This study presents a good method to identify leaf health based on leaf visualization.
• This study improves the level of accuracy in previous state-of-the-art.

METHOD
This section will explain the proposed method. The overview of the research is shown in Fig. 1 and the proposed method with details for each sub-stage is shown in Fig. 2. There are two major works in this research, namely the training process and testing process. Both processes carry out the pre-processing process. After that, do CNN and save this model for the training process. Doing prediction for the testing process. The last is performance evaluation.
This research requires five main stages, they are data retrieval, pre-processing, training, testing, and evaluation. We present these stages with details shown in Fig. 2.
The first stage is data collection by taking melon leaves images at the rooftop of Institut Teknologi Telkom Surabaya. This place has vertical farming with melon plants. The second stage is pre-processing by getting the Region of Interest (ROI) for each image, then resizing each image, and augmentation the image to enrich the dataset. The third stage is the training process with Convolutional Neural Network (CNN) and then saving the CNN model. The fourth stage is the testing process. The prediction for 20 images testing data. The last stage is evaluation, this process evaluates the prediction result by getting the accuracy, the precision, and the recall.

Data Collection
This part explains the data collection process. Data collection by taking melon leaves images. Data collection is done by a researcher member with a total of 133 melon leaves images. The dimensions of the original images are 2084 x 4624 pixels, 4000 x 3000 pixels, and 2136 x 4624 pixels. The different image dimensions are due to differences in devices at the time of image capture. Therefore, further image preparation is required before it is included as a classification input. The format file image that we used is Joint Photographic Group (JPG). The data collection steps are shown in Fig. 3.

Pre-processing
This part discusses the pre-processing step. The first step of pre-processing is getting the Region of Interest (ROI) for each image by cropping images. After that, the current image is resized into 2079 x 2079 pixels, and augmentation of the image is to enrich the dataset. Those data can be used as training data and testing data. The final image is input in the training and testing process. The steps of preprocessing as shown in Fig. 4.

Training Process
This part explains the training process in this research with the classification method using Convolutional Neural Network (CNN). This method is using mathematical operation namely convolutional. We used CNN because we worked with images. The image is considered a twodimensional grid. CNN has three main layers, namely the convolutional layer, the pooling layer, and the fully connected layer [13].
There are several important components of the convolutional layer, namely input data, kernel, and feature map [14]. In this research, this training process is using 113 training data as input data of the convolutional layer. Each image with dimensions 2079 x 2079 pixels will be resized into 128 x 128 pixels. The number of classes in this classification is 2 classes. We labeled the training data into these two classes. The example of melon leaves images is a class of healthy and unhealthy such as in Fig. 5.
The input layer of CNN is 128 x 128 x 3, it means the image dimension is 128 x 128 and its RGB value. The convolutional neural network architecture is shown in Fig. 6. We used ten layers during the CNN process, they are the input layer, the convolution 2D 128 X 128 X 32, the pooling layer used max-pooling 2D 64 X 64 X 32, the convolution 2D 64 X 64 X 32, the pooling layer used is max pooling 2D 32 X 32 X 32, the convolution 2D 32 X 32 X 32. Flatten is reshaped from 32 X 32 X 32 into a vector 1 X 32768. Dense to run a fully connected layer, we used dense 1 X 100, dense 1 X 100, and dense 1 X 2. SoftMax that we used 1 X 2. The CNN model will be saved and this model will be used in the testing process.
The CNN Hyperparameter is in Table 1, this table shows epoch, optimizer, loss function, and activation of output layer. In this research, we use Adam for optimizer, categorical cross entropy for loss function, and SoftMax for activation of output layer.

Testing Process
After the training process is a testing process. This part explains the simple testing process. The testing process for 20 images of testing data has been done by using the saved CNN model. The testing process is carried out randomly on the 20 data to be tested. The testing result shows each test data successfully predicts 100% according to its class. The validation process is carried out one by one for each test data. Furthermore, the prediction results are also carried out by an expert validation process by melon farmers who usually take care of melon plants in their daily activities.

Evaluation
The last stage is evaluation, this process evaluates the model and prediction result. The evaluation of the CNN classification method can be calculated with its accuracy value, precision, and recall [15]. Accuracy is one of the performance measures used in classification and prediction modeling. Accuracy measures how well a model predicts or classifies objects to the correct class. Accuracy can be used as a performance measure to assess and compare different classification and prediction models.  [17]. The accuracy, precision [18], and recall [18] formulas are shown in equations (1)

RESULT AND DISCUSSION
In this section, we explain the experimental results both training and testing results. The model performance is shown in Fig. 7 by model accuracy and model loss during the training process. The X-axis represents the epoch. The Y-axis represents loss and accuracy. The blue line represents loss and the orange line represents accuracy. The loss gradually decreases until the loss is close to 0 and vice versa for the accuracy it gradually increases until it is close to 1. The accuracy of the training process reaches 1. Fig.  7 shows the loss value, accuracy value, and time for each epoch. This research uses 10 epochs. Fig. 8 shows the training and validation, where is Fig. 8 (a) for Loss and Fig. 8 (b) for Accuracy. The testing has taken random test data as much as 20 times in other words 20 images was tested. We obtain TP and TN values are 10 and 10, FP and FN values are 0 and 0. TP, TN, FP, FN are also shown in the confusion matrix according to Fig. 9. After that, we can calculate the accuracy value below based on equation (1), the precision based on equation (2), the recall based on equation (3) The accuracy comes out to 1 or 100%, which means 20 correct predictions out of 20 total examples. Also, the precision, recall, and f1-score come out to 1 or 100%. The model evaluation evidence is in Fig. 10.  Fig. 10, we obtain the macro avg of precision as 1, the macro avg of recall as 1, and also the macro avg of the f1-score as 1. We obtain a weighted avg of precision of 1, a weighted avg of recall of 1, and also a weighted avg of f1-score is 1. It shows our classifier is doing a great job of identifying healthy melon leaves. This research proves that the proposed method has very good performance for this case.

CONCLUSION
The ultimate goal of this research is to identify melon plants that are healthy and unhealthy based on symptoms on the leaves. Unhealthy plants can result in slow melon growth. This can affect the quality and quantity of melons. Immediate action can be taken to deal with them by farmers. This research helps the melon farmer to early identify the unhealthy melon leaves.
This research used Convolutional Neural Network (CNN) as a classification method. The proposed method used an epoch equal to 10. The input of this research is melon leaves images and the output of this research is a class prediction for each testing image. The prediction result reaches an accuracy value of 100% for the testing result. The accuracy value is obtained from TP, TN, FN, and FP values. The precision, recall, and f1-score are also achieved 1. The testing result shows the proposed method successfully achieved maximum performance against the dataset used.
The development of this research is to develop mobile applications to support the work of melon farmers in the early detection of healthy or unhealthy plants based on the image of the leaves. The other future development of this research is comparing several classification methods in determining the best method for detecting the health condition of melon leaves.