Next Article in Journal
Drought Characteristics during Spring Sowing along the Great Wall Based on the MCI
Previous Article in Journal
Biochar Applied in Places Where Its Feedstock Was Produced Mitigated More CO2 Emissions from Acidic Red Soils
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Performance Analysis of YOLO and Detectron2 Models for Detecting Corn and Soybean Pests Employing Customized Dataset

by
Guilherme Pires Silva de Almeida
1,*,
Leonardo Nazário Silva dos Santos
2,
Leandro Rodrigues da Silva Souza
3,
Pablo da Costa Gontijo
3,
Ruy de Oliveira
1,
Matheus Cândido Teixeira
1,
Mario De Oliveira
4,
Marconi Batista Teixeira
3 and
Heyde Francielle do Carmo França
3
1
Instituto Federal de Educação, Ciência e Tecnologia de Mato Grosso (IFMT), Cuiabá 78005-200, Brazil
2
Instituto Federal de Educação, Ciência e Tecnologia do Espírito Santo (IFES), Santa Teresa 29660-000, Brazil
3
Instituto Federal Goiano (IFGoiano), Campus Rio Verde, Rio Verde 75901-970, Brazil
4
College of Engineering, Birmingham City University, Birmingham B4 7XG, UK
*
Author to whom correspondence should be addressed.
Agronomy 2024, 14(10), 2194; https://doi.org/10.3390/agronomy14102194
Submission received: 23 August 2024 / Revised: 13 September 2024 / Accepted: 19 September 2024 / Published: 24 September 2024
(This article belongs to the Section Precision and Digital Agriculture)

Abstract

:
One of the most challenging aspects of agricultural pest control is accurate detection of insects in crops. Inadequate control measures for insect pests can seriously impact the production of corn and soybean plantations. In recent years, artificial intelligence (AI) algorithms have been extensively used for detecting insect pests in the field. In this line of research, this paper introduces a method to detect four key insect species that are predominant in Brazilian agriculture. Our model relies on computer vision techniques, including You Only Look Once (YOLO) and Detectron2, and adapts them to lightweight formats—TensorFlow Lite (TFLite) and Open Neural Network Exchange (ONNX)—for resource-constrained devices. Our method leverages two datasets: a comprehensive one and a smaller sample for comparison purposes. With this setup, the authors aimed at using these two datasets to evaluate the performance of the computer vision models and subsequently convert the best-performing models into TFLite and ONNX formats, facilitating their deployment on edge devices. The results are promising. Even in the worst-case scenario, where the ONNX model with the reduced dataset was compared to the YOLOv9-gelan model with the full dataset, the precision reached 87.3%, and the accuracy achieved was 95.0%.

1. Introduction

Securing enough food to satisfy the growing needs of the global population will be one of the most critical challenges facing humanity in the future. The world population is expected to reach 9 billion by 2050 [1], imposing on global leaders the challenge of increasing agricultural production sustainably. However, there are several factors that have impacted food production to meet global demand, such as forest preservation, scarcity of productive areas, soil degradation in cultivated areas [2,3], decrease in water resources [4], resistance to agricultural pesticides [5] and attack by insect pests [6].
In Brazil, agriculture contributed 25% to the gross domestic product (GDP) [7], with a production in the 2022/2023 harvest season of 320 million tons of grains [8]. Notably, soybean and corn production plays a pivotal role, and they are cultivated across several regions [7]. Historically, soybean production in the 2000s was 41.9 million tons, but currently, these numbers have more than tripled, reaching 154.6 million tons. Meanwhile, corn production during the same period increased from 35.2 to 131.9 million tons [8].
For example, agribusiness in Mato Grosso state represents 56.6% of the state’s GDP, and so, it is crucial to maintain or increase productivity. The 2022/2023 corn harvest yielded 50,731.2 tons [9], while during the same period, soybean production reached 45,316,887 tons [10]. The production of these grains is important for the state’s economy and the entire production chain.
Given the above figures, it is evident that Brazil has established itself in the international market as one of the largest producers and exporters of agricultural products [11,12]. Therefore, it is necessary to invest in new technologies to maintain productivity and maximize profits. The major challenge is to achieve higher production per planted hectare and reduce the use of agricultural inputs for weed and pest control [13].
To maintain Brazil’s status as one of the world’s leading agricultural producers and enhance profitability for farmers, the integration of computing technology in agriculture is essential. Leveraging such technology can provide valuable information to support informed decision making and drive efficiency in farming practices [14,15,16]. Within the technological realm, computer vision is a highly promising technology [17] that has been applied in various areas of the production process to solve different problems, such as yield prediction [18,19,20,21,22], disease detection [23,24,25,26], weed detection [27,28,29], pest insect detection [30,31,32,33,34,35,36,37], species recognition [38,39,40], crop improvement [41,42], water resource utilization [43,44,45] and soil management [46,47].
In recent years, studies have advanced in the use of deep-learning techniques in conjunction with computer vision technologies applied to agriculture [48,49,50,51]. Among the available systems, You Only Look Once (YOLO) and Detectron2 stand out, with advanced capabilities for real-time target detection, efficiency, accuracy and speed [52,53,54]. These technologies have been utilized for pest control, which can result in decreased production and increased prices of the product and its derivatives [55,56,57]. Using such technologies to develop automated systems or platforms toward detecting and identifying insect species in crops in real time, before populations escalate, could offer significant advantages.
Deep learning (DL)-based solutions excel at object detection and identification with high precision and speed. These solutions leverage the knowledge gained from previously trained neural networks to expedite the training process for new applications [58,59,60,61]. To achieve this, however, a proper, structured dataset containing images of the objects to be detected is essential, which demands a great deal of effort and knowledge to be accomplished [62].
Driven by the need for more shared and categorized datasets for agricultural research, Yuzhen Lu et al. [48] address a significant gap in the precision agriculture literature by compiling publicly available image datasets used in computer vision applications since 2015. A total of 34 public image datasets were identified and categorized into three groups based on their purposes: 15 datasets related to weed control, 10 dedicated to fruit detection and the remaining 9 for other applications.
Considering effective approaches that use computer vision to detect insects in crops, YOLO versions 3, 4 and 5 were used by S. Verma et al. [49] for the detection of five other insect species (distinct from the ones addressed here) that also attack soybeans. They concluded that YOLO v4 and YOLO v5 can be applied for the automatic identification of insects in different agricultural crops. Park et al. [30] developed a deep-learning prediction platform on unmanned ground vehicles with three different models for object detection: MRCNN, YOLO v3 and Detectron2. All models achieved satisfactory results in detecting Riptortus pedestris (R. pedestris). The three models showed a mean average precision (mAP) performance of 0.95797, 0.97541 and 0.94435, respectively.
A two-stage classification model, named MaizePestNet, was developed based on EfficientNet-B0 and the Grad-CAM algorithm to locate targets and minimize background interference, thus achieving improved classification performance [50]. A dataset was created that includes 36 common maize pests, such as Spodoptera frugiperda, covering both adult and larval stages. The models proposed by the authors achieved the lowest average accuracy of 83.18%, while the highest average accuracy was 94.22%. This performance surpassed that of the control models ResNet101 and DenseNet161, which had average accuracies of 88.2% and 84.81%, respectively.
Another key issue in this area is the deployment of the aforementioned computer vision models on resource-constrained (edge) devices. This is crucial because such devices offer advantages like lower costs, reduced energy consumption and portability. However, deploying insect detection systems on resource-constrained devices poses a significant challenge due to the limited computational capacity of the equipment and the complexity of the application scenarios. Rustia et al. [40] developed a remote system for continuous monitoring of insect pests in an outdoor mango orchard. The proposed deep-learning algorithm succeeded in recognizing pest insects of various sizes, achieving an F1-Score of 0.96% and an average processing time of 10.93 s on a Raspberry Pi Zero W.
To enable the deployment of large computer vision models on edge devices, frameworks such as ONNX and TFLite [63] have been developed. These frameworks optimize the mathematical functions of the models to fit the constraints of limited hardware. For instance, Lim et al. [64] utilized ONNX to effectively convert models for compatibility with specific frameworks. An integrated framework was developed that allows for exploring and customizing the inference operations of various convolutional neural network (CNN) models on embedded edge devices.
Although the above studies show promising results, there is still a gap to be addressed regarding the size of the dataset required for training the models and the detection capabilities of models converted to ONNX and TFLite formats [63].
In this paper, we created a dataset called AgroInsect, which includes existing images of the following insect species: Diabrotica speciosa, Dalbulus maidis, Diceraeus spp. and Spodoptera frugiperda. From this image collection, we derived a Reduced dataset containing 100 images of each such species. To assess the detection capability of the models according to the dataset size, we utilized Detectron2 and YOLO models (versions v5, v7, v8 and v9 (c and gelan)). The best results from each model combined with the dataset were converted to ONNX and TFLite formats to evaluate detection performance. Effective detection with these converted models paves the way for their use in devices with limited computational resources, such as smartphones and microcontrollers, and facilitates the development of low-cost applications capable of autonomous operation. Compared to previous studies, our research delves into the challenges of testing models with reduced datasets, allowing for the incorporation of new insect species into detection models with a limited number of samples. This study is expected to advance the development of insect detection applications on resource-constrained devices.
The remainder of this paper is organized as follows. The Section 2 details the development process, including dataset creation, model selection, model conversion and evaluation metrics. Section 3 provides the evaluation results. In Section 4, we present and discuss the main findings. Finally, the Section 5 outlines the key insights and suggests directions for future research.

2. Materials and Methods

2.1. Dataset Acquisition

Four economically significant pest insects found in corn and soybean crops in the State of Mato Grosso were selected for this study, as presented in Figure 1: Diabrotica speciosa [65,66,67], Dalbulus maidis [68,69], Diceraeus spp. [67,70,71,72,73], Spodoptera frugiperda [55,67,74,75,76].
To ensure the reliability of the data used and the four evaluated species, a total of 1510 images were gathered. One part of these images was sourced from the iNaturalist database (inaturalist.org) [77,78], and another part was captured in the field by the authors themselves and validated by entomology experts.

