Analysis of RGB Plant Images to Identify Root Rot Disease in Korean Ginseng Plants Using Deep Learning

: Ginseng is an important medicinal plant in Korea. The roots of the ginseng plant have medicinal properties; thus, it is very important to maintain the quality of ginseng roots. Root rot disease is a major disease that affects the quality of ginseng roots. It is important to predict this disease before it causes severe damage to the plants. Hence, there is a need for a non-destructive method to identify root rot disease in ginseng plants. In this paper, a method to identify the root rot disease by analyzing the RGB plant images using image processing and deep learning is proposed. Initially, plant segmentation is performed, and then the noise regions are removed in the plant images. These images are given as input to the proposed linear deep learning model to identify root rot disease in ginseng plants. Transfer learning models are also applied to these images. The performance of the proposed method is promising in identifying root rot disease.


Introduction
Plants play a vital role in the life of human beings and animals. They are major sources of food, medicine, shelter, etc. Plant phenotyping is becoming essential with the increase in food demand globally. It deals with the quantitative measurement of the structural and functional properties of plants-that is, the process of determining plant traits such as chlorophyll content, water content, leaf surface area, and leaf count, and disease identification. The conventional methods involve the manual measurement of the key plant traits. These methods depend on the knowledge of plant breeding experts and farmers. The drawbacks of the conventional methods are that they are expensive, inaccurate, and time-consuming, and many of them are destructive in nature. To overcome these difficulties and limitations, modern researchers are using computer vision techniques [1] and deep learning models in plant phenotyping.
Recently, global agriculture and modern research programs have faced difficulties in plant breeding [2]. Many plant phenotyping communities have been developed in different countries and are involved in solving problems in plant phenotyping. Many researchers have worked on various plant phenotyping methods to identify plant traits from plant images. Wu and Nevatia [3] developed an occluded object segmentation method for plant phenotyping. Praveen Kumar and Domnic [4,5] developed various plant segmentation and leaf counting models for plant phenotyping. Dellen et al. [6] identified the growth signatures of rosette plants from time-lapse video. Grand-Brochier et al. [7] studied various methods to extract the tree leaves from natural plant images. Reeve Legendre et al. [8] developed a low-Cost chlorophyll fluorescence imaging to detect the stress in Catharanthus roseus plants. Raghav Khanna et al. [9] developed a spatio-temporal spectral framework for plant stress phenotyping. Martínez-Ferri et al. [10] conducted a study in an environmental condition where only white root rot disease stress was applied to avocado roots and the other conditions favored plant growth. This study was conducted to provide information on physiological change that occurs during the initial stages of R. necatrix infection on avocado roots. It showed the effect of root rot disease on leaf chlorophyll content.
Biotic and abiotic plant stresses act as important factors for crop yield. In order to protect the plants from these stresses and to prevent a reduction in crop yield, plant breeders depend on plant phenotyping methods and genetic tools to accurately identify plant traits.
Korean ginseng (Panax ginseng Meyer) is a famous herbal plant that is sensitive to biotic stress. It is a shade-loving plant and useful for strengthening human immunity. It is highly sensitive to heat stress [11,12]. The roots of Korean ginseng have high pharmacological efficacy [13]. The size, appearance, and shape of the roots determine the quality and value of the roots. Generally, Ginseng plants are cultivated for several years, and the roots of the plants are harvested for sale between the fourth and sixth years. Ginseng roots are at risk of soil-borne diseases caused by nematodes, fungi, and bacteria in these long cultivation periods [14]. Among these fungi are the most common pathogens causing various diseases such as anthracnose, alternaria blight, root rot, gray mold, botrytis blight, etc. [15,16].
The fungus Cylindrocarpon destructans is one of the most harmful pathogens, causing root rot and rusty root disease. Root rot disease can significantly reduce ginseng production [17][18][19][20]. Cylindrocarpon destructans also gives rise to thick-walled resting spores known as chlamydospores that can survive for more than 10 years in the soil. This can lead to the development of root rot disease at any point of time while the spores remain in the soil [21].
The root rot disease in grapevine plants cause symptoms in aboveground plant region [22][23][24]. These include stunted shoots, wilting leaves, low fruit production and dwarf leaves. Sometimes, the plants do not show any symptoms of disease (asymptomatic) in the aboveground plant region [23,25]. The roots cannot support the aboveground plant regions and they start to die. Hence, there will be less photosyntetic activities in the plants and the plant slowly starts to die. A study [26] on symptomatic and asymptomatic effects of this disease has been conducted in 15 plant species.
There are many existing methods [27,28] to identify the presence of Cylindrocarpon destructans, but these methods are destructive in nature. The root rot disease has been identified from the plant leaves using hyperspectral leaf images and machine learning techniques [25]. The root images are analyzed using feature extraction methods [29] and deep learning techniques [30] to find the root rot disease in Lentil. In order to obtain the root images, the plants are removed from the pots and the root images are captured.
Hence, non-destructive identification of root rot disease is necessary to prevent a reduction in crop yield. In order to develop a low-cost, high-throughput, non-destructive, image-based analysis model, RGB images can be used. It is easy to collect numerous RGB images at a low cost and in a short time. Furthermore, various analyses are possible with these numerous data. The visible information from the collected RGB images helps in identifying the state and morphological changes in the plants through RGB-image-based plant phenotyping.
Nowadays, deep learning models are widely used to solve various complex real-time problems. Furthermore, their usage is increasing in solving agriculture-related problems. Among them are deep-learning-based plant phenotyping methods. The deep learning models can be applied to the collected data to perform various analyses.
In the proposed method, various deep learning models are applied to identify biotically stressed (root rot) Korean ginseng plants based on RGB plant images. Furthermore, a new simple linear deep learning model is proposed. The proposed method involves three steps: (i) a region growing method for plant region segmentation, (ii) noise removal, and (iii) deep learning models for identifying biotically stressed (root rot) ginseng plants. In the first phase, the plant region is segmented from the raw RGB images using the seeded region growing method. Then, in the second step, the noise regions are removed from the segmented plant region. Finally, these noise-free segmented plant images are given as input to the proposed deep learning model to identify root-rot-diseased ginseng plants. The main advantages of the proposed method are that it (i) is non-destructive, (ii) is high throughput, (iii) does not require ground-truth images, (iv) is robust, and (v) is cost effective.
The structure of the remaining portion of this paper is as follows: Section 2 describes the materials and methods. Section 3 explains the results and provides a discussion, and finally, conclusions are given in Section 4.

