Optimizing olive disease classification through transfer learning with unmanned aerial vehicle imagery

ABSTRACT


INTRODUCTION
The evolution of agriculture technology has not only played a pivotal role in transforming food production but has also significantly enhanced farming practices, ushering in more efficient methods for planting, harvesting, and managing crops and livestock [1].These technological advances have led to increased yields and improved crop quality, effectively meeting the growing global demand for food while also minimizing the environmental impact of agriculture [2].Key examples of agricultural technology include precision farming, drones, genetic engineering, and smart irrigation systems, empowering farmers to make informed decisions, optimize yields, minimize waste, and conserve natural resources [3].In the context of unmanned aerial vehicle (UAV)-enabled olive disease classification, transfer learning has the potential to revolutionize disease detection.By using pre-trained models on large-scale datasets from related domains, such as general plant pathology or agricultural images, we can exploit the learned features and representations to adapt to the specific olive disease classification task [4].While several studies have explored UAV applications in agriculture [5]- [9], including disease detection, the use of transfer learning specifically for olive disease classification represents a novel approach that can significantly enhance the accuracy and speed of disease identification.This research aims to bridge the gap between traditional disease  ISSN: 2088-8708 Int J Elec & Comp Eng, Vol.14, No. 1, February 2024: 891-903 892 assessment methods and cutting-edge technology, ultimately benefiting olive growers and the agricultural community at large.Amidst these remarkable technological advancements, the field of olive disease classification has emerged as a critical component in identifying and categorizing diseases affecting olive trees.By standardizing disease descriptions and diagnoses, classification systems facilitate effective communication among researchers, extension workers, and farmers [10].Among these systems, the international code of nomenclature for cultivated plants (ICNCP) classifies olive diseases based on affected plant parts and symptoms, while other systems categorize diseases based on their causative agents, including fungal, bacterial, viral, and phytoplasma diseases.Examples of olive diseases include Verticillium wilt, Xylella Fastidiosa, and olive knot.Precise disease management hinges upon accurate diagnosis facilitated by these classification systems, enabling the implementation of targeted strategies such as selecting diseaseresistant cultivars, practicing crop rotation, and employing appropriate fungicides and control measures [11].The continuous expansion of olive cultivation across the Mediterranean region, spanning approximately 750 million hectares, faces significant challenges from various factors, including insects, nematodes, and pathogens.In particular, pathogenic agents and pests pose a substantial threat to olive crop yields in the European Union, exacerbated by factors such as commercialization, climate change, and evolving agricultural practices.Consequently, there is an urgent need for advanced solutions in disease detection and classification to mitigate these adverse effects and safeguard the productivity and sustainability of olive production [12].Recent breakthroughs in computer vision and machine learning have revolutionized disease classification across diverse domains.One particularly promising technique is transfer learning (TL), which harnesses pre-trained deep neural networks (DNNs) to address novel classification tasks with limited data [13].In the context of UAV-enabled olive disease classification, transfer learning presents a transformative opportunity.By leveraging pre-trained models from vast datasets in related domains, such as general plant pathology or agricultural images, transfer learning enables the adaptation of learned features and representations to accurately classify olive diseases.This article aims to capitalize on the synergistic potential between cutting-edge drone technology and transfer learning techniques for smart agriculture development, with a specific focus on olive disease classification.Our research seeks to expand existing knowledge and provide novel insights that will prove invaluable to olive growers and the broader agricultural community [14], [15].The upcoming sections of this article are organized in the following manner: section 2 presents an in-depth exploration of the theoretical background of deep learning (DL), while section 3 reviews recent related works.Section 4 presents an overview of the method and simulation workflow used in our research.Finally, section 5 delves into the experimentation results for olive disease classification, followed by a comprehensive discussion of the contributions and challenges faced.By showcasing the relevance and effectiveness of UAV-enabled olive disease classification based on transfer learning, our research aims to drive more efficient and data-driven smart agriculture practices in the olive industry.