Compilation of the AgroInsect Dataset

The object detection methods used in the experiments conducted in this work require image annotations for supervised learning. These annotations include information about the region of interest (ROI), classification target and class information [79,80].
To test the efficiency of Detectron2 and the YOLO family, the AgroInsect dataset was created, encompassing 1510 images. From this dataset, a subset of images for training was extracted and is referred to in this work as the Reduced dataset. Many existing works use random selection of the images in the dataset for training, validation and test images [38,49,67]. However, one of the goals of this work was to measure the detection capability of different models. To ensure that all models were trained under the same conditions, the first one hundred images from each class were selected for use in all training sessions with the Reduced dataset. Training with the AgroInsect dataset was performed using all available images, except those selected for validation and testing. The same predetermined selection criterion was applied to the choice of the fifteen validation images and the twenty-five test images. All models trained with both datasets were tested with the same images to avoid any results being influenced by image complexity or other factors. All the evaluated models were able to make successful inferences on images featuring multiple insects or different classes. However, to simplify the interpretation of test results for each class in the confusion matrix, we used only images containing a single insect. Table 1 presents the number of images and annotations for each class in the AgroInsect and Reduced datasets, respectively. The difference between the number of images and annotations is due to some images containing more than one insect of the same species (one annotation per insect); however, this situation did not occur with the images and annotations used for validation and testing, since we chose here only images with a single insect.
Annotations for the 1510 images were created using Label Studio version 0.9.1, an open-source software that stores annotations in JSON format within an SQLite or PostgreSQL database. The software allows exporting to different formats [81]. After annotating and labeling all images, they were exported to the YOLO format with the configuration [class_id x, y, w, h]. These parameters are used to represent an object in a computer vision system. The annotation files were saved with the same names as the images, and the configurations for the file paths that feed the model (training/validation/test) were saved in a YAML file.

2.2. Training Methods

The Detectron2 used in this research is an updated version of the original Detectron framework, developed and presented by Facebook AI Research on 9 October 2019. This new version focuses primarily on object detection and instance segmentation tasks. The deep-learning library used was PyTorch, enabling integration with other neural network architectures. Detectron2 utilizes pretrained models with large image datasets [82,83].
YOLO emerges as an innovative model for object detection, offering a unified and efficient solution for use in computer vision. Its simplicity in construction and direct training on complete images set it apart from traditional approaches, making it ideal for real-time applications. Unlike classifier-based methods, which operate in separate stages, YOLO stands out with its unique architecture. The model is trained on a single loss function directly related to detection performance, optimizing the process and ensuring accurate results. It is recognized as the fastest general-purpose object detector in the literature, paving the way for a range of innovative applications. Its ability to operate in real time and adapt to different scenarios makes it ideal for a wide range of applications in areas such as security, industry, medicine, agriculture and transportation [52].
The models were tested using the two datasets created (AgroInsect and Reduced) and included YOLO models (v5, v7, v8 and v9, both c and gelan versions). The models that demonstrated the best precision were then converted to ONNX and TFLite formats, which are optimized for deployment on devices with limited computational resources. As the algorithms to convert YOLO version 9 (c and gelan) to the TFLite and Detectron2 to ONNX and TFLite are not yet publicly available, they were not converted.
The training of the models was conducted using Google Colab [84,85], a cloud-based notebook service provided by Google, which allows writing and executing Python code directly in the browser and provides graphics processing units (GPUs) and tensor processing units (TPUs) to accelerate machine-learning and deep-learning tasks. Using Google Colab enables researchers to conduct evaluations without the need to purchase acceleration hardware. The configuration used for training and inference in this research included a T4 GPU accelerator (Nvidia, Santa Clara, CA, USA), with data integration saved in Google Drive.

2.3. Conversion Methods to ONNX and TFLite

The conversion of YOLO models to ONNX or TFLite formats offers several advantages, including portability, efficiency and integration with a wide range of platforms and devices [64,86,87]. Given these benefits, the models were converted to ONNX and TFLite formats after the initial training with the selected datasets. It is noteworthy that version 7 required more effort during the conversion process, as it did not have a standard implementation in the file available on the GitHub repository. Additionally, versions 9 were converted only to ONNX, as TFLite was not available at the time of this research work.

2.4. Models’ Parameters and Evaluation Metrics

The models used in this paper involve numerous hyperparameter settings. However, the aim of the research was not to evaluate the effectiveness of different configurations but to assess the model’s ability to correctly detect pest insects. To this end, some adjustments were made to the default settings of the models, as detailed in Table 2, which also provides information on several important parameters for the networks. It is worth noting that Detectron2 works with a very small learning rate to converge efficiently.
In this research, precision (P), accuracy (A), recall (R), F1-Score (f1) and confusion matrix are used to measure the model’s performance [88,89,90]. Python scripts were developed in Colab to collect the data resulting from inferences on the 100 test images. These data were saved in a CSV file, which was then exported to a Windows machine and processed with additional Python scripts in Visual Studio Code. The metric results were saved in spreadsheets for discussion.
To understand the results, it is important to understand the variables: true positive (TP) represents what was correctly predicted; true negative (TN) indicates that the model correctly predicted that a class is not present; false positive (FP) occurs when the model makes an incorrect detection; false negative (FN) occurs when the model fails to predict an object in the image.
The model’s precision is calculated by Equation (1), which is the ratio of the number of true positive examples predicted to the total of true positive and false positive predictions.
Precision (P) = TP/TP + FP
The model’s accuracy is the product of all true predictions divided by the total number of predictions, as follows:
Accuracy = (TP + TN)/(TP + FN + TN + FP)
Equation (3) presents the recall, which measures the proportion of true positives correctly identified.
Recall = TP/TP + FN
The F1-Score is a metric that combines precision and recall, expressed in Formula (4).
F1 = 2 × (P × R)/(P + R)
In addition to the metrics presented above, an important tool used in this work to visualize and analyze the performance of neural network models in object detection is the confusion matrix [91,92,93,94]. According to Markoulidakis et al. [95] and Farhadpour et al. [96], this is a powerful tool for analyzing the performance of classification algorithms. Figure 2a,b show the confusion matrix used for binary and multiclass classification problems. Figure 2a displays a confusion matrix for binary classification with dimensions of 2 × 2, having the actual class labels ‘Positive’ and ‘Negative’, and the predicted elements (positive and negative) compared with the actual class labels, resulting in true positives (TPs), true negatives (TNs), false positives (FPs) and false negatives (FNs). On the other hand, the multiclass confusion matrix (Figure 2b) is a structure with dimensions N × N, where N is the number of classes. The predicted values are compared with the actual values and summed at the position (actual class, predicted class). The higher the values of Xn = Yn, the more efficient the model.

3. Results

3.1. Evaluation of the Detectron2 Model in Insect Detection

Figure 3 presents the loss function of Detectron2 trained with both datasets. The value of the loss function gradually decreased as the iterations progressed.
Despite different amounts of data, both models showed a sharp decline in error rate before 2000 epochs, with a less pronounced decline starting around epoch 4000. Figure 3a, which represents training on the Reduced dataset, exhibited a more continuous decline compared to the graph of the AgroInsect dataset.
The decrease in loss score with increasing iterations indicates that the model is learning and improving its object detection performance. The point where the decline slows down signals a decrease in the model’s generalization ability.
The results of the inferences made with the Detectron2 model are presented in Table 3.
The consistency in these values (94.23% for precision, recall and F1-Score) suggests that the model is well balanced in its ability to correctly identify positive and negative classes. The high accuracy of 97.69% indicates that, in addition to being good at correctly predicting the positive class, the model also classifies samples from the negative classes correctly. The decrease from 94.23% to 94.17% in precision, recall and F1-Score metrics was minimal, indicating that the model’s performance remained almost unchanged even with the dataset reduction. Similarly, the accuracy variation was also very small, decreasing from 97.69% to 97.67%.
Figure 4 illustrates the performance of the inference conducted using the Detectron2 model applied to the four types of insects investigated in this study. The figure clearly demonstrates the model’s ability to accurately identify and classify the insects in the images from the datasets used. It was observed that the model was able to accurately predict the presence of insects in both training datasets, highlighting its robustness and reliability. Additionally, the analysis revealed that the model performed consistently across all variations in these insect images. These observations suggest that Detectron2 is effective for insect detection tasks, underscoring its utility for practical applications in pest monitoring.
The confusion matrix (Figure 5) for Detectron2 with the two datasets shows high performance. The model had no difficulty in locating the insects; however, the best results were obtained for the Dalbulus and Spodoptera frugiperda classes, with all samples being detected.

3.2. Evaluation of the YOLO Model for Insect Detection