Dataset Preparation
Dormant Panax ginseng roots were obtained from the Ginseng National Research Center in Daejeon, South Korea. After storage for 1 month at 4 degrees Celsius to break dormancy, the roots were planted in small pots. The soil used in our experiment was collected from the field and was contaminated with the soil-borne pathogen (Cylindrocarpon destructans) that causes root rot disease in ginseng plants. The collected soil was divided into two halves. One-half of the soil was sterilized using an autoclave [31]. The soil was sterilized at a temperature of 121 degrees Celsius for 20 min. The sterilization was repeated three times under similar conditions to ensure the healthiness of the soil. The plants were then grown in two different soil conditions: (i) pots containing the healthy soil and (ii) pots containing the soil mixed with soil-borne pathogens (Cylindrocarpon destructans). To grow the plants, the growing conditions were set to a temperature of 20 degrees Celsius with relative humidity of 60-70%, manual watering once a week, and continuous light intensity of 15,000 Lx. In our experiment, biotic stress was the only stress applied to the ginseng plants. Among the diseased plant images, the asymptotic diseased plant images [25] exist and did not show any symptoms in leaves but in roots. Figure 1 shows the plant growth conditions in the chamber. RGB images of the ginseng plants were captured one day every week between the 10th week and 16th week using a Canon EOS 700D camera. The imaging device is shown in Figure 2. These images were stored in a computer separately for further analysis. The entire dataset of images was divided into training and testing images. There were 2112 healthy plant images and 1991 diseased plant images in the training dataset. The testing dataset contained 760 healthy plant images and 770 diseased plant images. Image augmentation [32,33] was adopted in our experiment. The variations such as Rotation in the range of ±180 degrees; Height and/or width shifting of ±0.1 of image dimensions; Contrast variation with the factor between 0.75 and 0.95; Illuminance variations with a factor of 0.5 and 1.5 are randomly applied. Figure 3 shows a few augmented images. Of the training dataset, 10% were used for validation, and the remaining data in the training dataset were used for training the model. The images were carefully divided for training, validation, and testing such that plants in different stages were distributed evenly among the datasets in order to ensure that the proposed method is capable of identifying diseased plants at different stages. Once the images were collected during the 16th week, the plants were harvested to check the ginseng roots and root images were also captured in order to cross-verify the proposed model. The size of the plant and root images was 3456 × 5184.