BACKGROUND 2.1. Convolutional neuronal network
CNN is an abbreviation for convolutional neural network, a deep learning algorithm widely employed for image classification and object recognition.CNNs are designed to handle image-based data and are particularly effective for image classification problems.They draw inspiration from the structure and function of the visual cortex in the human brain and are comprised of multiple layers of artificial neurons that learn to identify patterns in images.CNNs have found applications in diverse fields, such as computer vision, natural language processing, and speech recognition [16].

Transfer learning
Transfer learning (or learning by transfer) allows deep learning to be performed without the need for a month of computations.The idea is to leverage the information gained by a neural network while solving one issue to solve another that is similar but not identical.As a result, knowledge is transferred.Also, transfer learning prevents overfitting while also speeding up network training.When the number of input photos is minimal, a strong recommendation is to avoid training the neural network from scratch (i.e., with random initialization) due to the considerably larger number of parameters to learn compared to the number of images.This approach carries a high risk of overfitting [17].

Unmanned aerial systems for agriculture
Unmanned aerial systems (UAS), commonly referred to as drones, have revolutionized the way agriculture is conducted.These systems have made it possible to monitor crops and livestock with great precision and efficiency.UAS can capture aerial images and data, providing farmers with valuable information on crop health, soil moisture, and nutrient levels.Utilizing this information enables informed 893 decisions on crop management, such as fertilization and irrigation, leading to increased productivity and reduced costs.Moreover, UAS can rapidly cover extensive areas, making it possible to identify potential issues early on and take corrective action before they escalate [18].

RELATED WORKS 3.1. Techniques for plant diseases classification based on deep learning
Research works in the field of olive disease classification is very limited in number, hence the integration of plant disease classification review in general and olive in particular.First, Bi et al. [19] design a system that can identify apples are classified according to their color and distinct specular reflection patterns.Additional information like average apple size is used to weed out incorrect results or to account for many apples growing areas.Second, Prasetyo et al. [20] employed the ResNet-9 architecture to construct an optimal CNN model for classifying corn plant diseases.They conducted comparisons across various epochs to determine the best model, with the highest accuracy achieved at the 100 th epoch.Moreover, Singh et al. [21] present an extensive study on the plant village dataset, whose images were collected using a formalized process, with highly perfect post-processing background development results, when the images were acquired under real conditions.It is also necessary to mention the work of Jadon [22] that explain the difficulty of learning and performance on relatively small volumes of data.This is an important parameter affecting the quality of the results achieved through the contribution of this study.In the same way, Tassis et al. [23] considered a dataset consisting of several plant types with different sample size characteristics.This is used to challenge the performance of CNNs under various conditions.Deep learning networks composed of different dataset sizes allow for enhanced comprehension of the advantages and limitations of these types of networks.Also noteworthy is the relevant work of Long et al. [24] that review methods developed for inductive transfer learning using convolutional networks.In addition, inductive transfer learning was then studied by Li et al. [25], where they describe the notion of regularization and tuning parameters to improve the performance of the target model.The mentioned research articles in Table 1 focus on developing deep learning models for the detection and classification of olive tree diseases using deep learning techniques.Alshammari et al. [3] proposed a method based on both the vision transformer (ViT) and CNN models for olive disease classification.They achieved high accuracy in detecting multiple types of diseases.In another study by Alshammari et al. [12], an optimized deep learning approach winged optimized artificial neural network (WOA-ANN) was developed for the identification of olive leaf diseases.The proposed method used a transfer learning technique and achieved higher accuracy than previous studies.Also, Ksibi et al. [26] proposed a hybrid deep learning model called mobile residual neural network (MobiRes-Net) for detecting and classifying olive leaf diseases.Their model combined the advantages of MobileNet and ResNet architectures and achieved high accuracy in detecting multiple types of diseases.In addition, Uğuz and Uysal [10] developed a deep convolutional neural network based on visual geometry group (VGG) for classifying olive leaf diseases.Their model achieved high accuracy in identifying four types of diseases.Uğuz [27] proposed an automatic olive peacock spot disease recognition system using a single shot detector (SSD) method.The proposed method achieved high accuracy in detecting this disease.On the same direction [28] developed an efficient model for olive disease detection.They used transfer learning and achieved high accuracy in detecting three types of diseases.Finally, Milicevic et al. [29] developed deep learning models designed to identify the flowering phenophase in olive trees.They achieved high accuracy in detecting the flowering phenophase, which can be used for predicting fruit yield.Collectively, these studies showcase the potential of deep learning models in accurately detecting and classifying olive tree diseases, which can help in the early detection and management of these diseases to improve crop yield and reduce economic losses.

