On Using Artiﬁcial Intelligence and the Internet of Things for Crop Disease Detection: A Contemporary Survey

: The agricultural sector remains a key contributor to the Moroccan economy, representing about 15% of gross domestic product (GDP). Disease attacks are constant threats to agriculture and cause heavy losses in the country’s economy. Therefore, early detection can mitigate the severity of diseases and protect crops. However, manual disease identiﬁcation is both time-consuming and error prone, and requires a thorough knowledge of plant pathogens. Instead, automated methods save both time and effort. This paper presents a contemporary overview of research undertaken over the past decade in the ﬁeld of disease identiﬁcation of different crops using machine learning, deep learning, image processing techniques, the Internet of Things, and hyperspectral image analysis. Additionally, a comparative study of several techniques applied to crop disease detection was carried out. Furthermore, this paper discusses the different challenges to be overcome and possible solutions. Then, several suggestions to address these challenges are provided. Finally, this research provides a future perspective that promises to be a highly useful and valuable resource for researchers working in the ﬁeld of crop disease detection.


Introduction
Agriculture is the mainstay of many countries. Due to population growth, the demand for food is steadily increasing. To satisfy this pressing need, it is necessary to increase agricultural productivity and protect crops. Nevertheless, crops are highly prone to different diseases due to a large number of pathogens present in their environment. Some of these disease pathogens are virus organisms, whereas others are fungal or bacterial [1]. Crop diseases can reduce productivity by 10% to 95% [2], resulting in a significant decrease in the quantity and quality of agricultural production. Therefore, early identification of diseases is crucial to avoid huge losses and reduce the excessive use of pesticides, which can harm human health and the environment. In most cases, and especially in developing countries and small farms, farmers identify crop diseases with the naked eye based on visual symptoms. This is a tedious task that requires expertise in plant pathology and excessive treatment time [3]. Moreover, if the field is attacked by a rare disease, farmers seek expert advice to obtain an accurate and efficient diagnosis, which obviously generates additional treatment costs [4]. Thus, this method of visual observation is not practical and feasible for large farms and may even yield erroneous predictions due to biased decisions [5]. The restrictions of the traditional approach have motivated researchers to develop technological proposals for the early identification of crop diseases in an accurate, fast, and reliable manner, and in order to meet the increasing demands of consumers and alleviate the environmental impact of chemical inputs on the environment and health. In this regard, several methods [6][7][8][9] have been proposed to automate the process of disease detection. These methods for automatic recognition of crop diseases are divided into two groups, direct and indirect methods [10].

Background
Manual identification of crop diseases is both fastidious and inaccurate, meaning it is only feasible in small farms [5]. In contrast, automatic disease detection is significantly more accurate and takes less time and labor [18]. As a result, numerous studies [19][20][21][22] have been conducted and are discussed in detail below. This section provides a review of different techniques applied in the identification of crop diseases, presents the taxonomy of various crop diseases, and describes the concept of image processing and machine learning. It also demonstrates the application of hyperspectral imagery, the Internet of Things, and deep and transfer learning in the field of disease recognition.

Taxonomy of Crop Diseases and Their Symptoms
The leaves of crops are highly prone to diseases, which are a natural phenomenon [23]. However, if corrective measures are not taken at the right time to stop the spread of the disease, it leads to a significant reduction in the quality and quantity of agricultural products [24]. Crops are affected by various pathogens [1] such as viruses, bacteria, fungi, and deficiencies. Thus, the pathogens responsible for the disease are classified into two categories [25]: autotrophs, which thrive on living tissue, or saprophytes, which dwell on dead tissue. The symptoms of the disease adversely affect the development and growth of crops and are easily visible. Leaf discoloration is the first symptom of disease in plants. In addition, the shape and texture of the leaves are highly useful in detecting various diseases. Therefore, different diseases, such as mildew, rust, and powdery mildew, can be detected by processing images of the leaves [26,27].
The following is a brief description of the three common types of plant diseases [28] that are illustrated in Figure 1 and described in Table 1: • Virus diseases [1]: Among all plant diseases, those caused by infection are difficult to identify and diagnose; moreover, these symptoms are mistaken for signs of nutritional deficiency or injury, as there is no preconceived indicator that can be constantly monitored. Whiteflies, leafhoppers, aphids, and cucumber crawling insects are regular carriers of virus diseases. • Fungal diseases [1]: Foliar diseases are caused by a fungus, such as downy mildew, anthracnose, and powdery mildew. It initially appears on old lower leaves, which have gray-green spots or are soaked in water. As the parasite matures, these spots darken and cause fungus to grow on them. • Bacterial diseases [1]: Pathogens cause serious diseases in vegetables. They do not directly enter the vegetation, but rather through injuries or apertures in the crop. Crop injuries result from various pathogens, insects, and agricultural implements during tasks such as picking and pruning.

Application of Machine Learning and Image Processing in Disease Identification
Foliar images are an excellent and rich source of data on plant pathology and morphological behavior; thus, these data must be thoroughly extracted and analyzed. Image processing plays [28] a crucial role in the diagnosis and analysis of leaf diseases. The procedure adopted in this leaf disease identification process is illustrated in Figure 2, showing an insight into the different techniques employed by the authors to detect the disease by means of image processing and artificial intelligence. The primary step [29] in identifying diseases is the acquisition of images. In most cases, images can be fetched either from a digital camera or an imaging system. As raw images tend to contain noise, removing these impurities is required. As a result, the second step is known as image pre-processing, and involves the removal of unwanted distortions, in addition to contrast enhancement, to clarify and brighten the image features. For example, a Gaussian function that creates soft blur is commonly used to lessen the noise in the image. Subsequently, image segmentation [30] is the third step in which the image is segmented from its background, whereas the region of interest (ROI) is partitioned to emphasize the prominent features. The fourth step is feature extraction [31], which unveils the information and details of an image. As a side note, the leaf features usually include shape, texture, and color, which are used to diagnose the crop. Thus, these chosen features form an input feature vector which is then fed into the classifier. Using this vector, it is possible to discriminate one class of objects from another. The final step is classification [32]. Note that the choice of a suitable classifier depends on the specific problem. The classifier's aim is to recognize the images by sorting them into several predefined classes based on the resulting feature vector obtained in the fourth step. For this purpose, the classification task contains two phases, namely, training and testing. The training operation trains the classifier on a training dataset; thus, the greater the number of training sets, the better the accuracy obtained. It should be noted that the result, which is the crop's healthy state or diseased state associated with the species name, must be achieved as swiftly as possible.