Proposed Method
In a study conducted by Martínez-Ferri et al. [10], it was found that root rot disease has effects on the physiology of leaves. The authors in [25] studied the early identification of root rot disease in Grapevine. They identified the root rot disease by analyzing the hyperspectral images of the Grapevine leaves and matched the leaves symptoms with root symptoms. These studies motivated us to develop a high-throughput, non-destructive model that can be used to identify root rot disease from physiological changes in ginseng leaves. The proposed method consists of three steps. In the first step, the plant region is segmented based on the region growing algorithm. The purpose of plant segmentation is to improve the accuracy and robustness of the proposed method. In the second step, the noise regions are removed from the segmented plant regions. Finally, root rot disease is identified by the proposed deep learning model. The workflow for the proposed method is presented in Figure 4.

Plant Segmentation
In this step, the plant regions are segmented from the input plant images using the region growing algorithm. To segment the plant images, initially, the RGB plant images are resized into 227 × 227 × 3 and converted to HSV images. Then, the plant region is segmented based on Algorithm 1.
The selection criterion (G i ) is given in the following equation: where H(v i ) denotes the ith pixel value of the H plane and S(v i ) denotes the ith pixel value of the S plane in the HSV plant image. A pixel is considered a seed pixel (s) when it is the first occurring pixel that satisfies selection criterion G i in the HSV plant image. The similarity criterion plays a major role in the region growing process. This has to be chosen such that the plant region can be segmented from the plant image. In the proposed method, the similarity criterion (G i,j ) was chosen as given in Equation (2): where i and j are neighboring pixels of the plant image.
Equations (1) and (2) are used in the region growing algorithm (Algorithm 1) to segment the plant region.
if G i,j remains_unchanged then 10: Add that pixel to B 11: Search for a new seed pixel from the nearby unassigned pixels of the image. 12: else 13: Add that pixel to P 14: Update the current pixel as seed pixel. 15: end if 16: end for 17: Repeat until all pixels are assigned to either P or B

Noise Removal
The second step is noise removal from the segmented image. The segmented plant region contains certain background regions like the reflection of light, background pixels similar to the diseased portion, etc., as noise regions. These noise regions affect the root rot disease identification. Hence, it is very important to remove these noise regions. Utmost care should be taken in the noise removal stage because infected leaf regions may be removed along with the noise regions present in the segmented plant region. In the proposed method, the noise removal is done in the following way: (i) Initially, the connected components (similar pixels connected with each other) are identified in the segmented image. (ii) Then, the area of each component is calculated. (iii) Finally, the small objects are removed by thresholding. In the proposed method, based on experimentation, the threshold value was chosen to be 3500. After removing the noise region from the segmented region (P), it is mapped with the input HSV plane. There will be pixels in the HSV plane that do not map with P which are considered as background pixels. These background pixels are removed in HSV plane and the remaining plant region is used as the mask over the original RGB plant image to obtain the plant region.
Since the aim of the proposed method is to identify the root-rot-diseased plants (without ground truth images, so that it can be applied in various environments where the creation of ground truth images is tedious) and not plant segmentation, the segmentation accuracy was not calculated as this calculation requires ground truth images.

Root Rot Disease Identification
Once the plant regions are segmented from the plant images, they are given as the input to the proposed deep learning model to identify whether the plants are infected with root rot disease. Image augmentation techniques such as random rotation and random rescaling were used during the model training. The architecture of proposed model is shown in Figure 5, and the details are presented in Table 1. Furthermore, transfer learning models were used to identify the plants infected by root rot disease. In transfer learning, deep learning models are trained to learn the features in a domain and the models are optimized to learn more features in a specific domain. The various transfer learning models used in our experimentation were AlexNet, VGG19, SqueezeNet, DarkNet19, ResNet18, and ResNet101. In the proposed model, there are four convolutional layers. Three of these convolutional layers are followed by the maxpooling layer. All these layers are followed by two fully connected layers. The second fully connected layer is followed by a softmax layer and a classification layer. The numbers of neurons in the first and second fully connected layers are 1024 and 2, respectively. The following is a brief discussion about the functions of the different layers in the deep learning models. The convolutional layer identifies the local feature maps from the input image. The size of the features can be calculated by the following equation: where F denotes the feature map size, W is the input image size, K is the filter size, P denotes the padding, and S denotes the stride.
The activation layer used in the proposed model is a ReLU layer. The ReLU function gives output the same as the input if the input is greater than 0. It is given by where x is the input to the ReLU function.
Maxpooling is used to down-sample the obtained feature maps from the convolutional layer. The size of the output after maxpooling is given by the following equation: where O is the output size of the maxpooling function, I y is the input shape, L is the pooling window size, and S is the stride. The fully connected layers generate the final features by integrating the output of previous layers, and these final features are used for classification or regression. The softmax layer assigns the probabilities for each class in the problem. It is given by the following equation: where M is the softmax, x is the input vector, and exp(x i ) and exp(x j ) are the exponential function for input and output vectors, respectively. The classification layer calculates the loss and performs the classification tasks. The loss function used in the proposed model is cross-entropy. In our experiment, the loss function is given by the following equation: where L C is the cross-entropy loss; t i is the truth value, having 0 or 1 as its value; and m i is the ith class softmax probability.

