RICE DISEASE RECOGNITION USING TRANSFER LEARNING XCEPTION CONVOLUTIONAL NEURAL NETWORK

As one of the major rice producers, Indonesia faces significant challenges related to plant diseases such as blast, brown spot, tugro, leaf smut, and blight. These diseases threaten food security and result in economic losses, underscoring the importance of early detection and management of rice diseases. Convolutional Neural Network (CNN) has proven effective in detecting diseases in rice plants. Specifically, transfer learning with CNN, particularly the Xception model, has the advantage of efficiently extracting automatic features and performing well even with limited datasets. This study aims to develop the Xception model for rice disease recognition based on leaf images. Through the fine-tuning process, the Xception model achieved accuracies, precisions, recalls, and F1-scores of 0.89, 0.90, 0.89, and 0.89, respectively, on a dataset with a total of 320 images. Additionally, the Xception model outperformed VGG16, MobileNetV2, and EfficientNetV2.


INTRODUCTION
World rice production is an integral component in meeting global food needs.Specifically in Indonesia, as one of the main producers of rice, rice production is an important pillar in the agricultural sector.However, disease-related challenges in rice plants can significantly impact productivity.One potentially detrimental disease is blast, which is caused by the fungus Pyricularia oryzae.According to [1], the impact of this disease can cause a significant decline in productivity over the last ten years, even though overall attacks have fluctuated.Other rice diseases that are often found include brown spot, tungro, leaf smut, and blight [2], [3].This will of course, threaten food security, economic losses are also a serious issue, considering that the agricultural sector, especially rice, has a large contribution to the Indonesian economy.So, there is a need for early detection and management of rice diseases so that they can be treated correctly and quickly.
Image recognition technology is increasingly developing, especially with machine learning (ML) and deep learning (DL) methods, and has become a very effective tool in detecting diseases in rice plants.ML methods have been widely used to analyze and classify images of rice leaves to identify signs of disease quickly and accurately.But a feature, shape or color extraction process is needed before carrying out classification.The features that are widely used are Gray level co-occurrence matrices (GLCM) [4]- [7].Meanwhile, ML classifiers used in classification tasks such as K-Nearest Neighbor (KNN), Decision Tree (DT), Random Forest (RF), Naive Bayes (NB), Logistic Regression(LR), backpropagation Artificial Neural Network (BPNN) and Support Vector Machine (SVM) [4]- [6], [8]- [10].However, currently, the role of ML is starting to be replaced by DL, this is proven in research [11], where it is proven that the performance of DL methods, especially CNN, has succeeded in getting much better accuracy compared to ML methods such as KNN, NB, SVM, and BPNN based on accuracy, specificity, recall, and F1-score.
The main advantage of CNN over ML in general, is the ability to automatically extract complex features from images without requiring separate feature extraction from the classifier [12]- [14].This allows a better understanding of the representation hierarchy.Its ability to understand the local context in images provides advantages, especially when applied to plant disease detection.CNNs also have a large learning capacity and transfer learning capabilities improve model performance even with limited datasets [15]- [17].Thus, CNN becomes a more effective and adaptive choice in handling the structural and spatial complexity of image data related to diseases in rice plants.
Transfer learning has advantages that make the CNN method more efficient in the learning process.This is because transfer learning models have been trained on large datasets.Basic feature understanding can continue training on smaller datasets, resulting in good performance even with limited data.This advantage enables efficient and accurate image recognition without requiring a very large training dataset [18]- [20].Various transfer learning models, such as VGG, EfficientNet, MobileNet, DenseNet, and ResNet, have their respective advantages.VGG stands out with its simple and symmetric architecture, making implementation easy.EfficientNet combines computational efficiency with high performance, leveraging overall optimization to achieve good performance with fewer parameters.MobileNet is designed specifically for efficiency on mobile devices, using depthwise separable convolution to reduce computational load.DenseNet builds strong connections between layers, overcoming the information loss of traditional architectures.ResNet uses residual blocks to enable training of very deep networks without performance degradation [18]- [23] Specifically, Xception is an architecture similar to EfficientNet but the model is optimized to achieve high efficiency, providing superior performance especially in transfer learning situations with limited datasets [24]- [27].Based on the literature above, this research aims to develop an Xception model for rice disease recognition based on leaf images, because this model is the right choice because of its ease of implementation, does not require a large dataset, and provides optimal performance.

RESEARCH METHOD
The research method proposed in this study consists of several stages which are illustrated in Figure 1.More details of the research stages are presented in sections 2.1 to 2.6.

Data Collection
This research uses the Rice-leaf-disease (kaggle.com)dataset.This dataset was chosen because of its relatively limited number, where the total number of images is relatively small, namely 320 images, so it is suitable for testing Xception's performance.Figure 2 presents the distribution of images in each class, while image samples in each class are presented in Figure 3. Based on Figure 3, it appears that the data distribution is imbalanced, where brown spot and leaf smut are a minority class.

Preprocessing Image
The image dataset used apparently needs to be normalized, with varying dimensions, so preprocessing is carried out by resizing the image so that the dimensions become 224×224×3 because the image used in this research is an RGB image.

Data Splitting
The classification process is unsupervised learning, so a training and validation process is required.In this study, we used a composition of 80% for training and 20% for validation.