Application of Deep and Transfer Learning in Disease Recognition
Over the past decade, deep learning [33][34][35] and transfer learning [19,36] applications in agriculture have gained widespread success and yielded highly promising outcomes due to their capability to reliably learn and discern visual features. Numerous intriguing stud-ies [33,35,[37][38][39][40] have been published on the employment of these promising approaches for identifying diseases. Of particular note, the use of transfer learning is a trend that is becoming increasingly popular and is widely used by researchers [41,42]. Furthermore, transfer learning is not a sole technique, but rather a set of fine-tuned techniques, which enables the development of highly accurate models on a more restrictive specialized dataset, such as those for plant diseases. Mohanty et al. [43] showed that the fine-tuning approach is far better than a CNN model that is trained from scratch. Another model is the Neural Network (NN), which is broadly employed and recommended to analyze hyperspectral data for the premature detection of diseases. Its basic mechanism was inspired by the human nervous system, and it possesses specific capabilities such as learning and generalization that aid in crop disease diagnosis. In contrast to other machine learning methods, it has a more accurate diagnostic capability because it is better able to combine training sets. Another similar comparative study was undertaken by Zhu et al. [44], wherein back-propagation neural networks (BPNNs) were tested with the support vector machine (SVM), random forest (RF), latent Dirichlet allocation (LDA), extreme learning machine (ELM), LS-SVM, and partial least squares discrimination analysis (PLS-DA) for pre-symptomatic detection and classification of tobacco mosaic virus (TMV) disease with the use of hyperspectral imaging. Similarly, Zhu et al. [45] studied the feasibility of hyperspectral imaging as a non-invasive technique for early detection of TMV disease with machine learning classifiers and the variable selection technique. The results revealed that the back-propagation neural network model (BPNN) achieved 95% accuracy, whereas the chemometric models achieved an accuracy of 80%. It is worth mentioning that it is possible to implement pattern identification methods such as the random forest and support vector machine by utilizing a new pattern recognition technique, named the Artificial Intelligent Nose. Cui et al. [46] provided a review of different invasive and non-invasive techniques, including their advantages and drawbacks, in which the authors noted that the smart nose is a non-invasive and fast method for plant disease diagnosis. In essence, neural networks ensure the highest quality and unaltered spectral information for hyperspectral data analysis. The most well-known study of the ANN spawned the concept of deep learning, which has recently become popular in farming applications. Deep learning has received increasing and widespread interest from many researchers, particularly since 2018, as shown in Table 2. Researchers have made remarkable progress in crop image classification; some of the most typical and representative models are the convolutional neural network (CNN), auto-encoder (AE) recurrent neural network (RNN), and restricted Boltzmann machine (RBM). Many fascinating studies have been published on deep learning for crop disease classification and detection. Among these works, that of Ma et al. [47] presented a deep convolutional neural network (DCNN) model able to detect over four types of cucumber disease. In a comparison with other traditional methods, such as the support vector machine, naive Bayes, and AlexNet, the DCNN was capable of identifying the different cucumber diseases with very high accuracy of up to 93.41%. Similarly, Tran et al. [48] offered a monitoring system for tomato growth and to maximize tomato yield. This system was able to classify nutritional deficiencies and diseases during growth. Thus, agricultural experts evaluate the symptoms based on the results to protect tomato crops. In a similar manner, to effectively monitor apple tree growth at each stage and estimate the yield, Tian et al. [49] deployed a dense YOLOV3 model that utilizes techniques for data augmentation to prevent overfitting. Their approach was found to be valid and applicable to apple orchards, although their study included wavy lights, interlaced fruit, and complex backgrounds.

Hyperspectral Imaging Applied to Disease Recognition
The hyperspectral imagery method has been strongly developed during the past two decades [51], and used to identify abiotic and biotic stresses in cultivated plants [52]. Hyperspectral imaging is a technique combining spectroscopy and imagery, making it possible to simultaneously obtain the spatial and spectral information of an object. Disease infection causes changes in plant biochemical and biophysical properties, such as transpiration rate, tissue structure, water, and pigment content. These changes can then alter plant spectral properties, intercellular space, and water content [53]. However, the hyperspectral system is able to capture these spectral features. Zhu et al. [44,45] conducted a similar study to detect TSWV infection growth in tobacco, in which the authors reported that hyperspectral reflectance was gathered in the visible and near-infrared range to distinguish between healthy and infected TSWV tobacco leaves using statistical analysis methods. Primarily, the TSWV presence was identified at 14 DPI. Moreover, Zhu et al. [45] demonstrated that hyperspectral imaging is able to detect the tobacco mosaic virus (TMV) infection before showing any symptoms, while utilizing SPA for the selection of the effective EW wavelength and, most significantly, for identifying various diseases. Due to the huge number of spectral values that are highly correlated in the hyperspectral dataset, high dimensionality and multi-collinearity frequently appear in hyperspectral data [54,55]. Accordingly, the selection of EWs is crucial for hyperspectral analysis in order to lessen the computational complexity, increase the efficiency of using hyperspectral data, and reduce the computational complexity. Thus, to address this multi-collinearity issue, a variety of approaches and methods have been presented, such as the successive projection algorithm (SPA) [45,56], partial least squares regression (PLSR) models [54] and genetic algorithms (GAs).

Application of IoT in the Field of Leaf Disease Recognition
The Internet of Things (IoT) has improved agricultural capabilities. IoT applications can help farmers at any time during their farming activities and keep them updated with the latest crop and weather information to remotely monitor their fields. By means of IoT applications [57][58][59], farmers can make plans for the next season's harvest. Furthermore, they can detect crop diseases at an early stage to curb the spread of disease and save their yield. Agricultural IoT apps clearly play a major role in increasing agricultural production and decreasing crop losses due to diseases. In this context, a large amount of research has been conducted to identify diseases, as shown in Table 3. Truong et al. [60] devised an IoT-based system made up of various devices that is able to deliver real-time environmental information and send it to the cloud to be stored. These environmental data are processed and scrutinized to predict weather conditions by means of the SVM algorithm deployed in the cloud in order to detect crop fungal diseases. In addition, better results have been achieved when the Internet of Things and image processing have been combined and implemented in the area of disease recognition. Krishna et al. [58] implemented an IoT system featuring SMS alerts that enables automatic disease detection and pesticide spraying using the NodeMCU.

Comparison of Various Crop Disease Detection Techniques
The primary objective of this section is to provide an overview of research carried out during the past decade for identifying crop diseases. Table 4 provides an outline of several methodologies adopted by researchers in the field of crop disease using machine learning, image processing, the Internet of Things, transfer learning, and deep learning techniques. It also indicates the limitations and gaps that need to be filled to help develop an automatic, efficient, accurate, and faster system in the future. Thus, in the conducted research, the authors conclude that deep learning provides accurate and highly promising results compared to other classification and detection methods. Additionally, the use of preprocessing techniques significantly improves segmentation accuracy. The k-means algorithm is the most widely and commonly used technique [29,58,[61][62][63] for segmenting diseased leaves and classifying crop diseases. In practice, no generalizable algorithm is able to solve all issues, so choosing a suitable learning algorithm for a specific problem is a crucial step for the model efficiency. Note that the extracted texture features are the most relevant and most useful for representing the disease-affected regions in the images, which are then employed to train the support vector machine (SVM) and neural network (NN) classifier. It is further emphasized that these texture features are arithmetical parameters that are automatically calculated by means of the gray level co-occurrence matrix (GLCM) [64,65], as stated below:

1.
ASM: The second angular momentum that stands for the total sum of squares in the GLCM.

2.
Contrast: Denotes the sum of the difference in local intensity, where i = j. 3.
Entropy: The quantity of image information necessary for the compression.

4.
Correlation: Refers to the linear dependence of the adjacent pixels' gray levels.
where P i,j is the i, j component of the GLCM normalized symmetric matrix and N denotes the number of gray levels. σ 2 is the intensity variation of all pixels as given below: Moreover, the average of GLCM is µ given by:

5.
Homogeneity feature: Represents the homogeneity of the voxel pairs of the gray level, and is equal to 1 for a diagonal GLCM.
Ultimately, the models for identifying and classifying crop diseases were evaluated by means of various metrics, which were specific to the model used in each study, such as sensitivity, precision (P), recall (R), quality measure (QM), and F1-score. The statistical evaluation measures used to analyze the quantitative performance of crop disease detection models with deep and transfer learning can be calculated as follows: where Precision (P) is the fraction of true positives (TP) to the total amount of relevant results, that is, the sum of TP and false positives (FP). For multi-class classification problems, P is averaged across the classes.
Sensitivity/Recall (R) is the fraction of TP to the total amount of TP and false negatives (FN). For multi-class classification problems, R obtains the average of all classes.
Specificity is the proportion of true negative (TN) samples to all healthy samples (true negatives and false positives). This measure is utilized to evaluate the performance of a proposed model in forecasting true negatives.
Accuracy is the proportion of correctly classified samples to the total number of classified samples. This measure is employed to assess the overall performance of a suggested model.
F1-score is the harmonic average of both precision and recall. For multi-class classification problems, F1 is averaged across all classes, where: TP: represents the number of true positive image samples that are perfectly identified as infected. FP: is the number of false-positive image samples that are incorrectly classified as infected. TN: is the number of true-negative image samples that are correctly classified as healthy. FN: is the number of false-negative image samples that are incorrectly identified as uninfected.
As revealed in the previous studies [66], it was found that accuracy was the most widely adopted metric; it was widely used in 72% of the articles reviewed, followed by the confusion matrix, then precision, recall, and the F1 measures. Some research has examined the root mean square error (RMSE), mean absolute error, R-squared, and mean squared error (MSE), among others. The authors note that it is difficult, if not impossible, to make a comparison across papers because different metrics were used for different tasks, different models, datasets, and parameters; in addition, different crops and diseases were analyzed under different conditions. Furthermore, it is very important to examine whether the researchers tested their implementation on an identical dataset (e.g., by splitting the dataset into training and validation sets), or whether they used different datasets to test their solution. This research paper provides a DL-based method for detecting tomato disease that uses the C-GAN to generate the synthetic images of tomato leaves for data augmentation purposes. Then, a pre-trained DenseNet121 model is fine-tuned on synthetic and real images to classify tomato leaves images into ten disease categories. - The proposed method reached an accuracy of up to 99.51%, 98.65% and 97.11% in classifying tomato leaf images to the categories of 5, 7 and 10, respectively. It is shown that this method outperforms the current methodologies. - The C-GAN prevents overfitting and enhances the network generalization -The tomato disease detection was executed on the leaves, but other plant areas such as stems, and branches must be highly involved. - The study was only done on tomato plant disease. The model is capable of automatically extracting the features of five common disease spots from apple leaves.

MEAN-SSD
- The results showed that the MEAN-SSD model is able to detect apple diseases accurately by reaching 83.12 mAP and a speed of 12.53 FPS. - The MEAN block is used as a basic module to boost the detection speed and shrink the model's size.
-Disease detection was only devoted to apple leaf diseases and more specifically to 5 types of disease spots, such as Brown spot, grey spot, Mosaic, Alternaria blotch, and Rust.
Detection of oil palm leaf disease based on color histogram and supervised classifier (Hamdani et al., 2021) [20] -A new method for detecting oil palm leaf disease is proposed in this paper to discriminate between two leaf classes: healthy and diseased. Then, feature extraction is carried out in the RGB (R, G, and B), LAB (a and b), HSI (H and S), and HSV (H and S) color spaces by splitting the histogram of the 8-bin color channel. This is further performed on the segmented leaf regions resulting from the k-means clustering. A total of 41 selected features are produced using PCA and subsequently fed into the ANN classifier.

-
The classification results have shown that the proposed method performs satisfactorily, as evidenced by the high specificity, sensitivity, and accuracy values, which reach 100%, 99.3%, and 99.67% respectively. - The applied method produces a smaller number of features with discriminatory and more powerful characteristics.
-According to the classification outcomes, an error occurred due to a leaf being misclassified as a healthy one. - The study was only conducted on the oil palm leaf disease.
Detection of Rice Leaf Diseases Using Image Processing (Pothen et al., 2020) [22] The proposed system identifies three diseases (bacterial leaf blight, leaf smut, and brown spot) that affect rice plant leaves using IP and ML techniques. This system, in turn, helps farmers save their crops at an early stage. As a first step in the process sequence, the images are collected and further pre-processed to ensure that the image features are upgraded and undesired distortions are eliminated, followed by segmenting the images through the Otsu thresholding algorithm. Using the segmented area, a range of features are extracted using the LBP and HOG. Then, these obtained features are classified using the SVM and reached 94.6%.
-SVM + HOG with polynomial kernel function can be used to detect other plant diseases. - The proposed work is relevant, offering better precision (of 94.6%) compared to other work.
-One downside of the LBP fundamental operator is its inability to capture certain prevailing features.
Image Processing Technologies for Automatic Detection of Plant Disease and Alerting System in Agricultural Farms (Mugithe et al., 2020) [7] The authors developed a system able to detect leaf diseases and alert the farmer in case of the need to promptly act to circumvent the spread of the disease in the field. They employed IP techniques that entail six steps. Firstly, the leaf images were taken in real time via a webcam connected to RaspberryPi. Secondly, the images were pre-processed, segmented, and clustered using the k-means clustering algorithm, then features (e.g., perimeter and light intensity) were retrieved from the images. Lastly, these extracted features were evaluated to classify the leaf diseases. Once the disease is detected, the buzzer rings and an alert is generated so that the farmer can intervene promptly. Note that this system works in two ways, namely in the GUI and in real time. - The results of the disease Alternaria Alternata achieved precision of 95.16313% in the graphical interface. - The use of a warning system when detecting a disease.
-The authors did not address any other disease and not even the reported results are obvious.  [67] This paper presents the innovation of the IoT in agricultural infection and insect pest control. Data on insects and diseases are collected using a WSN, so an IoT-based control framework was proposed to obtain horticultural data from a farm with levels of trees and three frameworks. First, a computation framework was deployed to deem whether the plant is healthy or affected and second, an automated framework determined the disease closeness in the plants, and a mechanized framework was then set up to recognize the diseases through humidity, temperature, and shade sensors. Thus, through its sensors, the plants' progress is registered and then dissected using Arduino programming. Then, this collected information is transmitted to the cloud by WIFI to be processed and analyzed. Eventually, this information is compared to the whole data to determine if the studied plant is healthy or affected. - The proposed IoT-based model is low-cost. -Low-income farmers can purchase it and take benefit of it for curtailing the disease spread. - The authors restricted their model to only the three following parameters: temperature, moisture, and leaf shade. Another constraint is that the evaluated features for the considered parameters are not accurate. Moreover, a range of features was taken from these parameters that may fluctuate unexpectedly depending on the environmental conditions. - The leaves of diseased plants are not classified, so the disease types are still not able to be known.
Detection of Plant Leaf Disease using Digital Image Processing (Mojjada et al., 2020) [29] This article focuses on the early identification of plant leaf diseases by image analysis. Thus, automated disease detection reduces the work for monitoring agricultural sites. The identification of diseases is carried out through various IP techniques and ML; in particular, a genetic optimization algorithm was used after image segmentation by k-means to obtain optimized results and they also exploited SVM for disease classification. - The algorithm used was tested with an accuracy of 75% in five classes of infected leaf images identified for corn, tomato, bell pepper, peach, and grape.
-Very common methods were used in the paper.
Precision Method for Pest Detection in Plants using the Clustering Algorithm in Image Processing (Reddy et al., 2020) [68] This work presents an accurate method for detecting pests in plants using the k-means clustering algorithm. Disease recognition involves steps such as image acquisition, image preprocessing, segmentation, and classification. First, the RGB leaf images were converted to HSV for partitioning, and then the median filter and boundary detection algorithm were both applied during the pre-processing step to suppress the clamor. Finally, the k-means clustering was employed to cluster the images.
-This paper provides an efficient and accurate framework for the detection of affected images. - The k-means clustering provides high accuracies compared to other methods and takes less time for the processing.
-Very typical and old techniques were considered in this paper.
Detection and Classification of Plant Diseases Using Image Processing and Multiclass Support Vector Machine (Khan et al., 2020) [69] The authors described a framework for plant disease using ML and IP techniques. First, the suggested algorithm is applied to a 148-image dataset which contains 5 types of leaves diseases, namely, Alternaria, fire blight, Anthracnose, and Cercospora leaf spot, and the plant images were split up into two sets. A training set is composed of 73 images and a testing set is composed of 75 images. Then, image segmentation is performed to isolate the pathogenic parts of the leaf. Then, 13 texture features were extracted from the image, of which, nine features (standard deviation, variance, mean, entropy, smoothness, skewness, RMS root mean square, inverse difference, and kurtosis) are calculated using the assigned segment in RGB color space. The other four features (homogeneity, contrast, energy, and correlation) are determined from a grayscale image. Finally, the healthy and diseased leaves are classified based on the feature vector extracted using SVM. - The obtaining results for plant disease detection showed that the proposed method yields a highly accurate rate of up to 92.8571%. - The intervention of the operator is crucial to select the segment affected by the disease because this operation is not automatically executed in the system rather, it is performed by visual examination of the three segments.
Evolutionary feature optimization for plant leaf disease detection by deep neural networks (Al-bayati et al., 2020) [38] The researchers used a DNN for apple leaf disease identification, namely black rot, apple scab, and cedar rust, by applying the GOA and Robust Accelerated Feature SURF, where GOA was employed for feature optimization and SURF was applied for feature extraction. Prior to the implementation of DNN, many steps were performed, such as the image improvement in the pre-processing process and the ROI segmentation. Then, the features were extracted using the SURF descriptor, followed by the optimization by the GOA algorithm, and, finally, the disease classification was carried out by the use of DNN. - The experiments showed that the method based on DNN optimized by SURF provides a higher mean value of 98.28% in comparison with the other techniques; hence the accuracy of the model increases by 18.03%. Thus, the basic model has better transferability compared to the metric model.
-Only foliar diseases of apples were addressed in this paper.
Leaf Disease Detection using Image Processing (Karthikeyan et al., 2020) [65] This research used IP techniques along with the SVM classifier to detect plant diseases. The identification of plant diseases requires the steps of transforming an RGB image to grayscale, then enhancing the image using the adaptive color histogram AHE, extracting 13 textural features using the GLCM and, finally, using SVM to classify the different types of diseases. Note that more than 500 images were taken for training and testing with intensity values ranging from 0 to 255.

-
The system reveals the presence of disease in the leaves in a shorter time and at a lower cost than conventional systems.
-The accuracy rate is not given; also, the structure of the algorithm is complicated.
Plant disease detection using image processing techniques (Sawant et al., 2020) [70] An IM and DL techniques-based approach was proposed for plant disease identification. First, pictures of healthy and unhealthy leaves are acquired and then stored in the database for preprocessing. Additionally, the images are pre-processed using different techniques such as histogram equalizer, Contrast Limited AHE, and image resizing. Then, once the RGB image is converted to CLAHE, it is resized to 70 × 70 for better resolution. Moreover, the leaf features are extracted and released to the CNN using the SoftMax function for plant disease classification.
Note that the first layer has 1000 neurons. - The CNN method enables accurate detection and classifies diverse plant diseases using IP techniques.
-Results were not provided in this paper. Several approaches were developed in this study to identify plant diseases with little data. A DAML and triplet network approach was set up using three architectures of CNN (ResNet50, 34, and 18). Using a large dataset, the approaches were trained and then fitted from 5 to 50 images per disease for detecting new diseases. - The model reached an accuracy of up to 99% when the change from the source domain to the targets was slight, but when the change was significant, the accuracy was up to 81%. - The results showed a significant error rate for DAML methods of 22.2 per 50 shots and 42.6 per 5 shots compared to the other methods. - The basic model lags significantly behind the other methods.
Leaf disease detection using machine learning (Fulari et al., 2020) [71] An efficient method for the identification of a healthy or infected leaf was presented using IP and ML techniques. The data were taken from the Kaggle website which contains more than 12,949 images. The method implies different steps such as image preprocessing, segmentation of the image, feature extraction (shape, color, and texture) with the use of GLCM, and classification with the use of SVM. - The SVM offers a number of advantages over other classifiers, as it is efficient in high-dimensional spaces. - The SVM yielded an accuracy of up to 80% while the CNN provided an accuracy of up to 97.71%. - The presented method, based on the CNN, provides good accuracy. Nevertheless, it is tedious and a lot of time is required to train the model. IP and AI methods were used for the recognition of diseases such as scab, anthracnose, blight, and spots on plants. First, the RGB image was converted to grayscale, and the image was then segmented using the k-means and the modified CPDA algorithm. Thus, from the result obtained, a comparison was made between these two segmentation algorithms. The statistical parameters of the segmented image were calculated using the GLCM method; that is, the characteristics (entropy, mean, variance, type, RMS, contrast, correlation, energy, homogeneity, regularity, kurtosis, asymmetry, IDM moment of difference). Finally, the SVM classifier was trained with a dataset of about 100 images of leaves affected by the disease. - The proposed modified CPDA detection algorithm yields more accurate results than the k-means clustering.
-Even if a disease is detected in a shorter time, the accuracy is limited. The authors proposed a simple and efficient IoT-based solution for the detection of bunch top and Sigatoka diseases in banana tree located on hills. First, 80 hill banana plant images are captured and then resized to 256 × 256 in the image preprocessing phase. Then, the preprocessed image is converted to a gray image.
Thus, the histogram equalization technique is used to equalize the histogram of the resized gray image so that the intensities of the image are better distributed for better segmentation, which is performed by k-means clustering. From the segmented image, the GLCM features are extracted and uploaded to the cloud for further analysis. From these extracted characteristics, the hill banana diseases are classified using the RFC technique. Finally, the data is collected and analyzed by agricultural experts. In addition, this system allows remote monitoring of environmental parameters such as soil humidity and temperature to prevent diseases caused by climate change and pathogens as much as possible. In this paper, the proposed method takes RGB images as the input and applies the preprocessing methods, such as image sharpness and median filters, to eliminate the noise from images, and for deblurring and edge detection. Then, these images were segmented using k-means clustering. It should be mentioned that they used the peak signal-to-noise ratio in order to measure the quality of the images. - The results show that the method adopted allows better identification of plant leaf diseases. The researchers developed two prototypes. The first is a mobile application that classifies diseases on rice plants. With this simple application, the farmer can easily identify the diseases or pests on rice plants, without using agronomists. The second is a system for monitoring temperature, atmospheric pressure, water level, and the sunlight level of rice fields. Using this system, the intensive work is reduced by remotely monitoring this environmental data from anywhere an Internet connection is available. For the development of the mobile app, they collected 6 kinds of rice pictures, of bacterial leaf blight, brown spot, rice blast, mice attack, insects, and healthy rice. In addition, they used the Arduino nano to turn off/on the solenoid valve, which was directly connected to the Raspberry Pi every 30 min, to ensure efficient power and a long system runtime. Diseases were classified using TL and DL models.
-They developed a simple Android app to monitor the temperature and battery level on a SensorTag. Thus, the farm sensor data reading can be easily viewed on smartphones or PCs.
-They installed 8 SensorTags in different areas. The distance between them and the Raspberry Pi was less than 50 m. To monitor a wide range of many rice fields, another type of communication system, rather than the Bluetooth technology of the SensorTags, must be considered. A problem was encountered with the SensorTag coil battery, Under normal conditions, the batteries last at least a year while keeping the SensorTag alive. However, firmware level changes were added to the SensorTag to advertise all the time so, the LEDs on the SensorTags blink and the batteries only last a few weeks. Hence, they needed to replace the button batteries many times. A multiple linear regression-based plant disease identification system is presented, along with a histogram-based segmentation method for accurate and automatic threshold calculation. The proposed system is based on IP techniques including four steps: preprocessing, image segmentation, feature extraction, and regression model. First, the spatial domain image denoising is used to filter the noise. Then, an improved histogram-based segmentation method is developed to distinguish lesions from normal foliage, which automatically determines the threshold and optimizes the segmentation process.
Next, the regional growth method is used for multi-point selection to extract certain disease-affected areas. Then, lesion feature extraction is performed in terms of shape, texture, and color. Finally, a multiple linear regression model is implemented to determine the type of disease, and then the least-squares estimation algorithm is used to calculate the coefficients and confidence intervals to set up the disease recognition system. - The obtained results proved that the proposed recognition system has high accuracy, reliability, and effective recognition ability of plant diseases. - The histogram segmentation method has great advantages, such as speed, efficiency, and accuracy. - The error rate increases progressively as the disease state becomes more complex because, as the disease worsens, the characteristic parameters become more complex and so the results become unstable.
An IoT based smart solution for leaf disease detection (Thorat et al., 2017) [76] This paper presents a solution based on a smart farming technique using WSN, a Raspberry PI module, and a camera to establish wireless communication. In addition, CV techniques were used, such as masking, segmentation, and feature extraction to identify leaf diseases.It should be noted that they used the Apache server to retrieve and send data. - The proposed system allows remote monitoring of the farm. Thus, the recognition of different leaf diseases was carried out successfully. - The power supply of the system is limited, so the whole process stops if the system fails, which is an inconvenience. Moreover, the images taken during the day can be affected by excessive sunlight or reflections, which means the leaf color cannot be identified by the camera or captured clearly at night. were acquired from a hyperspectral imaging system consisting of two Headwall push-broom hyperspectral cameras, namely the SWIR hyperspectral camera that provides a spatial resolution of 384 pixels and a spectral range of 900 to 2500 with 168 spectral bands, and the VNIR hyperspectral camera, which provides a spatial resolution of 384 pixels. Then, these images were pre-processed using different pre-processing techniques such as the space-adaptive filtering approach for detection and grid removal. In addition, these images were segmented using an unsupervised k-means clustering algorithm. Further, discriminative feature extraction was performed using the full spectrum, VNIR, SWIR, and vegetation indices. Finally, these features were employed to train classifiers for discriminating leaves obtained from inoculated and healthy plants.They also used other techniques in the process of disease identification as follows:They used the KL divergence or relative entropy to estimate the distances between two distributions of the control group and of the inoculated group.Note that the high-pass filter used is a third-order Butterworth FIR filter, which is applied to flatten the power spectral density of the image in order to detect a known signal corrupted by additive white noise. - The obtained results showed excellent discrimination based on the full spectrum. - The effectiveness of feature extraction techniques used for automatic disease classification in greenhouse experiments. - The cluster analysis was able to successfully classify the image spectra into two classes by using the significant difference in spectral profile between the vegetation and its surroundings. - The researchers treated only one disease, TSWV. -They were not able to correlate the reduction in overall values of SWIR dissimilarity with a plant pathogenic biophysical interaction for DAI 7 and 10.
Deep Learning for Image-Based Cassava Disease Detection (Ramcharan et al., 2017) [41] A new model for the identification of plant diseases is proposed based on TL to train a CNN using a dataset of 2756 images in order to identify two types of damage caused by pests and three diseases. This model was deployed on a mobile application.
-The CNN avoids the tedious and complex step of extracting features from images to train models on a mobile device. The results proved that the TL approach offers greater precision in cassava, and is also an affordable, fast, and easily deployable strategy for digital devices. The model accuracy was 96% for RMD and CMD, 95% for GMD, and 98% for brown spot and cassava.
-Due to several factors, such as the lighting in a complex environment, accurate identification of diseases is challenging.
Early detection and classification of tobacco leaves inoculated with tobacco mosaic virus based on hyperspectral imaging technique (Zhu et al., 2016) [44] The authors proposed a procedure for the early detection of tobacco disease infected with the mosaic virus by different ML algorithms based on hyperspectral imaging techniques. Images of healthy leaves inoculated with TMV for a period of 7 days, i.e., after inoculation, were acquired by a hyperspectral imaging system every day with the VNIR wavelength region 380-1023 nm. In addition, the spectral reflectance of the predefined ROI was extracted from the hyperspectral images using the ENVI software. The different ML algorithms, namely, RF, SVM, BaBPNN, LS-SVM, PLS-DA, ELM, and LDA were used to quantitatively classify the stages of tobacco disease using EW that were selected using the SPA.
-BPNN and ELM models successfully detected healthy and diseased tobacco leaves (2 DPI, 4 DPI, 6 DPI); the detection rates were 98.33% and 96.67%, respectively. - The classification accuracy of the training set and the test set was 84.17% and 75% respectively.
-They used a single VNIR component from the electromagnetic spectrum. -Generation of average spectra from a single ROI rather than all pixels. - The performance of the SPA-PLS-DA model was relatively poor compared to other models and the accuracy was slightly lower 75%.
Plant disease detection using image processing (Khirade et al., 2015) [78] This article discussed IP-based methods for the detection of plant diseases, in particular segmentation and feature extraction algorithms. Concerning the segmentation techniques, they exploited the k-mean clustering, boundary and spot detection algorithm, and the Otsu threshold algorithm. Regarding the feature extraction techniques, they studied various methods, such as the color co-occurrence method, and regarding the disease classification phase, they used various algorithms such as ANN, BBPN, and SVM to accurately classify various leaf diseases.
-A variety of IP and machine learning (ML) techniques are discussed.
-The authors did not suggest any system and no results were given. A software solution is proposed for the detection of unhealthy regions and the automatic classification of diseases using the extracted texture characteristics. Thus, the scheme of the process consists of four steps. First, the acquired RGB leaf images were converted to HSV format. Then, the green pixels were masked and removed, followed by a segmentation process. Further, the texture characteristics were computed using the Color-Co-Occurrence Matrix and, finally, the classification was first performed using the minimum distance criterion, which yielded a gain of 86.7%. Results were then improved by the SVM classifier. - The proposed method was tested on ten species of plants: beans, mango, lemon, jackfruit, banana, sapota, potato, and tomato. The results gave an accuracy of 94.74% using the SVM classifier. Therefore, the proposed approach can classify leaf diseases with little computational effort.
-Various reasons lead to an erroneous classification, namely, the identifying vectors of the taken features have to be optimized, and the symptoms of the diseased plant leaves vary from the early to the late stage.
Early detection of diseases on leaves by image processing (Han et al., 2013) [80] The authors worked on images of vine leaves affected by mildew at different stages that were acquired by photographic sensors. They were able to detect diseases that are visible and barely visible to the naked eye using techniques based on the image representation in color space, and hybrids including information on both color and texture. Thus, for visual plant diseases, they were oriented towards changing the color space, in particular, to facilitate detection. To ensure better visualization, they were interested in the bands of each image (the V band of the YUV color space). Regarding diseases barely visible to the eyes, as a solution, they used the image analysis method that combines color and texture information. Otherwise, the most relevant challenge was the disease detection at an early stage. As an optimal solution, they worked on thermal imaging, which is very effective in detecting water stress. Finally, they calculated the Mahalanobis distance for image segmentation.
-As an advantage of the texture analysis (conversion of the image into hybrid space), they discerned 3 classes of textures and, for each class, 20 learning patches, to choose from. - The use of a thermal imaging device allows the premature detection of leaf diseases.
-They only treated mildew disease. - The downside of using the color space change method is that when the mildew stains are at the early stage, this method does not work well; hence, the need to couple this type of color treatment with one based on texture analysis. -They did not calculate the area infected with mildew disease.
Classification of cotton leaf spot disease using image processing edge detection techniques (Revathi et al., 2012) [81] This article describes how to identify the part affected by leaf diseases using IP techniques. First, to segment the image, the authors used the Canny and Sobel edge detection technique and finally, they proposed an HPCCDD to analyze the images and classify the different diseases.
-The percentage was indicated to reduce leaf diseases. - The validation was undertaken via MATLAB.
-The authors only discussed cotton crops.
Color image segmentation using K-Medoids Clustering(Yerpude et al., 2012) [82] A color image segmentation method was proposed using k-medoids clustering; the idea is to find groups of objects by finding the medoids for each group. The main objective of this paper is the critical analysis of different disease segmentation techniques.
-The obtained result shows the effectiveness of the k-medoids algorithm on different types of images, such as grayscale images. Moreover, the proposed method is not sensitive to noise.
-The segmented images are highly reliant on the centroids. However, they did not consider finding the optimal number of segments to obtain more accurate results. - The k-means algorithm is very sensitive to outliers, as the data distribution can be significantly distorted if an object has an extremely large value.
Color transform-based approach for disease spot detection on plant leaf (Chaudhary et al., 2012) [83] A comparison was made between the effect of YCbCr, HSV, and CIELAB color spaces in the disease spot detection process since disease spots are different in color but not in intensity level. First, the different images of wheat, soybeans, rice, corn, cotton, mustard, apple, magnolia, and cherry leaf were taken. Then, these RGB images were converted to YCbCr color space using the color transformation formula and further to CIELAB and HSV color space. Then, for smoothing and enhancing the image, a median filter was applied. Finally, the segmentation of the image was carried out using the Otsu method on the components of the color space: Cr for filtered YCbCr, component H for the filtered HSV space, and component A for the LAB filtered color space. - The experimental results show that the noise generated by the camera flash, background, and vein can be effectively removed using the CIELAB color model.
-Unfortunately, due to an imbalance in pigment formation and micronutrient deficiency, the color of the vein is different from the leaf spots. Thus, in some cases, these disease spots cannot be detected with precision using the CIELAB method.
Fast and accurate detection and classification of plant diseases (Al-Hiary et al., 2011) [84] The acquisition of the leaf RGB images is undertaken to perform color space transformation.
Once the segmentation of these images is performed using k-means clustering, the value of the green pixels is masked using the threshold obtained through Otsu's method. In addition, the affected clusters were converted to the hue saturation value. For texture analysis, the SGDM matrix is used for the formation of each image. Finally, the disease recognition process is performed by the ANN classifier.
-The color occurrence method is an advantageous strategy that gives exact precision.
-The methodology can be improved to increase the recognition rate of the classification process and to automatically estimate the severity of the disease detected.
Early detection of Fusarium infection in wheat using hyper-spectral imaging (Bauriegel et al., 2011) [85] In this paper, Fusarium head disease was detected by spectral analysis in wheat, barley, oat, and rye plants. The PCA distinguishes affected from healthy tissue in the wavelength ranges 927-931 nm, 682-733 nm, 560-675 nm, and 500-533 nm. The SAM method is used to classify the degrees of infection. Finally, the best time to identify ear blight is the stage between 71-85 on the BBCH scale. They analyzed 292 spectra and 80 spectra for diseased and healthy tissue, respectively, in time series experiments. Smoothing was performed for these spectra with the "proc expand" function. Then, the first derivative was calculated and 104 individual spectra were subjected to PCA to assess the relevant wavelengths for discriminating between healthy and blight-infected tissue. The SAM image analysis method correctly classifies the degree of disease at 87%, and the visual assessment error is 10%. - The SAM method yields accurate classification results; it is not practical for an online application because the analysis of 512 spectral bands involves a significant amount of computation.
-It is impossible to distinguish between different degrees of infection using only spectral analysis, due to the lack of symptoms. - The disadvantage of using the SAM method is that it is time consuming. Indeed, it involves the configuration of the reference spectra for the classification and, at the same time, the analysis of all the spectral bands.

• The Difference between machine learning and deep learning
The difference between machine and deep learning lies [86] first in the fact that machine learning algorithms deal with quantitative and structured data and, second, the operator is responsible for choosing the right algorithm to extract the features that will influence the prediction. Deep learning algorithms deal with unstructured data and the algorithm is trained to extract the influential elements in the prediction as shown in Figure  S1 in the Supplementary Materials. It should be noted that deep learning algorithms, compared to ML algorithms, demand a large amount of data and high computational power.

Discussion
In this paper, the authors reviewed many research articles and identified 129 studies eligible for systematic review using the PRISMA statement as presented in Figure S2 in the Supplementary Materials, these studies involve methodologies in image processing, machine learning, and deep learning particularly focused on the identification and classification of plant diseases. The study showed that the techniques most used in the literature, in general, are the support vector machine [22,59,61,65] (SVM), random forest [87] (RF), artificial neural network [84] (ANN) and convolutional neural network (CNN) [35,39,50].
Additionally, many scientific contributions have focused on the prediction of major diseases affecting wheat, rice, and potatoes, such as powdery mildew [88,89], late blight [90,91], and blast [92,93]. The challenging aspect of this work is the evaluation and investigation of the computational efficiency of each study compared to other studies, because each paper applies different metrics to a variety of diseases in different crops. In addition, many techniques and pretreatment approaches are used to predict disease presence or severity. Accordingly, it is nearly impossible to generalize and compare different articles because it is paramount to follow the same experimental conditions. Thus, the present comparison of the different approaches used was strictly constrained, for example, by considering the types of crops on which the work was undertaken, in addition to the kinds of diseases considered during the work. Therefore, based on these constraints, from the results obtained in related works, it is observed that deep learning-based models have outperformed the classical approaches such as random forest, support vector machine, and k-nearest neighbors classifiers, knowing that the performance of these algorithms has been proven and validated using metrics such as accuracy, sensitivity, specificity, and F1-score etc. Table 4 shows that several researchers applied spectral analysis using thermal and optical remote sensing images, in addition to multispectral and hyperspectral images. As shown by Duarte-Carvajalino et al. [94], multispectral images were found to be relevant for the early-stage detection of disease, whereas hyperspectral images, which are the most widely used in the existing literature, can predict disease even before symptoms are visible to the naked eye. Note that this difference is due to the spectral resolution used by the two technologies. However, compared to hyperspectral imaging, multispectral imaging offers less data complexity [95]. However, hyperspectral image analysis has various limitations. Several authors have highlighted the high dimensionality of the data as one of the difficulties encountered. As pointed out by Mahlein et al. [95], the high degree of interband correlation leads to information redundancy, generating convergence instability in multivariate prediction models. It is observed that the dataset used by most of the researchers is taken from PlantVillage, and, in the image preprocessing process, most researchers used the histogram equalization to improve the contrast, and the median, Gaussian filter, and Gabor filter for denoising and image enhancement. Furthermore, for image segmentation, researchers have focused on the hue using the k-means and fuzzy c-means algorithm to segment the images; this procedure enables extraction of the region of interest from the given image. Using this, plant features such as texture, shape, and color have often been extracted using the gray-level co-occurrence matrix (GLCM), local binary patterns (LBPs), and histogram of oriented gradients (HOG). This is the most prominent step in the classification process. The researchers used different classification algorithms based on machine learning, and deep and transfer learning, for the classification phase, such as the decision tree classifier (TC), random forest (RF), naive Bayes (NB), support vector machine (SVM), artificial neural network (ANN), probabilistic neural network (PNN), back-propagation neural network (BPNN), convolutional neural network (CNN), and InceptionV3.
The SVM and NN are mainly used in disease classification. The main advantage of NNs is that they can tolerate noise and are built from available data. The SVM, in turn, offers outstanding classification performance because it nonlinearly maps the input feature vector into a high dimensional space where it can be easily separated. Nevertheless, SVMs are not suitable when the data is very noisy. Hence, when many redundant variables form the input vector, it is possible to the use principal component analysis (PCA) dimensionality reduction method, as used by Kadir et al. [96]. In addition, the convolutional neural network (CNN), faster R-CNN, Vgg16, and ResNet50 models have been used to fully automate the classification process. Moreover, a new approach employed by Turkoglu et al. [97] is the extreme learning machine (ELM), which offers faster learning and better performance and generalization with lower computational cost. The advantages and disadvantages of the classifiers used in the literature are summarized in Table 5. In this regard, a study was carried out by Ngugi et al. [98] to compare the performance of 10 deep learning models using the PlantVillage dataset, namely AlexNet, ResNet-101, GoogleNet, DenseNet201, Vgg16, Inceptionv3, InceptionResNetv2, SqueezeNet, ShuffleNet, and MobileNets. We present the results obtained by the different architectures for all the performance measures in Table 6 below. According to Table 6, the DenseNet201 model is the most suitable because it requires less storage and has the advantage of having the best performance measures (accuracy = 0.9973, precision = 0.9958, recall = 0.9965, specificity = 0.9999, F1 score = 0.9961). However, it requires a longer learning time (82 h) compared to the InceptionV3 and ResNet-101 models; nonetheless, their accuracies are slightly lower than those of DenseNet201. Therefore, special care should be taken when choosing between these three architectures, as each model has certain advantages and limitations. By comparison, the small MobileNet, SqueezeNet, and ShuffleNet architectures are desirable in embedded and mobile applications where computing resources are limited, due to their short learning times and low storage requirements, while still achieving high accuracy.
In this regard, another comparative study of four machine learning algorithms-knearest neighbors, decision tree, naive Bayes, and logistic regression-was performed by Ahmed et al. [99] to detect three rice plant diseases where the images were taken from the same PlantVillage database.
As shown in Figure 3, the best accuracy (over 97% by applying it to the test dataset) was obtained by the decision tree algorithm after 10 cross-validations. To briefly summarize this section, it is inferred that multispectral and hyperspectral imagery represents a valuable source of useful information for developing autonomous non-invasive systems to predict abiotic and biotic stresses in plants. Additionally, the integration of multiple data sources will strengthen and increase the stability and generalization capabilities of the algorithms. Furthermore, from the results obtained in the literature, it appears that the automatic extraction of leaf features performed by deep learning-based models is more relevant and efficient than the process of extracting these features using traditional approaches such as the grey level co-occurrence matrix (GLCM), area-based techniques (ABTs), and scale invariant feature transform (SIFT). However, it is noted that there is a lack of validation of the models used in real-world scenarios. Therefore, proper validation is necessary for the studies to have an accurate and general impact.

Unresolved Challenges in the Crop Disease Detection Field
The above section presents a wealth of promising research undertaken in the past few years in the area of crop foliar disease recognition and detection using a range of techniques. In the existing literature to date, there are numerous unresolved challenges that remain to be address and overcome to derive robust and feasible crop disease detection systems that can operate accurately under various field conditions. The most prominent of these highlighted challenges are:

Insufficient Data
The major problem in the use of deep learning models for plant disease detection is the insufficiency of datasets in terms of both diversity and size [100] because these models have extremely large data requirements. In the majority of cases, the identification of plant diseases has been performed under ideal and controlled conditions [43], such as the presence of a single disease with a homogeneous background. In addition, environmental conditions are not considered; hence, the accuracy rate obtained will be higher than that actually obtained in a practical application. Additionally, image labeling is a very laborious and tedious task. Due to these factors, the production of a reliable, efficient, and comprehensive dataset is extremely challenging. At present, there are six ways to deal with the lack of a dataset: data augmentation techniques, data sharing, citizen science, transfer learning, synthetic data, and few-shot learning.

Imbalanced Data
The most commonly used datasets for crop disease detection are cleaned or their unbalanced nature is ignored to fully concentrate on training algorithms and avoid being distracted by other problems. However, in real-world settings, the distribution across classes is skewed and unbalanced [101], ranging from mildly biased to severely unbalanced. This poses a challenge for predictive modeling and may require specialized techniques, such as re-sampling techniques, because the machine learning algorithms typically employed for classification are built around the assumption of an equal number of examples for each class. As a result, some of the models have poor predictive performance, especially for the minority class which is more susceptible to misclassification than the majority class.

Vanishing Gradient Problem
Hochreiter's work [102] showed an issue called the "vanishing gradient problem" that arises during the training phase when employing back-propagation learning techniques with neural networks. Specifically, each weight of the neural network is updated based on the current weight and is proportionally related to the partial derivative of the error function. However, this updating of the weights may not take place in some cases due to an extremely small gradient that approaches zero. As a result, the gradient descent does not converge to the optimum and the neural network stops completely [103].

Exploding Gradient Problem
The opposite problem to the vanishing problem is the gradient explosion problem [104]. Specifically, the gradients become increasingly larger as the back-propagation algorithm advances. This will lead to extremely large updates of the network weights and causes the gradient descent to diverge, which means that the system becomes unstable [103]. Thus, the model will lose its ability to learn efficiently. In general, as we move up the network during back-propagation, the gradient grows exponentially by repeatedly multiplying the gradients. As a result, the weight values can become incredibly large and spill over to become a non-numerical value (NaN).

Overfitting and Underfitting Problem
Learning models have excessively high chances of overfitting and underfitting the data in the training stage due to the large number of parameters involved, which are correlated in complex ways. Such situations reduce the ability of the model to perform well on the tested data. Thus, it is considered that a learning algorithm is underfitting when it is unable to grasp the underlying trend in the data. Its occurrence simply means high bias, low variance, and that the model does not fit the data well enough. This usually occurs when fewer data are available to build an accurate model and also when a linear model is attempted to be built with non-linear data. Conversely, a model is said to be overfitted when it is trained with a large quantity of data; it then learns from noise and inaccurate data inputs in the dataset. Then, the model does not correctly categorize the data due to excessive detail and noise. Its occurrence simply means low bias and high variance. The overfitting occurs in nonlinear and nonparametric approaches, as these kinds of learning algorithms have greater leeway in setting up an unrealistic model. Ideally, both of these should not exist in models, but they are generally challenging to eliminate. This problem was noted by Ahmad et al. [105], whose model based on efficient convolutional neural networks tends to overfit during the training of the first epochs.

Image Acquisition: Conditions of Image Capture (Lighting, Spatial Location, Wind and Camera)
Ideally, images should be captured under similar conditions. However, in practice, this may only be feasible in the laboratory because it is extremely difficult to monitor the conditions of capture. Thus images may present unpredictable characteristics, making disease identification a daunting task. Moreover, the variable capture conditions have proven to be a challenging issue in measuring the severity of citrus leaf canker [106] and in identifying citrus diseases [107]. In light of this, several endeavors have been undertaken to develop methods of invariant illumination [108]. Nevertheless, their success to date is still relatively modest.

• Lighting Issue
Crops grow in natural environments that fluctuate greatly. Thus, images are impacted by numerous factors, such as wind, illumination, and other climatic conditions. Consequently, lighting issues are inevitable, and completely eliminating the variations is almost impossible. Nevertheless, certain endeavors have been made to mitigate them, e.g., Pourreza et al. [109] developed a system to detect real-time citrus Huanglongbing disease using a narrow-band imaging and polarizing filter set. Specular lighting, the simultaneous presence of light and shadow, is the most difficult problem to deal with. However, the presence of specular lighting can be lessened by changing either the angle at which the image is taken or the leaf position, although this likely causes some degree of reflection. Furthermore, specular reflections and shadows were noted by Zhou et al. [110] as the main source of error in monitoring Cercospora leaf spot on sugar beets, which occurred because of the automatic captures that complicate the prevention of lighting problems.

• Camera
The image resolution is one of the crucial factors that has a direct influence on the image features. A higher resolution enables the detection of small lesions and spores. Moreover, the device being used to capture the image also influences these features.

Image Preprocessing
During the preprocessing and storage of leaf images, more information is lost as the compression ratio is increased. This may not dramatically influence the analysis of large lesions, but may severely distort small symptoms. Therefore, compression should be kept to a minimum or even avoided, especially if the symptoms are tiny.

Image Segmentation and Symptom Discrimination
In general, symptoms do not have clear boundaries; they gradually disappear in normal tissue, making the distinction between healthy and diseased areas highly ambiguous. This clearly affects the accuracy of the threshold and extracted features. Although manual and visual representation cannot clearly determine the edges, any machine-based representation will be prone to many subjective issues. Notably, the issue of subjective delineation of affected regions was first addressed by Olmstead et al. [111] and later by Moya et al. [112], who emphasized that some sort of external reference needs to be established for proper validation of disease identification methods. However, without the use of a reference, Oberti et al. [113] observed for leaf powdery mildew that the number of false negatives or positives seen on the symptom discolored zones is too high. In summary, few solutions have been suggested for this problem because inconsistencies are intrinsic to the process. Furthermore, other difficulties are encountered when segmenting and locating regions of interest (ROIs): -A leaf may overlap with another leaf or other parts of the plant, and they may even be tilted or covered with dew or dust. -Images with complex backgrounds can render the segmentation of ROIs where symptoms appear challenging and intricate.

Feature Selection and Extraction
Although some plant species can be identified on the basis of leaf shape, other species have similar leaf shapes. Furthermore, symptoms do not necessarily arise in zones that are easily accessible; in practice, they can frequently be under the leaves or covered by other obstructions, or diseases can appear on the stems, fruits, or even flowers. Unfortunately, the latter problem has not attracted enough attention on the part of researchers. Furthermore, it is observed from the literature to date that researchers have mainly focused on the disease detection on the upper leaf surface. Nevertheless, Fuentes et al. [34] suggested using the faster network R-CNN for detecting a number of tomato plant diseases in several locations.

Disease Classification
In many of the cases listed below, the classifier used to identify plant diseases may not be able to distinguish between them; for example, if the symptoms presented by different diseases are visually very similar, as both Ahmad et al. [114] and Wiwartet al. [115] have stated. In addition, the difficulties stated below are highly relevant to measuring the disease severity: • Differences in disease symptoms: According to the disease development stage, a specific disease can present very distinct characteristics in the symptoms' shape, color, and size, causing serious identification problems. It should be noted that many different diseases can occur at the same time, making it extremely complex to distinguish between combinations of symptoms and individual symptoms. This problem was noted by Camargo et al. [116] when handling symptoms produced by black streak disease on banana leaves, and Moya et al. [112] when evaluating powdery mildew severity on squash leaves. • Diseases can occur simultaneously with many disorders, such as nutritional deficiencies, pests, and diseases: Typically, most techniques consider that there is only a single disease per image when, in reality, several other diseases can be present at the same time, in addition to other kinds of disorders, such as nutritional deficiencies and pests. These simultaneous symptoms can be either separate or physically combined, making disease identification a significant challenge. In this regard, Bock et al. [106] observed the simultaneous presence of symptoms arising from different diseases and noted that this can lead to identification issues, and that more advances will be required to cope with this issue. • The symptoms' similarity between different disorder types: Symptoms resulting from various disorders, such as diseases, phytotoxicity, presence of parasites, and nutritional deficiencies, can be visually similar. As a result, it can be extremely difficult to determine a symptom's source with certitude, particularly if only the visible spectrum is used in the identification process. This forces methods to rely on tiny differences to discriminate between the symptoms. Numerous researchers have stated that some disorders have close similarities, leading to major issues of discrimination. In this regard, Ahmad et al. [114] reported that symptoms resulting from Fusarium, Mosaic Potyvirus, Alternaria, and Phomopsis in soybean were very similar, and their classifier was unable to discern between them. This explains why the majority of studies conducted to date have chosen to tackle only diseases whose symptoms are quite dissimilar and, even then, their choices remain a significant challenge.

Other Challenges
Some other challenges facing automatic plant disease identification techniques cannot be categorized in the same way as those mentioned above. These challenges include reducing complexity, in addition to computational and memory demands [117], because low-cost computers and cameras have a very limited computational resource. At the same time, as image resolution is increasing, the computational resources are also growing. Another major concern is the lack of properly labeled [37] and sufficiently large datasets with high variability. This is notably the biggest hurdle when training recurrent neural network (RNN) models for plant disease detection, because collecting images in the field is not only a laborious task but also requires the guidance of agricultural experts for accurate annotation. Nevertheless, two free datasets exist [118]-PlantVillage and the Image Database of Plant Disease Symptoms dataset PDDB. Moreover, at present, no appropriate technology has been developed to automatically crop the leaf images around the affected area. A further issue is that hyperspectral data contain more than one hundred adjacent spectral bands and thus cannot be linearly trained [119]. Furthermore, these bands in different spectral regions are highly redundant [54,55] when extracting information to form an artificial neural network (ANN).

Future Work and Possible Solutions to Ongoing Limitations
In the previous section, gaps in the existing literature were highlighted to orient future research in this area. Thus, future work should first aim at acquiring diverse and large-size datasets to further promote research in this direction. Moreover, it is highly desirable to develop compact convolutional neural network CNN-based models that can achieve higher accuracy and promote the use of these technologies in the embedded platforms. Secondly, more emphasis should be placed in future research on the development of reliable methods and techniques to remove backgrounds and incorporate other forms of data, such as meteorological trends, disease occurrence history, and spatial location, to enhance the accuracy and reliability of disease identification systems. Additionally, disease recognition at different locations on plants and trees, such as the stems, blooms, and fruits, should receive greater attention from researchers due to its tremendous importance. One possible means to circumvent some of the limitations is to implement constraints to restrict variations in image capture conditions. However, even with very tight restrictions, many challenges will remain.
Some of the key challenges can be mitigated through the use of the most sophisticated approaches borrowed from the machine learning and computer vision fields. These include Markov random fields, mean shift, graph theory, and large margin nearest neighbor classification (LMNN), among other methods that have not yet been properly harnessed.
In this regard, the proposed solutions to remedy the challenges presented above can be summarized as follows.

Data Augmentation Techniques
If the aim is to avoid the overfitting problem and expand the size of the dataset without manually collecting new images, data augmentation techniques are a possible solution for any limited data problem [120,121]. Data augmentation incorporates a collection of methods that improve the attributes and size of training datasets. Thus, DL models can perform better when these techniques are exploited, such as rotation, canny edge detection, shear, image noise addition, shift, and flipping.

Tackling Overfitting Problem
Overfitting is one of the fundamental problems encountered when using learning models, and occurs due to the sensitivity to the scale of the cross-entropy loss and the continuous updating of the gradient. Three classes exist to avoid the overfitting problem. The first acts on both the model parameters and the model architecture. This includes the most familiar approaches, such as batch normalization [122], weight decay [123], and dropout [124]. Weight decay is the technique that is commonly used by default in all algorithms as a universal regularizer. The second class operates on model inputs such as data augmentation and corruption. One of the causes of the overfitting problem is the lack of training data; as a result, the learned distribution does not exactly reflect the real distribution. In contrast, the marginalized corrupted feature (MCF) exclusively improves the solution in data augmentation. MCF is a new approach to combat overfitting in supervised learning [125]. The main idea of the MCF is to allow the models to be regularized by training them on corrupted data copies, without raising the computational complexity. The final class works on the output of the model. A technique was recently proposed by Pereyra et al. [126] based on penalizing confident output distributions for model regularization. This method has demonstrated its high capacity to regularize CNN and RNN models. Hence, it will be judicious to explore these techniques in the field of crop disease detection.

Few-Shot Learning
In cases in which the dataset is extremely small, the techniques mentioned above may not be useful; that is, if there is a task in which the classification must be built with only one or two samples per class, and each sample is difficult to find. In such a case, innovative approaches are needed; one of these is few-shot learning (FSL) [127]. This is a relatively recent subfield of machine learning that needs more refinement and research. FSL allows the classification of new data when there are only a few training samples with supervised information. The approach of building an FSL classifier is suitable for solving the kind of problem related to rare plant pathologies, in which images are lacking for use in the training set. Typically, two major approaches are implicated in solving one-shot or few-shot machine learning issues, namely, the data-level approach and the parameter-level approach.

Transfer Learning
Recent research has revealed the extensive use of deep CNNs, which require a large quantity of data to perform effectively. The common challenge associated with the use of such models concerns the lack of training data. Specifically, collecting a large volume of data is an exhausting task, and no successful solution is available at this time. Therefore, in order to solve the fundamental dilemma of insufficient data, it is advisable to use TL models, which are highly effective in such cases [128]. In simple terms, transfer learning is the process by which the model trained for a specified task is reused as the starting point for training a new model. It attempts to transfer information from the original domain to the destination domain. This learning process is illustrated in Figure 4. Forthcoming research endeavors can be devoted to automatically estimate the detected disease severity, and expanded to attain the highest accuracy and speed via developing hybrid approaches such as genetic algorithms (GAs) and neural networks (NN) to increase the disease recognition rate, and combining particle swarm optimization (PSO) with other tools, such as gradient search techniques, to ensure a much higher speed. In addition, advanced and appropriate preprocessing techniques should be adopted to prevent noise interference in disease detection, in addition to partitioning the training and test data by employing more advanced techniques, such as stratified sampling, in order to create a wellbalanced data partition, and avoid underfitting and overfitting. In addition, optimizing feature vectors should be contemplated to increase the disease recognition rate in these various stages, and recurrent neural network (RNN) models and the long-term memory function should be used to extract memory and temporal dimensions that can subsequently be harnessed for plant growth estimation. Finally, a web application can be designed with a range of features, such as displaying the identified diseases in the crops from leaf images taken by a smartphone camera. A discussion forum can also be developed for agronomists and farmers to talk about treatment and early preventive measures for the encountered diseases. Moreover, plant electrophysiology is a promising avenue for future research [129], i.e., the electrical signal response produced in plants can be used for real-time disease detection. This approach is based on the fact that plants perceive the environment, and this perception is translated by a generation of electrical signals that essentially represent changes in their underlying physiological processes. Under the influence of stress, the metabolic activities of plant tissues and cells are unstable, which is inevitably reflected in the plant's physiological electrical properties. As a result, the extraction of substantial characteristics from the generated electrical signals, such as impedance, varying capacitance, and conductivity, would be a highly interesting research direction for the classification of diseases in plants and crops.

Conclusions
Crop diseases are one of the main challenges in the farming sector. Thus, there is a need to identify crop diseases at the earliest stage to lessen disease severity and to curb disease propagation on farms. Accordingly, prominent and advanced research has been conducted in recent years on several kinds of disease identification techniques, as presented in this work. The main difference between other surveys and the present paper is the thorough technical analysis of the individual papers, and the approaches that have been applied to date. This provides a guideline and references to scientific communities. This paper also provides readers with insights into the automatic crop disease detection process and the key factors, namely the lack of sharp edges around the symptoms; fluctuating imaging conditions; variable symptoms presented by diseases; similar symptoms presented by different disorders; and the concomitant presence of symptoms arising from various disorders. These issues have a relevant impact on the effectiveness of both the image processing methods and the analytical tools that have been introduced to date. From this survey, it is concluded that image preprocessing directly impacts the segmentation process. Moreover, the k-means clustering algorithm was found to be the most suitable technique for segmenting disease-affected leaves. In addition, convolutional neural network (CNN) models were revealed to be extremely powerful and proficient in locating visual patterns in images. Notably, the use of computer vision and artificial intelligence in crop diagnostics in the agricultural sector is still recent, which implies that their numerous alternatives and opportunities remain to be explored, which may help mitigate the above-mentioned challenges. Additionally, with the increase in available computing power, previously demanding strategies can now be easily executed. Thus, based on this in-depth study of the existing literature on crop foliar disease automatic detection, in upcoming work the researchers intend to develop an efficient, accurate, low-cost, and swift system capable of identifying crop diseases from foliar images. In addition, this identifying system will be implemented in a mobile application, allowing an alert to be sent to the farmer once the disease is detected to enable him to intervene as soon as possible.
Supplementary Materials: The following are available online at https://www.mdpi.com/article/ 10.3390/agriculture12010009/s1, Figure S1: Difference between traditional machine learning and deep learning; Figure S2: PRISMA 2020 flow diagram for new systematic reviews which included searchers of databases and registers only.

Acknowledgments:
We are grateful to the reviewers for their work and valuable comments that helped us improve the quality of this manuscript.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used throughout this manuscript.