Table 4 presents the versions of the YOLO model used in this study along with the sizes of the original model and the sizes after training with the datasets (AgroInsect/Reduced). The reduction in model complexity, fewer parameters to adjust, more effective regularization and reduction in data diversity contribute to the model size reduction. After training with the Reduced dataset, the YOLOv5, YOLOv8 and YOLOv9-c versions showed a decrease in size compared to the original model. The increase in the size of the YOLOv7 and YOLOv9-gelan models following training may be due to a combination of factors, including modifications to the model architecture, more detailed storage of weights and parameters and the complexity of the training data. The models might have stored weights with higher precision or in different formats, leading to a larger file size. When models use higher precision for weight representation, this can significantly contribute to increasing the final model size.
Table 5 shows the performance metrics, including precision, recall, F1-Score and accuracy, for different versions of YOLO models evaluated on the two distinct datasets.
The results show that the YOLOv5 model achieved precision, recall and F1-Score of 85.58% with the Reduced dataset. However, with the AgroInsect dataset, these metrics significantly improved to 98.04%. Accuracy specifically increased from 94.23% to 99.22% when using the complete dataset. YOLOv7 showed similar performance, with precision, recall and F1-Score of 86.67% on the Reduced dataset and 96.12% on the AgroInsect dataset. Accuracy also increased from 94.67% to 98.45% on the AgroInsect dataset. YOLOv8 obtained values of 86.54% for precision, recall and F1-Score with the Reduced dataset and 96.08% with the AgroInsect dataset. The accuracy for this model increased from 94.62% to 98.43% between the two datasets.
The YOLOv9-c model exhibited a slight variation in accuracy from 98.81% to 98.82%, with precision, recall and F1-Score of 97.03% on the Reduced dataset, improving slightly to 97.06% on the AgroInsect dataset.
Finally, YOLOv9-gelan achieved 96.08% in precision, recall and F1-Score with the Reduced dataset and 98.04% with the AgroInsect dataset, with accuracy increasing from 98.43% to 99.22%. Overall, the performance metrics for all YOLO models showed a significant improvement when evaluated with the AgroInsect dataset compared to the Reduced dataset. However, it is important to note that the smaller dataset also yielded satisfactory results, paving the way to its use in resource-constrained devices.
Figure 6 shows the learning curves that outline the training processes of the models over epochs. The optimizer updated the model weights, reducing losses and improving their performances. It is possible to see the model’s learning capacity and potential overfitting or underfitting. Figure 6(a-1) presents the learning curves (total loss) for all YOLO models trained with the Reduced dataset, while Figure 6(a-2) highlights the class loss. Similarly, Figure 6(b-1) illustrates the box loss, and Figure 6(b-2) shows the class loss for the models trained with the AgroInsect dataset. It can be observed that box, class and objectivity loss decreased over the training time (epoch) as the model learned to locate, identify and detect insects with greater confidence. The YOLOv8, YOLOv9-c and YOLOv9-gelan versions experienced early stopping, halting training when the model showed no sign of improvement in the last epochs with the AgroInsect dataset, and with the Reduced dataset, only the YOLOv9 versions experienced this early stopping. This early stopping parameter can be configured, but in this research, the versions used the default setting, considering the last 100 epochs. With the AgroInsect dataset, the selected models performed well in training/learning with faster convergence, without reaching the 300 epochs used in training, except for the YOLOv5s and YOLOv7 models, which went up to the end of the 300 epochs for the insect datasets.
Figure 7a,b present the precision curve during the training of the YOLO models used in this research. The YOLOv7 model, during training on both datasets, showed a later convergence; however, before 100 epochs, it managed to stabilize the precision result. The other models had a faster convergence around epoch number 40, with the result stabilizing until the end of the training, which is very similar to the results presented by Badgujar et al. [62] in a study on insect identification.
Figure 8 illustrates the training graph of the YOLOv5 model over 300 epochs with the Reduced dataset. Despite showing the lowest Precision value among all the values in Table 5, it is observed that the model converged without much fluctuation in box_loss and cls_loss. The Recall values, which measure the model’s ability to find all objects present in the image, reached 80% before 100 epochs.
The YOLOv9-gelan achieved the highest precision among all models and datasets. Figure 9 presents the training results of the model, with a significant drop in box_loss, reaching an mAP@[0.50] above 90% and a Recall metric above 80%. The mAP@[0.50] and Recall are important metrics for evaluating the performance of object detection models, as they measure precision and coverage of detection, respectively.
Figure 10 illustrates the confusion matrix for five YOLO models used in the experimental study, trained with a Reduced dataset to classify four insect classes. It is observed that even in YOLOv5, YOLOv7 and YOLOv8 versions, which did not achieve a precision higher than 90% (Table 5), the false negatives in the last column of each model and false positives in the last row were low.
The YOLOv5s model had the lowest overall precision; however, it correctly classified 22 out of 25 Diabrotica speciosa images used in the test, 1 image as Dalbulus, and it failed to detect 2 images. In the Dalbulus class, 24 images were correctly classified, with four false positives and one false negative, while the other two classes followed a similar pattern with good precision. The standout among the models using the Reduced dataset was the YOLOv9-gelan version, which, out of 100 images used for testing, failed to predict only 2 images and had two false positives for the Dalbulus and Diceraeus classes.
The confusion matrix presented in Figure 11 was used to demonstrate the excellent capability of the YOLO models trained with the AgroInsect dataset. During the evaluation of the YOLOv5s and YOLOv9-gelan models on a test set, a low error rate was observed, with only two false positives recorded. The Dalbulus class presented greater difficulty for all tested models, with two false positives in each case. In summary, the visualization of the confusion matrix provides a more comprehensive understanding of the performance of the object detection models, highlighting the areas of success and opportunities for improvement. Identifying specific error patterns, such as those observed in the Dalbulus class, is crucial for guiding future adjustments and refinements in detection algorithms.
Figure 12 illustrates the performance of YOLOv9-gelan in insect detection, showcasing inference results on eight images from the AgroInsect dataset. Each insect class is represented by two images, highlighting YOLOv9-gelan’s ability to accurately identify insects across various colors and textures.
Table 6 presents a detailed comparison of the performance parameters for five YOLO models after conversion to ONNX and TFLite formats. The models were trained on the two datasets used in this work. The table shows the comparison of precision, recall, F1-Score and accuracy for each model and format combination across both datasets. This comparison highlights variations in model performance based on the dataset and conversion format. Understanding these variations is essential for evaluating the effectiveness of each YOLO version.
The results presented in Table 6 demonstrate that for the Reduced dataset, both YOLOv5 and YOLOv7 achieve consistent performance, with precision, recall and F1-Score of 94.23% and accuracy of 97.69% across ONNX and TFLite formats. In contrast, YOLOv8 shows reduced metrics, with precision, recall and F1-Score of 86.54% and accuracy of 94.62% in the same formats. For the AgroInsect dataset, all models perform better, with YOLOv5 and YOLOv7 reaching 96.15% in precision, recall and F1-Score and accuracy of 98.46%. YOLOv8 also maintains high metrics at 96.12% for precision, recall and F1-Score, with an accuracy of 98.45%. Notably, YOLOv9-c and YOLOv9-gelan exhibit superior results, with YOLOv9-gelan achieving the highest metrics of 98.04% for precision, recall and F1-Score and accuracy of 99.22% on the AgroInsect dataset.
The results of the inferences made with the converted models applied to the test data are presented in Table 6. It is important to note that all metrics for the model/dataset combinations achieved results above 94%, except for the YOLOv8 model applied to the Reduced dataset, which reached 86.54% precision, recall and F1-Score and 94.62% accuracy.
The results for the YOLOv5s model trained with the Reduced dataset and converted to TFLite, and the YOLOv9-gelan model with the AgroInsect dataset and converted to ONNX, can be observed in the confusion matrix (Figure 13).
Figure 14 displays a selection of detection results from the YOLOv5s–TFLite and YOLOv9-gelan–ONNX models, illustrating successful detection across all four challenging categories.

4. Discussion

Data processing is a critical step in supervised deep learning, as feeding irrelevant or incorrect data can significantly affect model performance, as noted by Badgujar et al. [62]. Y. Lu and S. Young [48] reported the scarcity of public image datasets, describing this situation as a crucial bottleneck for rapid prototyping and evaluation of computer vision and machine-learning algorithms applied to agriculture, thus justifying the need for evaluations with smaller datasets, which could facilitate the development of applications without requiring a large dataset. Good precision and accuracy using a dataset with few images pave the way for incorporating new insects into the model without the need for extensive efforts to collect many images and annotations.
During the development of this work, no other dataset with the same insect classes evaluated here was found in the literature. However, to get an idea of the performance of YOLO and Detectron2 algorithms, we compared our results with other papers that we found sufficiently close to our approach, and we summarized them in Table 7. The approach by S. Verma et al. [49] used YOLO versions 4 and 5 for detecting five insects and achieved precisions of 99% and 93.20%, respectively. Considering that our best results were achieved with YOLOv5s and YOLOv9-gelan versions with a precision of 98.04% in both cases, the 0.96% difference between the two evaluations may be associated with the number of images used in training. They used 3710 images, while we only used 1510 images.
The authors Zhang et al. [97], using the YOLOv7 model and the Adam optimizer, achieved a precision of 99.95% for the classification of Diabrotica virgifera, Zea mays, Spodoptera frugiperda and Helicoverpa zea, which is higher than the 98.04% precision obtained by the best models proposed in this study.
As mentioned, good efficiency using a reduced dataset paves the way for incorporating new insects into the model without the need for many samples. The results achieved with the models using the Reduced dataset were superior to those obtained by Yang et al. [98], who achieved a precision of 73.30%, recall of 77.30% and F1-Score of 75.10% in detecting 13 insects. YOLO models (v5, v7, v8) combined with the Reduced dataset achieved precision results close to the 86.8% obtained by Kumar et al. [99] and Slim et al. [102].
Among the training combinations with YOLO versions and the AgroInsect dataset, YOLOv8 provided the worst results, with 96.08% precision, recall and F1-Score and an accuracy of 98.43%. However, these values are higher than those achieved by Bjerge et al. [100], who, among ten models, achieved the best precision at 92.7%, recall at 93.9% and F1-Score at 93.2%.
The results generated with the models applied in this work are consistent with the values from a study on corn earworm (Spodoptera frugiperda) in Chinese cornfields for detection from larval to adult stages presented by Zhang et al. [50], who achieved a good balance between precision and cost, with a precision of 93.51%, recall of 97.14% and F1-Score of 94.68%.
This study is relevant compared to other studies on pest insects attacking soybean crops. In a recent work published by Tetila et al. [67], which aimed to identify 12 different classes, including 2 at two stages (nymph and adult) in the State of Mato Grosso do Sul in Brazil, the best precision achieved was 95.15%.
Another insect detection study with three classes achieved the best precision of 94.14%, recall of 91.99% and F1-Score of 93.05% for the C. medinalis class using YOLO-MPNET with OSW, as reported by Sun et al. [101]. Using the YOLOv5 model, they achieved the best precision of 71.26%, while our work achieved a precision of 85.58% using the same model with a reduced dataset.
With a precision of 94.23% for Detectron2 and 98.04% for YOLOv5s, the models evaluated here demonstrated more consistent results than those presented by Slim et al. [102], who achieved a precision of 86.84% in detecting the Mediterranean fruit fly Ceratitis capitata and the peach fruit fly Bactrocera zonata.
A study conducted for the detection of five classes of insects that attack soybeans in India yielded excellent results, with an accuracy of 97% using CNN and Inceptionv3 models and 98.75% using YOLOv5 in the work presented by Trikey et al. [51]. However, the results achieved in our studies were superior, with YOLOv5s and YOLOv9-gelan models achieving 98.04% accuracy.
The equal value observed in this paper regarding the precision, recall and F1-Score metrics can be explained by the presence of a balanced test set, coupled with the model’s ability to generalize consistently across all classes. This pattern reflects a robust and balanced model performance, suggesting an absence of bias toward any specific class and the ability to make accurate predictions across all categories.
As presented in Figure 5, the confusion matrix demonstrates the models’ ability to correctly detect classes with few false positives and negatives.
To run on edge devices with limited computational resources, the model size can be a determining factor. After analyzing the results of the research published by Ye et al. [103] with a 12 MB model and the data in Table 4, it is evident that there is room for improvement in reducing our model sizes, as our results showed that the YOLOv9-gelan model had a size of 195.2 MB.
As shown in Table 6, with the conversion of the models, YOLO v5, v7 and YOLO 9-gelan with a reduced dataset showed improved accuracies, while v8 maintained results for the smaller dataset and improved with the full dataset. The YOLO 9-c model did not show much variation. Once converted to standard formats, such as ONNX or TFLite, the models can be run on a variety of platforms and devices, including mobile devices, embedded systems and servers. This provides greater flexibility for deploying YOLO models in different environments.

