## 5 Discussion
It was used in 24.4% (11/45) of the studies. In sequence, 8.9% (4/45) of the studies used the Kaggle dataset. Other datasets were also used, each one in one study: PlantDoc Middlebury dataset, Heilongjiang Academy of Land Reclamation Sciences--China, Plant health, NBAIR dataset, Xie1 and Xie2 dataset, Coffee Leaf dataset, PlantPathology, CIFAR-10 dataset and a dataset from paddy farmlandssituated at UAS, India. A significant number of studies, 46.7% (21/45), used self-collected datasets. Three studies did not provide information about the datasets used. Regarding the algorithm or models most used (RQ5), the review shows that CNN models are the most commonly used for research or studies in this area. About 54.2% (26/48) of the studies refer to CNN models, namely Faster R-CNN, EfficientNet, VGG, GoogleNet, MobileNet, ResNet, AlexNet, LeNet, and DenseNet. Next, 16.7% (8/48) of studies used the SVM classifier, 8.3% (4/48) used the k-NN algorithm, Random Forest is used in 8.3% (4/48), 4.2% (2/48) used ANN classifiers. Some studies proposed approaches with the following algorithms: YOLOv4, ORB algorithm, RSC (Random Subspace Classifier), LIRA (Limited Receptive Area), K-Means Clustering, Decision Trees, MIB Classifier, GAN modules, and Enhanced Fusion Fractal Texture Analysis. The level of accuracy achieved in detecting, identifying, and classifying diseases or pests in agricultural crops (RQ6) depends on several factors, namely the crop and the diseases and pests considered. Higher levels of accuracy were achieved in the three crops mentioned in the studies. In the first case, tomato crops, where the highest precisions were found to vary from 90.3% to 99.89%. Next, in the second case, the citrus crop, for which accuracies vary from 88.96% to 98%. Finally, the accuracy in the potato crop varies from 89% to 97%. It is also essential to keep in mind that these values depend on the disease or pest being studied. This review allowed us to identify some trends that have been observed either because they are used in a significant number of studies or because there has been a growing interest in their use over the years (RQ7). CNN-based algorithms tend to be the most commonly used to achieve the objectives in this area (see Figure 3 left). ML-based approaches are becoming popular in developing solutions for plant diseases and pest detection. Approximately 93.8% (45/48) of the studies in this review proposed ML-related approaches. In addition, the number of articles related to ML-based approaches tends to increase yearly, indicating its popularity and may grow even more. A deeper analysis shows that in the last decade, the most-used algorithms began to be cited in studies from 2017 onwards. An increase in CNN over the other algorithms was subsequently noticed (see Figure 3, right). Accuracy highly depends on the crops, diseases, and pests considered, the algorithms used, and the datasets used. However, the results show that it is possible to achieve very high levels of accuracy in some diseases and pests in several crops. This indicates that these approaches can be used in applications that can be used in natural environments. Most of the datasets represent images of leaves taken with cameras, where the leaves are the central object of the photo, although the backgrounds can vary. This means that the training and validation of the solutions are carried out based on images that are obtained in scenarios in which a user will have to approach the tree, bring the camera closer to the leaf and take the picture, which is not always consistent with a use in a realistic scenario. There are still very few cases in which the images are obtained using cameras on land or in air vehicles, which would represent a step forward in obtaining solutions that are more adequate to the reality of agricultural crops. However, this type of approach could be important in the future since  
Figure 3: (**Left**) Most used models. (**Right**) Most used models over the years.