journal article·2025-05-12Open access

Improving Classification Performance by Addressing Dataset Imbalance: A Case Study for Pest Management

Antonello Longo, Maria Rizzi, Cataldo Guaragnella

Applied Sciences· Volume 15· Issue 10

Abstract

Imbalanced data are a non-trivial problem in deep learning. The high variability in the number of samples composing each category might force learning procedures to become biased towards classes with major cardinality and disregard classes with low instances. To overcome such limitations, common strategies involve data balancing using resampling techniques. The cardinality of overnumbered categories is often lowered by sample deletion, thus reducing the data space where the model can learn from. This paper introduces a new approach based on data balancing without sample deletion, allowing for biasing reduction in instance localization and classification tasks. The method is a multi-stage pipeline starting with data cleaning and data filtering steps and ending with the actual data balancing process, during which overnumbered samples are not deleted but divided into multiple sub-classes. In this way, the model can learn from balanced data distribution in which some classes have a high correlation factor. To evaluate the effectiveness of the method in real-life scenarios, a case study in the field of precision agriculture has been developed, motivated by the fact that the publicly available datasets for pest classification often reflect the real-world imbalanced distribution of pests, making the task challenging. Two models for the localization and recognition of pests belonging to several species are also indicated. The obtained results show the method’s validity as the performance both in the detection and classification tasks outperforms the state-of-the-art methods. The general nature of the conceived balancing technique may make the approach useful in other application fields.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Imbalanced Data Classification Techniques · Smart Agriculture and AI

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Department of Electrical and Information Engineering (DEI), Politecnico di Bari, Via Edoardo Orabona 4, 70126 Bari, Italy

Funding

Italian Apulian Region

References (55)