5. Conclusions

This paper presents an approach based on deep-learning models to detect four species of insects found in corn and soybean crops. Our technique evaluates various setups with YOLO and Detectron2 models. In order to render our method deployable in resource-constrained devices, we compared the two mentioned computer vision models on a full (AgroInsect) and a smaller subset (Reduced) dataset and finally converted the best-performing models into TFLite and ONNX formats.
The Detectron2 and YOLO models demonstrated strong performance in detecting and classifying insect species, even when trained with the Reduced dataset. As anticipated, the models performed better with the AgroInsect dataset, but the results with the Reduced dataset were still notable. YOLOv5 achieved an accuracy of 85.58%, YOLOv7 86.67%, YOLOv8 86.54%, YOLOv9-gelan 96.08% and YOLOv9-c 97.03%. For the YOLOv9-c and YOLOv9-gelan models, the accuracy difference between the AgroInsect and Reduced datasets was just 0.03% and 1.96%, respectively. A key finding of this study is that even with a limited number of images for a specific insect, a model can maintain high efficiency and accuracy.
Additionally, YOLOv5 models with a Reduced dataset performed better when converted to TFLite, with a 2.19% decrease in accuracy in comparison to the results with the AgroInsect dataset. For YOLOv7, there was an improvement with the Reduced dataset, while YOLOv8 showed no significant variations. Similarly, the YOLOv9-c and YOLOv9-gelan versions also exhibited minimal variations in results. These outcomes demonstrate that converting YOLO results into TFLite and employing a reduced dataset is a practical and effective approach for deploying insect pest detection on resource-constrained devices.
For future work, we plan to further investigate the effects of varying reduced dataset sizes on model performance and tailor our approach for effective deployment and evaluation on mobile devices. This will involve optimizing our method to perform efficiently on mobile platforms and evaluating its effectiveness in practical, real-world scenarios. We also intend to integrate images from yellow traps, light traps and pheromone traps into our datasets toward evaluating the models’ ability to detect and classify in visually noisier images with other insects.

Author Contributions

Conceptualization, L.N.S.d.S., G.P.S.d.A. and M.B.T.; methodology, L.N.S.d.S., M.B.T., L.R.d.S.S., R.d.O., M.D.O. and G.P.S.d.A.; formal analysis, G.P.S.d.A., P.d.C.G., H.F.d.C.F. and M.C.T.; investigation, G.P.S.d.A., M.C.T. and R.d.O.; resources, M.B.T. and L.N.S.d.S.; writing—preparation of the original draft, G.P.S.d.A.; writing—review and editing, L.N.S.d.S., R.d.O., P.d.C.G., H.F.d.C.F., L.R.d.S.S. and M.D.O.; visualization, L.N.S.d.S. and M.C.T.; supervision, L.N.S.d.S. and M.B.T.; project administration, L.N.S.d.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research get financial support from the Ministry of Science, Technology, and Innovation (MCTI), the Funding Authority for Studies and Projects (FINEP), the Research Support Foundation of the State of Goiás (FAPEG), the National Council for Scientific and Technological Development (CNPq), the Coordination for the Improvement for Higher Level Personnel (CAPES), Center of Excellence in Exponential Agriculture (CEAGRE), the Federal Institute of Education, Science, and Technology Goiano (IF Goiano)—Campus Rio Verde, and Federal Institute of Education, Science, and Technology of Mato Grosso (IFMT).

Data Availability Statement

All the data relevant to this manuscript are available on request from the corresponding author.

Acknowledgments

The authors express gratitude to the institutions mentioned in Funding part.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