Xception Transfer Learning Model
Xception, derived from "Extreme Inception," is a deep learning model architecture developed by François Chollet in 2017 to improve computational efficiency [24].Its main characteristic is the use of split convolution, which separates the steps of spatial convolution and dimensionality reduction, reducing the number of parameters and increasing efficiency.With a total of 71 layers, Xception is able to understand and extract complex feature representations from image data.Its main advantages are high computational efficiency and image recognition and classification task capability.As a model that has been proven to be effective, Xception is often used in image processing on devices with limited resources.

Fine Tuning Technique
Fine-tuning is the process of adjusting the weights or parameters of a model that has been trained on an external dataset to the target dataset.
Because the number of target classes is five, the last output layer of the model is replaced with a new layer corresponding to the number of target classes.We freeze around 76% or 55 initial layers, so that the training process is more efficient, where the total parameters are 27286350, non-trainable parameters 20861480, and the rest are trained parameters.Input Image, Input layer, and Xception input [(None, 224, 224, 3)], then after entering the Xception function, the output shape becomes [(None, 7, 7, 2048)], for more details, the Xception model is presented in Figure . 4. Additionally, we use several hyperparameters described in Table 1.Based on Table 1, the learning process was carried out for 10 epochs with a batch size of 32.Seed 42 and TensorFlow Seed 768 were used to ensure reproducibility of results.The loss function applied is Categorical Crossentropy with a smoothing label (0.0001), and the optimizer used is Adam with a learning rate of 0.0001.These hyperparameters are adjusted to achieve the desired efficiency and results in fitting the model to the target dataset.validation section, we also present the confusion matrix, recall, precision and F1-Score.
Confusion matrix is a table used to evaluate the performance of a classification model.This matrix compares the model's predicted values with the actual values from the dataset.Consists of four cells: True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN).With the confusion matrix, recall can be calculated to find out the extent to which the model can identify all instances that are actually positive.Equation ( 1) is used to calculate recall.Precision measures the extent to which the model can correctly identify positively predicted instances, which can be calculated by Equation (2).Meanwhile, the F1-score is a combined measure of recall and precision.It is the harmonic mean of the two metrics and gives a better idea of the balance between recall and precision, which is calculated in Equation ( 3).

IMPLEMENTATION AND RESULTS
This research was implemented using the Python programming language and Jupiter Notebook.Some important libraries are Sklearn and Tensor Flow Keras.The resulting experimental results prove that the accuracy obtained reached 0.93 for training and 0.90 for validation, while the training loss was 0.13 and the validation loss was 0.26.This result is very satisfying, considering only a relatively small dataset was used.In more detail, the graph plot is presented in Figure 5.Meanwhile, the confusion matrix validation results are presented in Figure 6, which are further explained in Table 2.  To validate the performance of Xception, we tested several other transfer learning models such as MobileNetV2, EfficientNetV2 and VGG16, a comparison of the results is presented in Figure 7.

DISCUSSION
Based on the results presented in section 3, there is a difference in the accuracy of results between training and validation of around 0.03.This result is relatively small and indicates that the proposed method is relatively not overfitting.Even so, there is a significant difference in the seventh epoch, but in the end, the results avoid overfitting.The Xception model can also produce high accuracy, namely 0.89, which is a satisfactory result.There is a difference between the accuracy calculated using the general method found in Keras and the accuracy calculated from the confusion matrix.This is especially the case when the classes in the dataset are unbalanced.The confusion matrix provides more detailed information about model performance in each class, including True Positives (TP), True Negatives (TN), False Positives (FP), and False Negatives (FN).Therefore, the accuracy calculated from the confusion matrix is more sensitive to class balance and can provide a better picture of model performance in each class.This is also visible in the unbalanced dataset distribution presented in Figure 2.
Considering the imbalance of the dataset, it can be concluded that recall is the measurement tool that is most taken into account.Because recall can identify in imbalanced datasets, especially in the context of disease classification, recall often precedes accuracy and precision.This is because the focus on recall significantly impacts medical contexts and situations where identifying positive cases (diseases) is very important [28].False negatives in disease classification can have serious clinical consequences, such as not detecting a disease that is actually present.
Therefore, reducing false negatives by increasing recall can positively impact disease management.In addition, in imbalanced datasets, accuracy can be unrepresentative because the model can achieve high accuracy by predicting most classes.However, in the end, accuracy and recall are the same in the research.
Comparative testing also proves that the proposed transfer learning method Xception on a relatively small dataset has better performance than other transfer learning such as VGG16, MobileNetV2, and EfficientNetV2.This shows that the proposed method has used the best transfer learning model for this case.

CONCLUSION
In this research, the Xception model in the context of transfer learning was proven to be effective for recognizing diseases in rice plants based on leaf images.By using a relatively small dataset, Xception achieved a training accuracy of 0.93 and a validation accuracy of 0.90, showing satisfactory performance.Comparison results with other transfer learning models such as VGG16, MobileNetV2, and EfficientNetV2 also confirm the superiority of Xception.Model evaluation using metrics such as confusion matrix, recall, precision, and F1-Score provides a more detailed picture of model performance, emphasizing recall for handling imbalanced datasets.Overall, this research supports using the Xception model in effectively and efficiently detecting rice diseases, with potential applications in agricultural management and food safety in Indonesia.

Figure 5 .
Figure 5. Accuracy and Loss Results of the Xception Model

AhmadFigure 7 .
Figure 7.Comparison with other Transfer Learning Models