Show source-provided references
1. Management practices influence biocontrol potential of generalist predators in maize cropping systems10.1111/eea.13395 ↗
2. Deep learning for precision agriculture: A bibliometric analysis
3. Mamdouh, N., Wael, M., and Khattab, A. (2022). Artificial intelligence-based detection and counting of olive fruit flies: A comprehensive survey. Cognitive Data Science in Sustainable Computing, Academic Press. Deep Learning for Sustainable Agriculture.10.1016/B978-0-323-85214-2.00012-4 ↗
4. Making sense of Integrated Pest Management (IPM) in the light of evolution10.1111/eva.13067 ↗
5. Fruit fly automatic detection and monitoring techniques: A review10.1016/j.atech.2023.100294 ↗
6. Insect pest monitoring with camera-equipped traps: Strengths and limitations10.1007/s10340-020-01309-4 ↗
7. Teixeira, A.C., Ribeiro, J., Morais, R., Sousa, J.J., and Cunha, A. (2023). A systematic review on automatic insect detection using deep learning. Agriculture, 13.10.3390/agriculture13030713 ↗
8. Spelmen, V.S., and Porkodi, R. (2018, January 1–3). A review on handling imbalanced data. Proceedings of the 2018 International Conference on Current Trends Towards Converging Technologies (ICCTCT), Coimbatore, India.10.1109/ICCTCT.2018.8551020 ↗
9. An efficient mobile model for insect image classification in the field pest management
10. Large scale pest classification using efficient Convolutional Neural Network with augmentation and regularizers10.1016/j.compag.2022.107204 ↗
11. Faster-PestNet: A Lightweight deep learning framework for crop pest detection and classification10.1109/ACCESS.2023.3317506 ↗
12. Insect pest image detection and recognition based on bio-inspired methods10.1016/j.ecoinf.2020.101089 ↗
13. Li, C., Zhen, T., and Li, Z. (2022). Image classification of pests with residual neural network based on transfer learning. Appl. Sci., 12.10.3390/app12094356 ↗
14. DFF-ResNet: An insect pest recognition model based on residual networks10.26599/BDMA.2020.9020021 ↗
15. Feature reuse residual networks for insect pest recognition10.1109/ACCESS.2019.2938194 ↗
16. Zhou, S.Y., and Su, C.Y. (2020, January 23–25). Efficient convolutional neural network for pest recognition-ExquisiteNet. Proceedings of the 2020 IEEE Eurasia Conference on IOT, Communication and Engineering (ECICE), Yunlin, Taiwan.10.1109/ECICE50847.2020.9301938 ↗
17. Genetic algorithm-based hyperparameter optimization for convolutional neural networks in the classification of crop pests10.1007/s13369-023-07916-4 ↗
18. Custom CornerNet: A drone-based improved deep learning technique for large-scale multiclass pest localization and classification10.1007/s40747-022-00847-x ↗
19. Exploring deep ensemble model for insect and pest detection from images10.1016/j.procs.2023.01.208 ↗
20. Chen, Y., Chen, M., Guo, M., Wang, J., and Zheng, N. (2023). Pest recognition based on multi-image feature localization and adaptive filtering fusion. Front. Plant Sci., 14.10.3389/fpls.2023.1282212 ↗
21. Recognizing pests in field-based images by combining spatial and channel attention mechanism10.1109/ACCESS.2021.3132486 ↗
22. Self-supervised transformer-based pre-training method using latent semantic masking auto-encoder for pest and disease classification10.1016/j.compag.2022.107448 ↗
23. Aa-trans: Core attention aggregating transformer with information entropy selector for fine-grained visual classification10.1016/j.patcog.2023.109547 ↗
24. An ensemble learning integration of multiple CNN with improved vision transformer models for pest classification10.1111/aab.12804 ↗
25. Advanced deep learning model for crop-specific and cross-crop pest identification10.1016/j.eswa.2025.126896 ↗
26. Pest species identification algorithm based on improved YOLOv4 network10.1007/s11760-023-02534-x ↗
27. Zhang, L., Zhao, C., Feng, Y., and Li, D. (2023). Pests identification of ip102 by yolov5 embedded with the novel lightweight module. Agronomy, 13.10.3390/agronomy13061583 ↗
28. YOLOCSP-PEST for Crops Pest Localization and Classification
29. An efficient system for real-time mobile smart device-based insect detection
30. An, J., Du, Y., Hong, P., Zhang, L., and Weng, X. (2023). Insect recognition based on complementary features from multiple views. Sci. Rep., 13.10.1038/s41598-023-29600-1 ↗
31. Qian, Y., Xiao, Z., and Deng, Z. (2025). Fine-grained Crop Pest Classification based on Multi-scale Feature Fusion and Mixed Attention Mechanisms. Front. Plant Sci., 16.10.3389/fpls.2025.1500571 ↗
32. Large-scale insect pest image classification
33. Visual regenerative fusion network for pest recognition10.1007/s00521-023-09173-w ↗
34. Bollis, E., Pedrini, H., and Avila, S. (2020, January 14–19). Weakly supervised learning guided by activation mapping applied to a novel citrus pest benchmark. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, Seattle, WA, USA.10.1109/CVPRW50498.2020.00043 ↗
35. Khan, M.K., and Ullah, M.O. (2022, January 17–19). Deep transfer learning inspired automatic insect pest recognition. Proceedings of the 3rd International Conference on Computational Sciences and Technologies. Mehran University of Engineering and Technology, Jamshoro, Pakistan.
36. SMOTE: Synthetic minority over-sampling technique10.1613/jair.953 ↗
37. SMOTE-FRST: A new resampling method using fuzzy rough set theory10.1142/9789814417747_0128 ↗
38. A combined SMOTE and PSO based RBF classifier for two-class imbalanced problems10.1016/j.neucom.2011.06.010 ↗
39. Gurcan, F., and Soylu, A. (2024). Synthetic Boosted Resampling Using Deep Generative Adversarial Networks: A Novel Approach to Improve Cancer Prediction from Imbalanced Datasets. Cancers, 16.10.3390/cancers16234046 ↗
40. CTGAN-MOS: Conditional generative adversarial network based minority-class-augmented oversampling scheme for imbalanced problems10.1109/ACCESS.2023.3303509 ↗
41. Ai, Q., Wang, P., He, L., Wen, L., Pan, L., and Xu, Z. (2023, January 25–27). Generative oversampling for imbalanced data via majority-guided VAE. Proceedings of the International Conference on Artificial Intelligence and Statistics. PMLR, Valencia, Spain.
42. Towards a holistic view of bias in machine learning: Bridging algorithmic fairness and imbalanced learning10.1007/s44248-024-00007-1 ↗
43. Adiputra, I.N.M., Lin, P.C., and Wanchai, P. (2025). The Effectiveness of Generative Adversarial Network-Based Oversampling Methods for Imbalanced Multi-Class Credit Score Classification. Electronics, 14.10.3390/electronics14040697 ↗
44. Wu, X., Zhan, C., Lai, Y.K., Cheng, M.M., and Yang, J. (2019, January 16–20). Ip102: A large-scale benchmark dataset for insect pest recognition. Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA.10.1109/CVPR.2019.00899 ↗
45. Terven, J., Córdova-Esparza, D.M., and Romero-González, J.A. (2023). A comprehensive review of yolo architectures in computer vision: From yolov1 to yolov8 and yolo-nas. Mach. Learn. Knowl. Extr., 5.10.3390/make5040083 ↗
46. Sohan, M., Sai Ram, T., and Rami Reddy, C.V. (2024). A review on yolov8 and its advancements. Proceedings of the International Conference on Data Intelligence and Cognitive Informatics, Springer.10.1007/978-981-99-7962-2_39 ↗
47. Lin, T.Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., and Zitnick, C.L. (2014, January 6–12). Microsoft coco: Common objects in context. Proceedings of the Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland. proceedings, part v 13.10.1007/978-3-319-10602-1_48 ↗
48. Ciaglia, F., Zuppichini, F.S., Guerrie, P., McQuade, M., and Solawetz, J. (2022). Roboflow 100: A rich, multi-domain object detection benchmark. arXiv.
49. Comparative performance of YOLOv8, YOLOv9, YOLOv10, YOLOv11 and Faster R-CNN models for detection of multiple weed species10.1016/j.atech.2024.100648 ↗
50. Shobaki, W.A., and Milanova, M. (2025). A comparative study ofYOLO, SSD, Faster R-CNN, and more for optimized eye-gaze writing. Sci, 7.10.3390/sci7020047 ↗
51. Orchi, H., Sadik, M., Khaldoun, M., and Sabir, E. (2023, January 19–23). Real-time detection of crop leaf diseases using enhanced YOLOv8 algorithm. Proceedings of the 2023 International Wireless Communications and Mobile Computing (IWCMC), Marrakesh, Morocco.10.1109/IWCMC58020.2023.10182573 ↗
52. Wang, X., Gao, H., Jia, Z., and Li, Z. (2023). BL-YOLOv8: An improved road defect detection model based on YOLOv8. Sensors, 23.10.3390/s23208361 ↗
53. Yun, S., Han, D., Oh, S.J., Chun, S., Choe, J., and Yoo, Y. (November, January 27). Cutmix: Regularization strategy to train strong classifiers with localizable features. Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea.
54. Liang, H., Li, N., and Zhao, S. (2021). Salt and pepper noise removal method based on a detail-aware filter. Symmetry, 13.10.3390/sym13030515 ↗
55. An effective method for salt and pepper noise removal based on algebra and fuzzy logic function10.1007/s11042-023-15469-9 ↗