Results and Discussion
The proposed method was implemented in Matlab (R2020b) on a system with a 64-bit Windows operating system, 16 GB memory, and a 2.9 GHz Intel i5 processor. Initially, the plant region was segmented from the plant images using Algorithm 1. Once the noise region was removed from the plant region, these images were given as input to the transfer learning models and the proposed model.

Performance Evaluation Measures
The measures used for evaluating the proposed model are as follows: (i) Precision (P) is the ratio of the number of correctly identified root-rot-diseased plants to the total number of identified root-rot-diseased plants. It is given in Equation (8). (ii) Recall (R) is the ratio of the number of correctly identified root-rot-diseased plants to the total number of root-rot-diseased plants. It is given in Equation (9). (iii) The F 1 score is the weighted average of P and R. It is given in Equation (10). (iv) Accuracy (Acc) is the proportion of correctly identified plants and is given by Equation (11).
Here, TP is True Positive, which denotes the number of root-rot-diseased plants correctly identified; FP is False Positive, which denotes the number of plants falsely identified as root rot diseased; FN is False Negative, which denotes the number of root-rot-diseased plants that were not identified as such; and TN denotes the number of healthy plants correctly identified.

Manual Design of Model: Effects of Layers and Hyperparameters
The proposed deep learning model was trained with the SGDM (Stochastic Gradient Descent with Momentum) solver. The values of the initial learning rate, number of epochs, batch size, and momentum were chosen as 0.001, 100, 64, and 0.9, respectively. These parameter values were chosen such that the model has high performance. The manual selection involved in designing the architecture is explained as follows.

Layers
In designing the proposed model, the appropriate layers were selected in such a way that the model exhibited better classification accuracy. The proposed model was also tested with fewer layers and more layers. The model did not learn the necessary root rot disease features when designed with fewer layers, resulting in lower accuracy, whereas the model learned more features but showed overfitting when it was designed with more layers. In our design, combinations such as (Conv2, Pool2), (Conv3, Pool2), (Conv4, Pool2), (Conv4, Pool3), (Conv5, Pool2), (Conv5, Pool3), (Conv6, Pool2) and (Conv6, Pool3) were evaluated. The high accuracy and low error was achieved when the number of convolution layers was increased from two to four and the number of pooling layers used was three. However, when the number of layers was increased, the accuracy was reduced. Hence, a further increase in the number of layers did not have a significant effect on the accuracy. Thenmozhi and Srinivasulu Reddy [34] studied the effects of the number of layers in the performance of their model. They investigated the layer depth of the CNN model and analyzed the effect of the number of layers in their model for pest classification by varying the number of convolution layers from three to seven. They observed that the accuracy decreased with an increase in the number of layers, and lower error was observed for six convolution and five pooling layers, avoiding the occurrence of degradation. It can be observed from Table 2 that the proposed model performed better for four convolution and three pooling layers and effectively reduced overfitting.

Number of Epochs
The proposed model was trained for up to 100 epochs. The initial learning rate and mini-batch size were set to 0.001 and 64, respectively. The accuracy and loss curves during model training is shown in Figure 6. It can be observed from both the curves that the loss values are stable, and after the 75th epoch the accuracy results are closer to 100% with less fluctuation for training and closer to 90% for validation and obtaining 90.73% at 100th epoch.

Initial Learning Rate
The initial learning rate is one of the key factors that determines model performance. The learning process speed is high when the model is trained with a higher learning rate, but there will be an increase in the loss function. The loss function can be decreased with a lower learning rate. Hence, it is essential to set the appropriate learning rate when training a model. Xia et al. [35] performed a study on pest classification and varied the initial learning rate between 0.0006 and 0.0014; the best performance was obtained at an initial learning rate of 0.0001. In our experiment, the proposed model was evaluated with various initial learning rate values, such as 0.000001, 0.00001, 0.0001, 0.001, and 0.01. The number of epochs and size of mini-batches were set to 100 and 64, respectively, during the evaluation of the model. The performance evaluation is shown in Table 3. It can be observed from Table 3 that the proposed model performed better when the initial learning rate was set to 0.001.