Techniques for plant diseases classification based on UAV imagery
This section focuses on classification studies that utilize unmanned aerial vehicle (UAV) imagery to detect olive tree diseases, which have been relatively scarce in the literature.The studies cited in explore the applications of UAVs and multispectral imagery in olive tree cultivation.The papers present various findings, including the use of different algorithms for classification, the incorporation of ground truth data, and the use of different spectral bands for disease detection.Overall, the studies demonstrate the potential of UAV-based classification techniques for detecting olive tree diseases and improving agricultural management practices.First, Šiljeg et al. [5] used geographic object-based image analysis with randomized truncated cluster (GEOBIA RTC) and vegetation indices to extract olive tree canopies from very high-resolution UAV multispectral imagery.They achieved high accuracy in detecting olive trees, and their approach can potentially be used for precision agriculture and monitoring of olive trees.Then in [6] developed a residual neural network (ResNet50) for classifying olive tree cases based on UAV imagery.Their model achieved high accuracy and can potentially be used for monitoring the growth and health of olive trees.After that, Nisio et al. [7] follow an approach using latent Dirichlet allocation (LDA) on all the available spectral information.The performance in classification was excellent, achieving a sensitivity of 98% and precision of 100% on a test set that comprises 71 trees, 75% of which were afflicted.Also, Jurado [30] used multispectral mapping to characterize individual olive trees.Their approach can potentially be used for precision agriculture, monitoring tree growth and health, and optimizing orchard management.In addition, Rallo et al. [31] explored the use of UAV imagery to support genotype selection in olive breeding programs.They found that UAV imagery can potentially provide valuable information for selecting superior olive genotypes based on traits such as canopy volume and shape.Castrignanò et al. [8] used UAV multiresolution image segmentation with mask regions with convolutional neural networks (Mask R-CNN) to estimate olive tree biovolume.Safonova et al. [9] devised a rapid detection technique to identify Xylella Fastidiosa-infected olive trees using multispectral imaging from UAVs.Their method holds promise for early detection and continuous monitoring of this detrimental plant pathogen in olive trees.Additionally, Neupane and Baysal-Gurel [32] introduced a semi-automatic approach for the early detection of Xylella Fastidiosa in olive trees, leveraging UAV multispectral imagery and geostatistical-discriminant analysis.Their approach achieved high accuracy in detecting Xylella Fastidiosa-infected trees.

METHOD 4.1. Drone description
In Figure 1, we are presented with a striking image of a drone, thoughtfully equipped with an impressive array of sensors.Among these sensors, the forward-facing and downward-facing ones hold particular significance, serving as crucial components for the Mavic Pro sophisticated obstacle detection and avoidance capabilities.Proudly manufactured by DJI, the Mavic 2 Pro takes center stage as a top-of-the-line UAV.With its state-of-the-art technology and cutting-edge features, the Mavic 2 Pro unquestionably ranks among the most advanced and coveted drones available in the market today [32].

Simulation workflow
The simulation architecture employed in our study encompasses a well-structured series of tasks crucial for image classification techniques, as illustrated in the schematic diagram presented in Figure 2. Initially, meticulous attention is given to adjusting the flight plan of the UAV to ensure precise and comprehensive image capture of the olive trees within the study area, yielding high-quality data for analysis.Subsequently, the data collection phase commences, wherein the UAV carries out image acquisition, capturing multispectral images of the olive trees from different perspectives.To prepare the collected data for classification, thorough preprocessing steps are undertaken to eliminate any unwanted noise or artifacts that might impede the accuracy of the classification process.The subsequent steps revolve around selecting suitable classifiers and feature extraction methods that can effectively and accurately identify and classify the various olive tree diseases present in the collected images.Diverse training modes are thoughtfully chosen to optimize the selected classifiers' performance, empowering the model to deliver precise disease classification results.Moreover, an optimization algorithm is applied to further enhance the classification model's accuracy.To refine and fine-tune the classification results, comprehensive post-classification processing is conducted, aiming to ensure the highest level of accuracy and reliability in disease identification.The