References

  1. Barreca, F. Sustainability in Food Production: A High-Efficiency Offshore Greenhouse. Agronomy 2024, 14, 518. [Google Scholar] [CrossRef]
  2. Suzuki, L.E.A.S.; Casalinho, H.D.; Milani, I.C.B. Strategies and Public Policies for Soil and Water Conservation and Food Production in Brazil. Soil Syst. 2024, 8, 45. [Google Scholar] [CrossRef]
  3. Shao, W.; Zhang, Z.; Guan, Q.; Yan, Y.; Zhang, J. Comprehensive assessment of land degradation in the arid and semiarid area based on the optimal land degradation index model. CATENA 2024, 234, 107563. [Google Scholar] [CrossRef]
  4. Rai, G.K.; Magotra, I.; Khanday, D.M.; Choudhary, S.M.; Bhatt, A.; Gupta, V.; Rai, P.K.; Kumar, P. Boosting Drought Tolerance in Tomatoes through Stimulatory Action of Salicylic Acid Imparted Antioxidant Defense Mechanisms. Agronomy 2024, 14, 1227. [Google Scholar] [CrossRef]
  5. Qu, H.-R.; Su, W.-H. Deep Learning-Based Weed–Crop Recognition for Smart Agricultural Equipment: A Review. Agronomy 2024, 14, 363. [Google Scholar] [CrossRef]
  6. Luo, K.; He, D.; Guo, J.; Li, G.; Li, B.; Chen, X. Molecular Advances in Breeding for Durable Resistance against Pests and Diseases in Wheat: Opportunities and Challenges. Agronomy 2023, 13, 628. [Google Scholar] [CrossRef]
  7. Greschuk, L.T.; Demattê, J.A.M.; Silvero, N.E.Q.; Rosin, N.A. A soil productivity system reveals most Brazilian agricultural lands are below their maximum potential. Sci. Rep. 2023, 13, 14103. [Google Scholar] [CrossRef]
  8. Lamas, F.M. Artigo—A Produção Brasileira de Grãos—Salto Quantitativo. Embrapa Noticias. Available online: https://www.embrapa.br/busca-de-noticias/-/noticia/84709032/artigo---a-producao-brasileira-de-graos--salto-quantitativo#:~:text=Estima%2Dse%20para%20o%20ano,distribui%C3%A7%C3%A3o%20de%20chuvas%20em%20outras (accessed on 10 December 2004).
  9. Companhia Nacional de Abastecimento (CONAB). Informações Agropecuárias da Superintendência Regional de Mato Grosso por meio do Setor de Apoio à Logística e Gestão da Oferta (SEGEO). Available online: https://www.conab.gov.br/info-agro/analises-do-mercado-agropecuario-e-extrativista/analise-regional-do-mercado-agropecuario/analise-regional-mt-milho/item/23339-milho-analise-marco-2024 (accessed on 8 May 2024).
  10. Machado, L. IMEA: Estimativas das Safras de Soja e Milho em Mato Grosso São Mantidas. Sociedade Nacional de Agricultura. Available online: https://sna.agr.br/ (accessed on 3 May 2024).
  11. Reis, S.A.D.; Leal, J.E.; Thomé, A.M.T. A Two-Stage Stochastic Linear Programming Model for Tactical Planning in the Soybean Supply Chain. Logistics 2023, 7, 49. [Google Scholar] [CrossRef]
  12. Bordini, J.G.; Ono, M.A.; Hirozawa, M.T.; Garcia, G.T.; Vizoni, E.; Ono, E.Y.S. Safety of Corn and Corn-Based Products Intended for Human Consumption Concerning Fumonisins from a Brazilian Processing Plant. Toxins 2019, 11, 33. [Google Scholar] [CrossRef]
  13. Nath, C.P.; Singh, R.G.; Choudhary, V.K.; Datta, D.; Nandan, R.; Singh, S.S. Challenges and Alternatives of Herbicide-Based Weed Management. Agronomy 2024, 14, 126. [Google Scholar] [CrossRef]
  14. Nawoya, S.; Ssemakula, F.; Akol, R.; Geissmann, Q.; Karstoft, H.; Bjerge, K.; Mwikirize, C.; Katumba, A.; Gebreyesus, G. Computer vision and deep learning in insects for food and feed production: A review. Comput. Electron. Agric. 2024, 216, 108503. [Google Scholar] [CrossRef]
  15. Fracarolli, J.A.; Pavarin, F.F.A.; Castro, W.; Blasco, J. Computer vision applied to food and agricultural products. Rev. Ciênc. Agronômica 2020, 51, e20207749. [Google Scholar] [CrossRef]
  16. Zhai, Z.; Martínez, J.F.; Beltran, V.; Martínez, N.L. Decision support systems for agriculture 4.0: Survey and challenges. Comput. Electron. Agric. 2020, 170, 105256. [Google Scholar] [CrossRef]
  17. Rehman, T.U.; Mahmud, M.S.; Chang, Y.K.; Jin, J.; Shin, J. Current and future applications of statistical machine learning algorithms for agricultural machine vision systems. Comput. Electron. Agric. 2019, 156, 585–605. [Google Scholar] [CrossRef]
  18. Khaki, S.; Pham, H.; Wang, L. Simultaneous corn and soybean yield prediction from remote sensing data using deep transfer learning. Sci. Rep. 2021, 11, 11132. [Google Scholar] [CrossRef] [PubMed]
  19. Sun, J.; Di, L.; Sun, Z.; Shen, Y.; Lai, Z. County-Level Soybean Yield Prediction Using Deep CNN-LSTM Model. Sensors 2019, 19, 4363. [Google Scholar] [CrossRef]
  20. Kim, N.; Ha, K.-J.; Park, N.-W.; Cho, J.; Hong, S.; Lee, Y.-W. A Comparison Between Major Artificial Intelligence Models for Crop Yield Prediction: Case Study of the Midwestern United States, 2006–2015. ISPRS Int. J. Geo-Inf. 2019, 8, 240. [Google Scholar] [CrossRef]
  21. Lu, W.; Du, R.; Niu, P.; Xing, G.; Luo, H.; Deng, Y.; Shu, L. Soybean Yield Preharvest Prediction Based on Bean Pods and Leaves Image Recognition Using Deep Learning Neural Network Combined with GRNN. Front. Plant Sci. 2022, 12, 791256. [Google Scholar] [CrossRef]
  22. Bai, Y.; Yu, J.; Yang, S.; Ning, J. An improved YOLO algorithm for detecting flowers and fruits on strawberry seedlings. Biosyst. Eng. 2024, 237, 1–12. [Google Scholar] [CrossRef]
  23. Ouhami, M.; Hafiane, A.; Es-Saady, Y.; El Hajji, M.; Canals, R. Computer Vision, IoT and Data Fusion for Crop Disease Detection Using Machine Learning: A Survey and Ongoing Research. Remote Sens. 2021, 13, 2486. [Google Scholar] [CrossRef]
  24. Seal, A.K.E.A. SoyNet: Soybean leaf diseases classification. Comput. Electron. Agric. 2020, 172, 105342. [Google Scholar] [CrossRef]
  25. Abbasi, R.; Martinez, P.; Ahmad, R. Crop diagnostic system: A robust disease detection and management system for leafy green crops grown in an aquaponics facility. Artif. Intell. Agric. 2023, 10, 1–12. [Google Scholar] [CrossRef]
  26. Amarasingam, N.; Gonzalez, F.; Salgadoe, A.S.A.; Sandino, J.; Powell, K. Detection of White Leaf Disease in Sugarcane Crops Using UAV-Derived RGB Imagery with Existing Deep Learning Models. Remote Sens. 2022, 14, 6137. [Google Scholar] [CrossRef]
  27. García-Navarrete, O.L.; Correa-Guimaraes, A.; Navas-Gracia, L.M. Application of Convolutional Neural Networks in Weed Detection and Identification: A Systematic Review. Agriculture 2024, 14, 568. [Google Scholar] [CrossRef]
  28. Hasan, A.S.M.M.; Diepeveen, D.; Laga, H.; Jones, M.G.K.; Sohel, F. Object-level benchmark for deep learning-based detection and classification of weed species. Crop Prot. 2024, 177, 106561. [Google Scholar] [CrossRef]
  29. Ahmed, A.M.A.E.K.R. Deep Learning for Detecting and Classifying the Growth Stages of Consolida regalis Weeds on Fields. Agronomy 2023, 13, 934. [Google Scholar] [CrossRef]
  30. Park, Y.-H.; Choi, S.H.; Kwon, Y.-J.; Kwon, S.-W.; Kang, Y.J.; Jun, T.-H. Detection of Soybean Insect Pest and a Forecasting Platform Using Deep Learning with Unmanned Ground Vehicles. Agronomy 2023, 13, 477. [Google Scholar] [CrossRef]
  31. Amrani, A.; Sohel, F.; Diepeveen, D.; Murray, D.; Jones, M.G.K. Insect detection from imagery using YOLOv3-based adaptive feature fusion convolution network. Crop Pasture Sci. 2023, 74, 615–627. [Google Scholar] [CrossRef]
  32. Li, M.; Cheng, S.; Cui, J.; Li, C.; Li, Z.; Zhou, C.; Lv, C. High-Performance Plant Pest and Disease Detection Based on Model Ensemble with Inception Module and Cluster Algorithm. Plants 2023, 12, 200. [Google Scholar] [CrossRef]
  33. Yadav, P.K.; Thomasson, J.A.; Searcy, S.W.; Hardin, R.G.; Braga-Neto, U.; Popescu, S.C.; Martin, D.E.; Rodriguez, R.; Meza, K.; Enciso, J.; et al. Computer Vision for Volunteer Cotton Detection in a Corn Field with UAS Remote Sensing Imagery and Spot Spray Applications. arXiv 2022, arXiv:2207.07334. [Google Scholar]
  34. Chamara, N.; Bai, G.; Ge, Y. AICropCAM: Deploying classification, segmentation, detection, and counting deep-learning models for crop monitoring on the edge. Comput. Electron. Agric. 2023, 215, 108420. [Google Scholar] [CrossRef]
  35. Teixeira, A.C.; Ribeiro, J.; Morais, R.; Sousa, J.J.; Cunha, A. A Systematic Review on Automatic Insect Detection Using Deep Learning. Agriculture 2023, 13, 713. [Google Scholar] [CrossRef]
  36. Kuzuhara, H.; Takimoto, H.; Sato, Y.; Kanagawa, A. Insect Pest Detection and Identification Method Based on Deep Learning for Realizing a Pest Control System. In Proceedings of the 2020 59th Annual Conference of the Society of Instrument and Control Engineers of Japan (SICE), Chiang Mai, Thailand, 23–26 September 2020; pp. 709–714. [Google Scholar] [CrossRef]
  37. Hu, Y.; Li, Z.; Lu, Z.; Jia, X.; Wang, P.; Liu, X. Identification Method of Crop Aphids Based on Bionic Attention. Agronomy 2024, 14, 1093. [Google Scholar] [CrossRef]
  38. Xia, Y.; Wang, Z.; Cao, Z.; Chen, Y.; Li, L.; Chen, L.; Zhang, S.; Wang, C.; Li, H.; Wang, B. Recognition Model for Tea Grading and Counting Based on the Improved YOLOv8n. Agronomy 2024, 14, 1251. [Google Scholar] [CrossRef]
  39. Su, X.; Zhang, J.; Ma, Z.; Dong, Y.; Zi, J.; Xu, N.; Zhang, H.; Xu, F.; Chen, F. Identification of Rare Wildlife in the Field Environment Based on the Improved YOLOv5 Model. Remote Sens. 2024, 16, 1535. [Google Scholar] [CrossRef]
  40. Rustia, D.J.A.; Lee, W.-C.; Lu, C.-Y.; Wu, Y.-F.; Shih, P.-Y.; Chen, S.-K.; Chung, J.-Y.; Lin, T.-T. Edge-based wireless imaging system for continuous monitoring of insect pests in a remote outdoor mango orchard. Comput. Electron. Agric. 2023, 211, 108019. [Google Scholar] [CrossRef]
  41. Zhang, T.; Zhou, J.; Liu, W.; Yue, R.; Yao, M.; Shi, J.; Hu, J. Seedling-YOLO: High-Efficiency Target Detection Algorithm for Field Broccoli Seedling Transplanting Quality Based on YOLOv7-Tiny. Agronomy 2024, 14, 931. [Google Scholar] [CrossRef]
  42. Sheikh, M.; Iqra, F.; Ambreen, H.; Pravin, K.A.; Ikra, M.; Chung, Y.S. Integrating artificial intelligence and high-throughput phenotyping for crop improvement. J. Integr. Agric. 2024, 23, 1787–1802. [Google Scholar] [CrossRef]
  43. Pokhariyal, S.; Patel, N.R.; Govind, A. Machine Learning-Driven Remote Sensing Applications for Agriculture in India—A Systematic Review. Agronomy 2023, 13, 2302. [Google Scholar] [CrossRef]
  44. Bellido-Jiménez, J.A.; Estévez, J.; Vanschoren, J.; García-Marín, A.P. AgroML: An Open-Source Repository to Forecast Reference Evapotranspiration in Different Geo-Climatic Conditions Using Machine Learning and Transformer-Based Models. Agronomy 2022, 12, 656. [Google Scholar] [CrossRef]
  45. Wang, D.; Liu, G.; Xu, Y. Information asymmetry in the graph model of conflict resolution and its application to the sustainable water resource utilization conflict in Niangziguan Springs Basin. Expert Syst. Appl. 2024, 237, 121409. [Google Scholar] [CrossRef]
  46. Cravero, A.; Pardo, S.; Sepúlveda, S.; Muñoz, L. Challenges to Use Machine Learning in Agricultural Big Data: A Systematic Literature Review. Agronomy 2022, 12, 748. [Google Scholar] [CrossRef]
  47. Diaz-Gonzalez, F.A.; Vuelvas, J.; Correa, C.A.; Vallejo, V.E.; Patino, D. Machine learning and remote sensing techniques applied to estimate soil indicators—Review. Ecol. Indic. 2022, 135, 108517. [Google Scholar] [CrossRef]
  48. Lu, Y.; Young, S. A survey of public datasets for computer vision tasks in precision agriculture. Comput. Electron. Agric. 2020, 178, 105760. [Google Scholar] [CrossRef]
  49. Verma, S.; Tripathi, S.; Singh, A.; Ojha, M.; Saxena, R.R. Insect Detection and Identification using YOLO Algorithms on Soybean Crop. In Proceedings of the TENCON 2021—2021 IEEE Region 10 Conference (TENCON), Auckland, New Zealand, 7–10 December 2021; pp. 272–277. [Google Scholar] [CrossRef]
  50. Zhang, H.; Zhao, S.; Song, Y.; Ge, S.; Liu, D.; Yang, X.; Wu, K. A deep learning and Grad-Cam-based approach for accurate identification of the fall armyworm (Spodoptera frugiperda) in maize fields. Comput. Electron. Agric. 2022, 202, 107440. [Google Scholar] [CrossRef]
  51. Tirkey, D.; Singh, K.K.; Tripathi, S. Performance analysis of AI-based solutions for crop disease identification, detection, and classification. Smart Agric. Technol. 2023, 5, 100238. [Google Scholar] [CrossRef]
  52. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar] [CrossRef]
  53. Badgujar, C.M.; Poulose, A.; Gan, H. Agricultural object detection with You Only Look Once (YOLO) Algorithm: A bibliometric and systematic literature review. Comput. Electron. Agric. 2024, 223, 109090. [Google Scholar] [CrossRef]
  54. Tang, Z.; Lu, J.; Chen, Z.; Qi, F.; Zhang, L. Improved Pest-YOLO: Real-time pest detection based on efficient channel attention mechanism and transformer encoder. Ecol. Inform. 2023, 78, 102340. [Google Scholar] [CrossRef]
  55. Costa, E.N.; Fernandes, M.G.; Reis, L.C.; Martins, L.O.; Foresti, A.C.; de Paula Quintão Scalon, S. Above- and belowground resistance in Brazilian maize varieties under attack of Spodoptera frugiperda and Diabrotica speciosa. Entomol. Exp. Appl. 2022, 170, 718–726. [Google Scholar] [CrossRef]
  56. de Camargo Barros, G.S.; de Miranda, S.H.G.; Osaki, M.; Alves, L.R.A.A.; de Oliveira Adami, A.; Nishikawa, M.E. Efeito do não Tratamento de Pragas e Doenças Sobre Preços ao Consumidor de Produtos da Cadeia Produtiva do Milho. CEPEA—Centro de Estudos Avançados em Economia Aplicada, Cepea|Avaliação do Impacto Econômico De Pragas E Doenças|Parte 2, June 2019. Available online: https://www.cepea.esalq.usp.br/upload/kceditor/files/Cepea_EstudoPragaseDoencas_Parte%202.pdf (accessed on 10 January 2024).
  57. de Camargo Barros, G.S.; de Miranda, S.H.G.; Osaki, M.; Alves, L.R.A.A.; de Oliveira Adami, A.; Nishikawa, M.E. Mensuração Econômica da Incidência de Pragas e Doenças no Brasil: Uma Aplicação Para as Culturas de Soja, Milho e Algodão. CEPEA—Centro de Estudos Avançados em Economia Aplicada, CEPEA|Avaliação Do Impacto Econômico de Pragas e Doenças|Parte 1, June 2019. Available online: https://www.cepea.esalq.usp.br/upload/kceditor/files/Cepea_EstudoPragaseDoencas_Parte%201.pdf (accessed on 10 January 2024).
  58. Marengoni, R.R.E.M. A Survey of Transfer Learning for Convolutional Neural Networks. In Proceedings of the 2019 32nd SIBGRAPI Conference on Graphics, Patterns and Images Tutorials (SIBGRAPI-T), Rio de Janeiro, Brazil, 28–31 October 2019; pp. 47–57. [Google Scholar] [CrossRef]
  59. Han, X.; Zhang, Z.; Ding, N.; Gu, Y.; Liu, X.; Huo, Y.; Qiu, J.; Yao, Y.; Zhang, A.; Zhang, L.; et al. Pre-trained models: Past, present and future. AI Open 2021, 2, 225–250. [Google Scholar] [CrossRef]
  60. Iman, M.; Arabnia, H.R.; Rasheed, K. A Review of Deep Transfer Learning and Recent Advancements. Technologies 2023, 11, 40. [Google Scholar] [CrossRef]
  61. Guo, Y.; Shi, H.; Kumar, A.; Grauman, K.; Rosing, T.; Feris, R. SpotTune: Transfer Learning through Adaptive Fine-tuning. arXiv 2018, arXiv:1811.08737. [Google Scholar]
  62. Badgujar, C.M.; Armstrong, P.R.; Gerken, A.R.; Pordesimo, L.O.; Campbell, J.F. Real-time stored product insect detection and identification using deep learning: System integration and extensibility to mobile platforms. J. Stored Prod. Res. 2023, 104, 102196. [Google Scholar] [CrossRef]
  63. Kim, D.-J.S.E.J.-J. A Deep Learning Framework Performance Evaluation to Use YOLO in Nvidia Jetson Platform. Appl. Sci. 2022, 12, 3734. [Google Scholar] [CrossRef]
  64. Lim, S.-H.; Kang, S.-H.; Ko, B.-H.; Roh, J.; Lim, C.; Cho, S.-Y. An Integrated Analysis Framework of Convolutional Neural Network for Embedded Edge Devices. Electronics 2022, 11, 1041. [Google Scholar] [CrossRef]
  65. Mignoni, M.E.; Honorato, A.; Kunst, R.; Righi, R.; Massuquetti, A. Soybean images dataset for caterpillar and Diabrotica speciosa pest detection and classification. Data Brief 2022, 40, 107756. [Google Scholar] [CrossRef] [PubMed]
  66. Marques, G.B.C.; Ávila, C.J.; Parra, J.R.P. Danos Causados Por Larvas E Adultos De Diabrotica Speciosa (Coleoptera: Chrysomelidae) Em Milho. Pesqui. Agropecu. Bras. 1999, 34, 1983–1986. [Google Scholar] [CrossRef]
  67. Tetila, E.C.; da Silveira, F.A.G.; da Costa, A.B.; Amorim, W.P.; Astolfi, G.; Pistori, H.; Barbedo, J.G.A. YOLO performance analysis for real-time detection of soybean pests. Smart Agric. Technol. 2024, 7, 100405. [Google Scholar] [CrossRef]
  68. de Oliveira, C.M.; Frizzas, M.R. Eight Decades of Dalbulus maidis (DeLong & Wolcott) (Hemiptera, Cicadellidae) in Brazil: What We Know and What We Need to Know. Neotrop. Entomol. 2022, 51, 1–17. [Google Scholar] [CrossRef]
  69. Oliveira, C.M.; Molina, R.M.S.; Albres, R.S.; Lopes, J.R.S. Disseminação De Molicutes Do Milho A Longas Distâncias Por Dalbulus Maidis (Hemiptera: Cicadellidae). Fitopatol. Bras. 2002, 27, 91–95. [Google Scholar] [CrossRef]
  70. Perini, C.R.; do Nascimento Machado, D. Application periods against diceraeus (dichelops) melacanthus on maize and their significant response on damage and grain yield in the Brazilian Midwest. Crop Prot. 2023, 172, 106344. [Google Scholar] [CrossRef]
  71. Fernandes, M.G.; Costa, E.N.; Mota, T.A.; Alegre, E.A.; de Sousa, M.F.; Lourenção, A.L.F. Spatial distribution and sequential sampling plan for Diceraeus melacanthus (Hemiptera: Pentatomidae) in maize at the vegetative stage. Crop Prot. 2022, 157, 105988. [Google Scholar] [CrossRef]
  72. Bueno, A.d.F.; Sutil, W.P.; Jahnke, S.M.; Carvalho, G.A.; Cingolani, M.F.; Colmenarez, Y.C.; Corniani, N. Biological Control as Part of the Soybean Integrated Pest Management (IPM): Potential and Challenges. Agronomy 2023, 13, 2532. [Google Scholar] [CrossRef]
  73. de Queiroz, A.P.; Gonçalves, J.; da Silva, D.M.; Panizzi, A.R.; de Freitas Bueno, A. Diceraeus melacanthus (Dallas) (Hemiptera: Pentatomidae) development, preference for feeding and oviposition related to different food sources. Rev. Bras. Entomol. 2022, 66, e20220038. [Google Scholar] [CrossRef]
  74. Triboni, Y.B.; Del Bem Junior, L.; Raetano, C.G.; Negrisoli, M.M. Effect of seed treatment with insecticides on the control of Spodoptera frugiperda (J. E. Smith) (Lepidoptera: Noctuidae) in soybean. Arq. Inst. Biol. 2019, 86, e0332018. [Google Scholar] [CrossRef]
  75. de Araújo, W.A.; Degrande, P.E.; Malaquias, J.B.; Silvie, P.J.; Scoton, A.M.N.; da Silva Pachú, J.K. Cut off Behavior of Spodoptera frugiperda (Smith, 1797) (Lepidoptera: Noctuidae) in Soybean (Glycine max (L.) Merrill) Seedlings. Braz. Arch. Biol. Technol. 2023, 66, e23220386. [Google Scholar] [CrossRef]
  76. Jaramillo-Barrios, C.I.; Quijano, E.B.; Andrade, B.M. Populations of Spodoptera frugiperda (Lepidoptera: Noctuidae) cause significant damage to genetically modified corn crops. Rev. Fac. Nac. Agron.-MedellÃ-N 2019, 72, 8953–8962. [Google Scholar] [CrossRef]
  77. iNaturalist Contributors, iNaturalist. iNaturalist Research-Grade ObservationsiNaturalist.org. 2024. Available online: https://www.inaturalist.org/observations (accessed on 8 January 2024).
  78. Wang, C.; Grijalva, I.; Caragea, D.; McCornack, B. Detecting common coccinellids found in sorghum using deep learning models. Sci. Rep. 2023, 13, 9748. [Google Scholar] [CrossRef]
  79. Prasetyo, E.; Suciati, N.; Fatichah, C. A Comparison of YOLO and Mask R-CNN for Segmenting Head and Tail of Fish. In Proceedings of the 2020 4th International Conference on Informatics and Computational Sciences (ICICoS), Semarang, Indonesia, 10–11 November 2020; pp. 1–6. [Google Scholar] [CrossRef]
  80. Tan, L.; Huangfu, T.; Wu, L.; Chen, W. Comparison of RetinaNet, SSD, and YOLO v3 for real-time pill identification. BMC Med. Inform. Decis. Mak. 2021, 21, 324. [Google Scholar] [CrossRef]
  81. Tkachenko, M.; Malyuk, M.; Holmanyuk, A.; Liubimov, N. Label Studio: Data Labeling Software. 2020. Available online: https://github.com/heartexlabs/label-studio (accessed on 15 December 2023).
  82. Butt, M.; Glas, N.; Monsuur, J.; Stoop, R.; de Keijzer, A. Application of YOLOv8 and Detectron2 for Bullet Hole Detection and Score Calculation from Shooting Cards. AI 2024, 5, 72–90. [Google Scholar] [CrossRef]
  83. Pham, V.; Pham, C.; Dang, T. Road Damage Detection and Classification with Detectron2 and Faster R-CNN. In Proceedings of the 2020 IEEE International Conference on Big Data (Big Data), Atlanta, GA, USA, 10–13 December 2020. [Google Scholar]
  84. Routis, G.; Michailidis, M.; Roussaki, I. Plant Disease Identification Using Machine Learning Algorithms on Single-Board Computers in IoT Environments. Electronics 2024, 13, 1010. [Google Scholar] [CrossRef]
  85. Haq, S.I.U.; Raza, A.; Lan, Y.; Wang, S. Identification of Pest Attack on Corn Crops Using Machine Learning Techniques. Eng. Proc. 2023, 56, 183. [Google Scholar] [CrossRef]
  86. Li, P.; Wang, X.; Huang, K.; Huang, Y.; Li, S.; Iqbal, M. Multi-Model Running Latency Optimization in an Edge Computing Paradigm. Sensors 2022, 22, 6097. [Google Scholar] [CrossRef] [PubMed]
  87. Parra, D.; Sanabria, D.E.; Camargo, C. A Methodology and Open-Source Tools to Implement Convolutional Neural Networks Quantized with TensorFlow Lite on FPGAs. Electronics 2023, 12, 4367. [Google Scholar] [CrossRef]
  88. Ahmad, I.; Yang, Y.; Yue, Y.; Ye, C.; Hassan, M.; Cheng, X.; Wu, Y.; Zhang, Y. Deep Learning Based Detector YOLOv5 for Identifying Insect Pests. Appl. Sci. 2022, 12, 10167. [Google Scholar] [CrossRef]
  89. Kunduraci, D.O.E.M.S. Comparison of Deep Learning Techniques for Classification of the Insects in Order Level With Mobile Software Application. IEEE Access 2022, 10, 35675–35684. [Google Scholar] [CrossRef]
  90. Zhang, L.; Ding, G.; Li, C.; Li, D. DCF-Yolov8: An Improved Algorithm for Aggregating Low-Level Features to Detect Agricultural Pests and Diseases. Agronomy 2023, 13, 2012. [Google Scholar] [CrossRef]
  91. Seidaliyeva, U.; Ilipbayeva, L.; Taissariyeva, K.; Smailov, N.; Matson, E.T. Advances and Challenges in Drone Detection and Classification Techniques: A State-of-the-Art Review. Sensors 2024, 24, 125. [Google Scholar] [CrossRef]
  92. Almalky, A.M.; Ahmed, K.R.; Guzel, M.; Turan, B. An Efficient Deep Learning Technique for Detecting and Classifying the Growth of Weeds on Fields. In Proceedings of the Future Technologies Conference (FTC) 2022; Springer International Publishing: Cham, Switzerland, 2023; Volume 2, pp. 818–835. [Google Scholar]
  93. Wengert, M.; Piepho, H.-P.; Astor, T.; Graß, R.; Wijesingha, J.; Wachendorf, M. Assessing Spatial Variability of Barley Whole Crop Biomass Yield and Leaf Area Index in Silvoarable Agroforestry Systems Using UAV-Borne Remote Sensing. Remote Sens. 2021, 13, 2751. [Google Scholar] [CrossRef]
  94. Choudhury, B.U.; Divyanth, L.G.; Chakraborty, S. Land use/land cover classification using hyperspectral soil reflectance features in the Eastern Himalayas, India. CATENA 2023, 229, 107200. [Google Scholar] [CrossRef]
  95. Markoulidakis, I.; Rallis, I.; Georgoulas, I.; Kopsiaftis, G.; Doulamis, A.; Doulamis, N. Multiclass Confusion Matrix Reduction Method and Its Application on Net Promoter Score Classification Problem. Technologies 2021, 9, 81. [Google Scholar] [CrossRef]
  96. Farhadpour, S.; Warner, T.A.; Maxwell, A.E. Selecting and Interpreting Multiclass Loss and Accuracy Assessment Metrics for Classifications with Class Imbalance: Guidance and Best Practices. Remote Sens. 2024, 16, 533. [Google Scholar] [CrossRef]
  97. Zhang, C.; Hu, Z.; Xu, L.; Zhao, Y. A YOLOv7 incorporating the Adan optimizer based corn pests identification method. Front. Plant Sci. 2023, 14, 1174556. [Google Scholar] [CrossRef]
  98. Yang, S.; Xing, Z.; Wang, H.; Dong, X.; Gao, X.; Liu, Z.; Zhang, X.; Li, S.; Zhao, Y. Maize-YOLO: A New High-Precision and Real-Time Method for Maize Pest Detection. Insects 2023, 14, 278. [Google Scholar] [CrossRef]
  99. Kumar, N.; Nagarathna; Flammini, F. YOLO-Based Light-Weight Deep Learning Models for Insect Detection System with Field Adaption. Agriculture 2023, 13, 741. [Google Scholar] [CrossRef]
  100. Bjerge, K.; Alison, J.; Dyrmann, M.; Frigaard, C.E.; Mann, H.M.R.; Høye, T.T. Accurate detection and identification of insects from camera trap images with deep learning. PLoS Sustain. Transform. 2023, 2, 1–18. [Google Scholar] [CrossRef]
  101. Sun, G.; Liu, S.; Luo, H.; Feng, Z.; Yang, B.; Luo, J.; Tang, J.; Yao, Q.; Xu, J. Intelligent Monitoring System of Migratory Pests Based on Searchlight Trap and Machine Vision. Front. Plant Sci. 2022, 13, 897739. [Google Scholar] [CrossRef]
  102. Slim, S.O.; Abdelnaby, I.A.; Moustafa, M.S.; Zahran, M.B.; Dahi, H.F.; Yones, M.S. Smart insect monitoring based on YOLOV5 case study: Mediterranean fruit fly Ceratitis capitata and Peach fruit fly Bactrocera zonata. Egypt. J. Remote Sens. Space Sci. 2023, 26, 881–891. [Google Scholar] [CrossRef]
  103. Ye, J.L.E.J. Edge-YOLO: Lightweight Infrared Object Detection Method Deployed on Edge Devices. Appl. Sci. 2023, 13, 4402. [Google Scholar] [CrossRef]