Mini-Batch Size
The mini-batch size is an important parameter when training a deep learning model. The model takes a long time and huge memory to run if the batch size is larger. Hence, it is essential to select the appropriate mini-batch size for better performance of deep learning models [36]. In our experiment, the proposed model was evaluated with various sizes of mini-batches, such as 1, 16, 32, 64, 128, and 256. The performance of the proposed model is high with the mini-batch size of 64. This is shown in Table 4. The proposed model was evaluated for 100 epochs with a learning rate of 0.001. Based on the experiment, a mini-batch size of 64 was chosen to train proposed model such that the convergence precision of proposed model is increased. It can be observed from Table 4 that a further increase in mini-batch size did not improve the model performance. Hence, the proposed model was trained with a mini-batch size of 64.

Machine Learning Based Optimization in Designing the Model
The manual hyperparameter designing in a model has a few limitations such as the dependency of knowledge and experience of the users, time consuming to find the optimal hyperparameters, and difficulty in handling huge data when the number of parameters and their range of values increase. The users require the capacity to identify the relations between the hyperparameters and the results obtained through visualization tools [37]. In order to overcome these limitations, machine learning based hyperparameter optimization has been used in recent researches. One among them is bayesian optimization [38]. This was used in our experiment and the initial learning rate and batch size were set to 0.0006 and 64, respectively. The number of epoch was set to 82.
The performance evaluation of the model with manual selection and machine learning based optimization is given in Table 5. It is observed from Table 5 the performance of the model is increased with machine learning based optimization. Hence, this result is used to compare with the other models.

Overall Performance of Proposed Model for Root Rot Disease Identification in Ginseng Plants
The plant regions were initially segmented from the healthy and diseased plant images as shown in Figures 7 and 8, respectively. The time taken for the proposed segmentation method was less than 5 s per image. After segmenting the plant region, the root rot disease identification was performed by transfer learning models and proposed model. Sample plant images that were correctly identified by proposed model are shown in Figures 9 and 10. These figures show that the leaves and roots of the healthy and diseased plants have a major difference in their appearance. It can be observed from these figures that the diseased plants have shorter primary roots, whereas the length of the primary roots in the healthy plants is greater than that in the diseased plants. Furthermore, it can be observed that there are many secondary and tertiary roots in healthy plants, but there are no such roots in the diseased plants. The healthy and root-rot-diseased plants were identified in a promising manner by proposed model. This shows the performance of the proposed model in identifying root rot disease in ginseng plants.  The Figure 11 shows sample images on which proposed model failed. There exist a few asymptotic plants in the dataset. They do not show any symptoms in leaf but infected by the pathogens. The proposed model fails to identify these plants as shown in Figure 12. The times taken for training the transfer learning models and the proposed model are given in Table 6. In order to analyze the improvement in model performance due to plant segmentation, the deep learning models were also tested with raw plant images as input. The performance of the deep learning models is given in Tables 7 and 8.   Tables 7 and 8 show that the deep learning models performed well when the segmented plant images were given as input. It is observed from Table 6 that the proposed model required less training time when compared with a few transfer learning models except Resnet-18 and Squeezenet. Furthermore, the inference time of proposed model is lower than the other models as shown in Table 9. It is observed from Table 10 that the number of parameters of proposed model are less when compared with other models. These show that the proposed model can be practically applicable in a high-throughput system. The proposed model achieved a high precision value of 0.95 and a recall value of 0.82. Additionally, it achieved a high F 1 score of 0.88 and accuracy of 0.89, which are higher than those of the other transfer learning models. These imply that the proposed proposed can accurately predict 89% of diseased plants in the created dataset. Furthermore, the training time and inference time of proposed model are comparatively lower, increasing the practicality of this model. Overall, the proposed model has several advantages in real-time deployment.

Conclusions
In this paper, a new deep learning model was proposed to identify root rot disease in ginseng plants. Initially, the plant regions are segmented using the region growing method, and then the noise in the segmented plant regions is removed. Finally, the rootrot-diseased plants are identified by the proposed model. The performance of proposed model was compared with that of transfer learning models. The proposed model achieved an F 1 score of 0.88 and accuracy of 0.89 in less inference time when compared with the transfer learning models. Overall, the proposed model has several advantages, such as high throughput, cross-platform applicability, and robustness. However, a further improvement in performance is required, as well as the early detection of disease. This can be achieved by using various imaging sensors such as hyperspectral, fluorescence, etc., and corresponding image analysis methods. Additionally, this experiment can be improved by applying various plant stresses along with root rot disease.