Study area
The study area highlighted in Figure 3 is the olive groves in the Béni Mellal-Khénifra region, which is situated in the central part of the country and covers an area of 17,125 square kilometers.This region is characterized by a very continental climate with an average altitude of 400 to 700 meters and precipitation that ranges from 300 to 750 mm, varying on the year.The main activity in the region is agriculture, which accounts for 81% of the active rural population in 2008 and has a profound effect on the regional economy, especially in the plains (Tadla) that have abundant water resources suitable for modern and industrial agriculture development.The region's suitability for olive cultivation is based on favorable climatic and geological conditions, as well as expertise in olive oil production, while the number of olive varieties present is an additional factor, but not the sole justification [33].

Drone flight
Planning drone flight planning is an essential process that involves preparing for and executing a safe and efficient drone flight.This process includes several steps, such as researching the flight area, checking local regulations and restrictions, obtaining necessary permits, ensuring the drone is in good working condition, choosing a safe and efficient flight path, checking the weather conditions, inspecting the drone before flight, establishing communication with individuals in the area, flying the drone following the planned route, monitoring the drone's flight status, and evaluating the flight after completion.Once the flight plan is set as presented in Figure 4, the Mavic Pro 2 will take off and follow the set plan.During the flight, adjustments can be made if necessary, using the DJI GO 4 app.Upon completion, the drone will automatically return to its starting point and land.897 fruit, leaves, or bark, such as anthracnose, fumigina, or knot, at a low altitude.The second stage involved collecting images of trees with symptoms on their foliage, such as verticilliose, at a higher altitude using downward vision and infrared sensors.The drone flight was conducted on a clear, windless day, and the flight height was set at 20 m with a 70% overlapping rate for the photos taken.To allow the MobileNettransfer learning model to efficiently learn the olive spectral features of tree diseases in visible images, the olive images were manually annotated.

Data preprocessing
First, the data pre-processing task starts with a span of data points.Second, implement a data split, 80% for training and 20% for validating.Then, the data augmentation method was applied to improve the distribution of pixels at various intensities.In complement, low spatial resolution UAV images frequently have low contrast, poor texture, and minimal edge information.So many critical traits are typically lost after a sequence of convolution and amplification procedures.To address these challenges, the authors propose an image reconstruction technique.The method serves to improve the spatial resolution of UAV olive imagery, resulting in clearer edge contours, best contrast, and enhanced textures to better preserve canopy edge information.