Figure 1. Insects selected for the dataset. (a) Diabrotica speciosa; (b) Dalbulus maidis; (c) Diceraeus ssp.; (d) Spodoptera frugiperda.
Figure 1. Insects selected for the dataset. (a) Diabrotica speciosa; (b) Dalbulus maidis; (c) Diceraeus ssp.; (d) Spodoptera frugiperda.
Agronomy 14 02194 g001
Figure 2. Examples of confusion matrices. (a) Confusion matrix for binary classification problem. (b) Confusion matrix for multiclass classification problem.
Figure 2. Examples of confusion matrices. (a) Confusion matrix for binary classification problem. (b) Confusion matrix for multiclass classification problem.
Agronomy 14 02194 g002
Figure 3. Evolution of the loss function of Detectron2 over iterations with training executed on the Reduced dataset (a) and on the AgroInsect dataset (b).
Figure 3. Evolution of the loss function of Detectron2 over iterations with training executed on the Reduced dataset (a) and on the AgroInsect dataset (b).
Agronomy 14 02194 g003
Figure 4. Prediction with Detectron2 and custom dataset. (a) contains the resulting images from the model trained with the Reduced dataset, and in (b), the images are from the AgroInsect dataset.
Figure 4. Prediction with Detectron2 and custom dataset. (a) contains the resulting images from the model trained with the Reduced dataset, and in (b), the images are from the AgroInsect dataset.
Agronomy 14 02194 g004
Figure 5. Confusion matrix of the Detectron2 model trained with the Reduced dataset (a) and the AgroInsect dataset (b). The background includes insects detected where none existed.
Figure 5. Confusion matrix of the Detectron2 model trained with the Reduced dataset (a) and the AgroInsect dataset (b). The background includes insects detected where none existed.
Agronomy 14 02194 g005
Figure 6. Loss curves for YOLO models trained on two different datasets (Reduced dataset and AgroInsect dataset, respectively), where (a-1,b-1) represent the total loss, and (a-2,b-2) represent the class loss.
Figure 6. Loss curves for YOLO models trained on two different datasets (Reduced dataset and AgroInsect dataset, respectively), where (a-1,b-1) represent the total loss, and (a-2,b-2) represent the class loss.
Agronomy 14 02194 g006
Figure 7. Precision curve of YOLO model training: (a) Reduced dataset; (b) AgroInsect dataset.
Figure 7. Precision curve of YOLO model training: (a) Reduced dataset; (b) AgroInsect dataset.
Agronomy 14 02194 g007
Figure 8. Metric curve of YOLOv5s trained with the Reduced dataset.
Figure 8. Metric curve of YOLOv5s trained with the Reduced dataset.
Agronomy 14 02194 g008
Figure 9. Training metrics curve of YOLOv9-gelan: AgroInsect dataset with the best result among model/dataset combinations.
Figure 9. Training metrics curve of YOLOv9-gelan: AgroInsect dataset with the best result among model/dataset combinations.
Agronomy 14 02194 g009
Figure 10. Confusion matrix of YOLO models with Reduced dataset.
Figure 10. Confusion matrix of YOLO models with Reduced dataset.
Agronomy 14 02194 g010
Figure 11. Confusion matrix of YOLO models with AgroInsect dataset.
Figure 11. Confusion matrix of YOLO models with AgroInsect dataset.
Agronomy 14 02194 g011
Figure 12. Insect detection with YOLOv9-gelan: (a) Diabrotica speciosa; (b) Dalbulus maidis; (c) Diceraeus ssp.; (d) Spodoptera frugiperda.
Figure 12. Insect detection with YOLOv9-gelan: (a) Diabrotica speciosa; (b) Dalbulus maidis; (c) Diceraeus ssp.; (d) Spodoptera frugiperda.
Agronomy 14 02194 g012
Figure 13. Confusion matrix of YOLO models: (a) Detection result for YOLOv5s–TFLite with Reduced dataset; (b) Detection result for YOLOv9-gelan–ONNX with AgroInsect dataset.
Figure 13. Confusion matrix of YOLO models: (a) Detection result for YOLOv5s–TFLite with Reduced dataset; (b) Detection result for YOLOv9-gelan–ONNX with AgroInsect dataset.
Agronomy 14 02194 g013
Figure 14. Inferences with ONNX and TFLite: (a) YOLOv5s–TFLite result; (b) YOLOv9-gelan–ONNX result.
Figure 14. Inferences with ONNX and TFLite: (a) YOLOv5s–TFLite result; (b) YOLOv9-gelan–ONNX result.
Agronomy 14 02194 g014
Table 1. Division of datasets for each insect class and their annotations for training and evaluation of deep-learning models.
Table 1. Division of datasets for each insect class and their annotations for training and evaluation of deep-learning models.
DatasetClasses
Diabrotica
speciosa
Dalbulus maidisDiceraeus ssp.Spodoptera
frugiperda
Total
AgroInsectImage5911772483341350
Annotation5992802573581496
ReducedImage100100100100400
Annotation100156104102462
ValidationImage1515151560
Annotation1515151560
TestImage25252525100
Annotation25252525100
Table 2. Some important hyperparameters for configuring the Detectron2 and YOLO models.
Table 2. Some important hyperparameters for configuring the Detectron2 and YOLO models.
ModelDetectron2YOLOv5nYOLOv7YOLOv8YOLOv9-cYOLOV9-gelan
Layers50168106257042
Activation FunctionReLu 1ReLuReLuLeaky R 4Leaky RReLu
Loss FunctionCross-entropyBCE 3Cross-entropyCombined lossDFLDFL 5
OptimizerSGD 2AdamSGDAdamAdamSGD
Learning Rate0.000050.010.010.0010.010.01
Batch Size2161616168
Epochs10.000300300300300300
RegularizationL2L2L2L2L2L2
1 Rectified Linear Unit, 2 Stochastic Gradient Descent, 3 Binary Cross-Entropy, 4 Leaky Rectified Linear Unit, 5 Distillation-Augmented Feature Loss.
Table 3. Metrics per class after inference of test images using the Reduced and AgroInsect datasets with the Detectron2 model.
Table 3. Metrics per class after inference of test images using the Reduced and AgroInsect datasets with the Detectron2 model.
DatasetClassesPrecisionRecallF1-ScoreAccuracy
AgroInsectDiabrotica speciosa92.319694.1297.12
Dalbulus96.1510098.0499.04
Diceraeus1009697.9699.04
Spodoptera frugiperda96.1510098.0499.04
General94.2394.2394.2397.69
ReducedDiabrotica speciosa92.319694.117697.0874
Dalbulus96.1510098.039299.0291
Diceraeus1009295.8398.06
Spodoptera frugiperda100100100100
General94.1794.1794.1797.67
Table 4. Different versions of YOLO and the size of each model after training with specific datasets.
Table 4. Different versions of YOLO and the size of each model after training with specific datasets.
YOLO VersionModelDatasetOriginal Size (MB)Training Size (MB)
YOLOv5YOLOv5nReduced3.93.7
AgroInsect13.8
YOLOv7YOLOv7Reduced72.1284.7
AgroInsect284.7
YOLOv8YOLOv8nReduced6.26
AgroInsect35
YOLOv9YOLOv9-cReduced98.498
AgroInsect98
YOLOv9-gelanReduced49.1195.2
AgroInsect195.2
Table 5. Comparison of model performance metrics based on different training datasets and YOLO versions.
Table 5. Comparison of model performance metrics based on different training datasets and YOLO versions.
YOLO VersionDatasetPrecision %Recall %F1-Score %Accuracy %
YOLOv5Reduced85.5885.5885.5894.23
AgroInsect98.0498.0498.0499.22
YOLOv7Reduced86.6786.6786.6794.67
AgroInsect96.1296.1296.1298.45
YOLOv8Reduced86.5486.5486.5494.62
AgroInsect96.0896.0896.0898.43
YOLOv9-cReduced97.0397.0397.0398.81
AgroInsect97.0697.0697.0698.82
YOLOv9-gelanReduced96.0896.0896.0898.43
AgroInsect98.0498.0498.0499.22
Table 6. Comparison of performance parameters for models converted to ONNX and TFLite.
Table 6. Comparison of performance parameters for models converted to ONNX and TFLite.
ModelDatasetConversionPrecision %Recall %F1-Score %Accuracy %
YOLOv5ReducedONNX94.2394.2394.2397.69
TFLite94.2394.2394.2397.69
AgroInsectONNX96.1596.1596.1598.46
TFLite96.1596.1596.1598.46
YOLOv7ReducedONNX94.2394.2394.2397.69
TFLite94.2394.2394.2397.69
AgroInsectONNX96.1596.1596.1598.46
TFLite96.1596.1596.1598.46
YOLOv8ReducedONNX86.5486.5486.5494.62
TFLite86.5486.5486.5494.62
AgroInsectONNX96.1296.1296.1298.45
TFLite96.1296.1296.1298.45
YOLOv9-cReducedONNX96.9796.0096.4898.25
AgroInsectONNX97.0997.0997.0998.84
YOLOv9-gelanReducedONNX97.0397.0397.0398.81
AgroInsectONNX98.0498.0498.0499.22
Table 7. Comparison of results obtained with the models proposed in this work and those available in the literature, including the number of classes, dataset and metrics.
Table 7. Comparison of results obtained with the models proposed in this work and those available in the literature, including the number of classes, dataset and metrics.
ModelClassesDatasetPrecisionRecallF1-ScoreAccuracy
YOLOv5s4AgroInsect98.04%98.04%98.04%99.22%
YOLOv5s4Reduced85.58%85.58%85.58%94.23%
YOLOv74Reduced86.67%86.67%86.67%94.67%
YOLOv84Reduced86.54%86.54%86.54%94.62%
YOLOv9-gelan4AgroInsect98.04%98.04%98.04%99.22%
Detectron24AgroInsect94.23%94.23%94.23%97.69%
YOLOv5s [49]5-93.20%99.60%96%-
YOLOv4s [49]5-99%93%96%-
YOLOv7-Adam [97]3-99.95%---
Maize-YOLO [98]13-73.30%77.30%75.10%-
New Version-5x [99]7-86.80%88.60%87.80%-
YOLOv3/5 [100]6-92.70%93.90%93.20%-
EfficientNet-Br [50]36-93.51%97.14%94.68%-
YOLOv3 [67]12-95.15%75.79%84.35%72.96%
YOLO-MPNET—OSW [101]3-94.14%91.99%93.05%-
YOLOv5-Modificado [102]2-86.84%84.58%85.69%-
CNN [51]5-97.00%---
InceptionV3 [51]5-97.00%---
YOLOv5 [51]5-98.75%---
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

