## 5 Discussion  
In this section, some details and results of the review are discussed. This discussion will follow the answers to the research questions initially proposed in this review. Although the search strategy considered works published in the last 10 years, after applying the inclusion and exclusion criteria, only studies published since 2017 (last six years) remained to be included in the review. This reveals the interest that this research area has attracted in recent years, but it also indicates that it is still a new area of research. Most of the studies included in the review (43/48-89.6%) describe algorithms and models with a focus on analyzing the performance of these algorithms. Only 10.4% (5/48) of the analyzed studies present applications (web, mobile, or robotic systems) that end users can use. This seems to indicate that a significant part of the research effort has been focused on the study of new algorithms in several crops and on trying to achieve high levels of accuracy. The development and presentation of solutions with applications that can be used by end users in real use environments has been less significant. However, in this case, these approaches may represent solutions that are closer to the reality in which they can be used, and they need to be further investigated and validated in real-world scenarios. There is a significant predominance of ML-based approaches regarding the analyzed algorithms and models. For each of the research questions identified as the target of this study, described in Section 1 below and based on the results of the systematic review (presented earlier), we present answers to each of them below. The review shows that the crops most focused on, in studies of automatic detection of diseases and pests (RQ1), are tomatoes and citrus. Tomato crops are studied in 22.5% (9/40) of the analyzed studies. Citrus was analyzed in 15.0% (6/40) of the studies. Rice, grapes, beans, and corn are in third place, with 7.5% each (3/40). Then come the apple, peach, pepper, cotton, and paddy cultures with 5.0% each (2/40), and lastly follow the cucumber, banana, cassava, peanut, sunflower, herbs, raspberry, strawberry, brinjal, tea, mustard, coffee cultures, soybean, sugar, guava, and lemon with 2.5% (1/40) of the analyzed studies. In this question, only 40 studies were referenced because eight did not have consistent information. The automatic detection of diseases has attracted more attention than the detection of pests (RQ2). The review shows that 85.7% (40/48) of the studies focus on diseases, and 18.8% (9/48) of studies refer to plaques or pests (one of the studies refers to diseases and pests). The most studied diseases were in the tomato crop (the most studied crop): ToLCNDV & ToLCGV (begomovirus infections), early blight, and late blight. For pests or plagues, those most commonly found were wheat mites, wheat aphids, wheat sawflies, and rice plant hoppers. All analyzed studies use images of leaves, fruits, plants, or insects as input to their algorithms for detecting diseases and pests. Leaf images were the most common input for detection/identification/classification (RQ3). The analysis shows that 85.4% (41/48) of the studies refer to this input. Next, it is found that 8.3% (4/48) of the studies refer to insect images and 4.2% (2/48) refer to fruit, and 4.2% (2/48) to plant images. Additionally, practically all algorithms that use images of leaves use images in which the leaf is the main element of the image. Usually, the image of the leaf occupies practically the entire image area. Only a minority of studies use leaf images from vehicles such as UAVs. The datasets used for pest detection include leaf images and insect images from sticky traps. Generally, the analyzed approaches use image datasets to train and validate the proposed algorithms. In these cases, image datasets that are publicly available can be used, or new datasets can be constructed and used. The analysis of the studies revealed that PlantVillage is the most used dataset (RQ4).