Data augmentation
The issue of overfitting during the training process phase of CNN can be overcome.Different data augmentation techniques are used in this step, including transformations like rotating, flips and intensity perturbations.In addition, Gaussian noise processing operations are also used.So, the data enrichment process is done through fine-tuning.By generating additional data through data augmentation as presented in Figure 5 with imbalanced dataset distribution in Figure 5(a) and balanced dataset distribution in Figure 5(b), the model is exposed to more variations in the data.Implementing this can aid in mitigating overfitting, a situation where the model becomes overly adapted to the training data and exhibits poor performance on unseen data.In an imbalanced dataset, the minority classes may be underrepresented, and the classifier may tend to predict the majority class more often, resulting in poor performance for the minority classes.To overcome this issue, several techniques can be used, such as resampling the data to balance the classes, using different methods to class imbalance, or modifying the learning algorithm to give more weight to the minority class.In this case study after applying data augmentation techniques, the dataset became balanced with 2,000 images per class, resulting in a total of 14,000 images.Accuracy and training loss per training period are shown below.As we are dealing with hundreds of thousands of observations, it is not uncommon to see a neural network model converge rapidly.In this case, the batches contain 64 observations.In each era, the model will be exposed to more than 5,000 different lots.Few epochs can be enough to lead to high accuracy and low levels of loss from the start of the training session.In this exercise, 10 epochs were planned, as the authors were interested in studying potential overfitting.In a final implementation, a shorter formation is considered and shown in Figure 6 with training loss in Figure 6 For anthracnose, the MobileNet-TL model achieved the highest accuracy and lowest loss, while the EfficientNetB7 model performed the worst.For cyclonium, the MobileNet-TL and DenseNet models achieved the optimal accuracy and loss, while the EfficientNetB7 model performed the worst.For fumigina and verticilliose, the MobileNet-TL model again achieved the optimal accuracy and loss, while the ResNet50 model performed the worst.As a reminder, the columns in the confusion matrices correspond to the predicted classes, whereas the rows relate to the actual classes.Figure 6 shows the performance results for various CNN architectures with training loss in Figure 6(a), training accuracy in Figure 6(b), validation loss in Figure 6(c) and validation accuracy in Figure 6(d).The included CNN architectures are ConvNet, EfficientNetb7, InceptionV3, MobileNet, DenseNet, VGG19, ResNet50 and VGG16.Also, Figure 7 shows the confusion matrix, which provides actual and predicted values for each class of olive diseases, respectively: healthy, anthracnose, cyclonium (OP), fumigina, verticiliose, knot, and saisetea oleae.In classification problems, the model's overall performance can be assessed through various metrics.Along with the traditional calculation of statistical performance measures directly from "predicted" and "actual" test tensors.In addition, confusion matrices provide a visual and quantitative assessment of model performance on both an aggregate and "per-class" basis.So, the performances are evaluated here with statistical metrics and confusion matrices for the MobileNet-TL model.The compared result between classes illustrated in the confusion matrix presented in  7 show that some classes present better results than the ones in example class 1, 2, 4 and 5 are best suited for using transfer learning than 3,6 and 7.This will be discussed in the next section to get more explanations.

Figure 7. Confusion matrix of ODD classification for MobileNet-TL
The ROC curve presented in Figure 8 depicts the performance of the MobileNet-TL model in detecting anthracnose disease, which is just one of the seven classes studied.The results clearly indicate that the MobileNet-TL model demonstrated superior accuracy compared to the other models.However, a more detailed analysis and explanation of the findings will be provided in the subsequent discussion section.

Discussion
The findings of this research, focusing on deep learning and the classification of different olive diseases using drone-collected images, are highly noteworthy, particularly from the perspective of data science education.The results confirm that the combination of CNN and transfer learning methods yields highly accurate remote detection and classification of olive diseases.The importance of data pre-processing is emphasized, as it significantly influences the results.Furthermore, the study demonstrates the effectiveness of transfer learning, although the selection of an appropriate number of trees and depth parameters can have a notable impact on the results.The authors experimented with lower tree counts and shallow depth architectures, which led to some degradation in performance, as anticipated.Nevertheless, when appropriately manipulated, transfer learning proves to be an excellent predictive tool, with performance on par with more complex and sophisticated algorithms.In addition, The MobileNet-transfer learningbased model outperformed CNN alone, as evident from the confusion matrices.This highlights the importance of selecting the right architecture and hyperparameters.Some potential improvements, such as handling asymmetric features, cross-validation, and hyperparameter optimization, were left unexplored but may be revisited in future research to further enhance performance.The primary aim of this research is to initiate a series of research endeavors geared towards enhancing drone utilization and democratizing drone technology for small and medium-sized olive farms.Upon analyzing the confusion matrices, specific patterns emerge, notably a higher level of confusion between classes 3 and 6, indicating a substantial number of incorrect predictions.Moreover, the overall accuracies by crop class remained consistently high, surpassing 97%, except for "class 7," which exhibited relatively lower accuracies due to its limited representation in the dataset.Remarkably, deep learning demonstrated superior performance compared to other methods in predicting broadleaf classes, underscoring its effectiveness in addressing challenges related to poorly represented classes.These findings hold significant implications for the future development and application of UAV-enabled olive disease classification systems.Transfer learning, involving the use of a pre-trained model on a large dataset as a starting point for a new task or dataset, is a valuable technique.In the context of mobile architecture, transfer learning enhances model accuracy by leveraging knowledge gained from pre-training on a large dataset.Two common approaches to transfer learning with mobile architecture are using the pre-trained model as a feature extractor and finetuning the model.The former extracts feature from input data using the pre-trained model, which are then fed into a smaller model trained specifically for the task.The latter approach fine-tunes the pre-trained model's weights on the specific task, allowing it to adapt its learned features further.The research results obtained from UAV imagery, as outlined in the results section, outperform similar and related works in terms of accuracy, enhancing the contribution of transfer learning in the case study of multi-spectral images of olive trees.The achieved average accuracy of 99% for the seven studied classes demonstrates the potential for improving and optimizing olive crop production.

CONCLUSION AND FUTURE SCOPE
In conclusion, the authors try to address the classification problem of olive diseases, based on transfer learning techniques and UAV imagery, in order to cover larger areas of olive cultivation and more disease types.The data collected in this study were aerial and lateral images of olive trees acquired via cameras in low and high-altitude drone flight, in the study area of Béni Mellal-Khénifra region of Morocco at different growth stages on the base of seven classes, six of them sick and the seventh healthy.The purpose of the study was to identify the olive disease classes with minimum of cost and maximum of efficiency and precision.The proposed MobileNet-TL model based on CNN architecture and transfer learning methods obtained an accuracy of 99% overcoming the limitations of random sampling methods, overfitting, and capabilities to deploy the application on mobile devices, also the results is higher than similar research works presented previously, in terms of accuracy, data volume and types of diseases.To expand this work in the future, it is recommended to design an integrated intelligent smart agriculture system based on microservices architecture using UAV classification service combined with smart irrigation service, the aim will be to adapt the classification system to different environmental variables in order to improve the learning capacities of the AI system applied to olive crop and more particularly to the early detection and classification of olive tree diseases.

Int
Optimizing olive disease classification through transfer learning with unmanned aerial … (El Mehdi Raouhi) Int J Elec & Comp Eng ISSN: 2088-8708  Optimizing olive disease classification through transfer learning with unmanned aerial … (El Mehdi Raouhi)895 performance of the model is meticulously evaluated using a range of essential metrics providing comprehensive insights into the model's efficacy.Overall, this simulation architecture is meticulously designed to ensure the accurate and efficient classification of olive tree diseases, leveraging the cutting-edge combination of UAV-based image acquisition and deep learning techniques.The seamless integration of these components empowers our study to unlock novel and invaluable insights into disease detection and management, paving the way for sustainable and optimized olive crop production.

Figure 1 .Figure 2 .
Figure 1.MAVIC 2 PRO drone and sensor deployed for this research

Figure 5 . 4 . 8 .
Figure 5. Olive diseases dataset distribution (a) before data augmentation and (b) after data augmentation (a), training accuracy in Figure 6(b), validation loss in Figure 6(c) and validation accuracy in Figure 6(d).Also, the Table shows the performance of several convolutional neural network models trained to classify five different classes of olive diseases: healthy, anthracnose, cyclonium, fumigina, and verticilliose.The following metrics are provided for each model: training accuracy, loss and validation accuracy, loss.The training loss measures the error of the model during training, while the validation loss measures the error on a separate validation set.The training accuracy and validation accuracy measure the percentage of correctly classified samples during training and on the validation set, respectively.Based on the table, the performance of the models varies significantly across the different disease classes.For the healthy class, all models achieved high accuracy and low loss on both training and validation sets.The MobileNet-TL model achieved perfect training accuracy on this class.For the other classes, the performance of the models varied.

Figure 6 .
Figure 6.Accuracy and Loss by CNN architectures (a) training loss, (b) training accuracy, (c) validation loss, and (d) validation accuracy


Figure7show that some classes present better results than the ones in example class 1, 2, 4 and 5 are best suited for using transfer learning than 3,6 and 7.This will be discussed in the next section to get more explanations.

Figure 8 .
Figure 8. Receiver operator characteristic (ROC) curve by anthracnose disease class

Table 1 .
Comparison of performance on olive diseases classification systems

Table 2 .
Comparison of performance on drone-based similar classification systems

Table 3 .
The performance evaluation outcomes of CNN models based on the utilized olive disease classes