de Almeida, G.P.S.; dos Santos, L.N.S.; da Silva Souza, L.R.; da Costa Gontijo, P.; de Oliveira, R.; Teixeira, M.C.; De Oliveira, M.; Teixeira, M.B.; do Carmo França, H.F. Performance Analysis of YOLO and Detectron2 Models for Detecting Corn and Soybean Pests Employing Customized Dataset. Agronomy 2024, 14, 2194. https://doi.org/10.3390/agronomy14102194

AMA Style

de Almeida GPS, dos Santos LNS, da Silva Souza LR, da Costa Gontijo P, de Oliveira R, Teixeira MC, De Oliveira M, Teixeira MB, do Carmo França HF. Performance Analysis of YOLO and Detectron2 Models for Detecting Corn and Soybean Pests Employing Customized Dataset. Agronomy. 2024; 14(10):2194. https://doi.org/10.3390/agronomy14102194

Chicago/Turabian Style

de Almeida, Guilherme Pires Silva, Leonardo Nazário Silva dos Santos, Leandro Rodrigues da Silva Souza, Pablo da Costa Gontijo, Ruy de Oliveira, Matheus Cândido Teixeira, Mario De Oliveira, Marconi Batista Teixeira, and Heyde Francielle do Carmo França. 2024. "Performance Analysis of YOLO and Detectron2 Models for Detecting Corn and Soybean Pests Employing Customized Dataset" Agronomy 14, no. 10: 2194. https://doi.org/10.3390/agronomy14102194

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop