An Improved Model for Detecting the Presence of Pesticide Residues in Edible Parts of Tomatoes, Cabbages, Carrots, and Green Pepper Vegetables Using Batch Image Analysis
DOI:
https://doi.org/10.47852/bonviewAIA52024612Keywords:
batch image analysis, single image analysis, pesticide residuesAbstract
In this article, we describe an improved model for batch image analysis of pesticide residues in the edible parts of green peppers,tomatoes, cabbages, and carrots. Our method uses a deep learning–based convolutional neural network (CNN), an advanced image processing, feature extraction, and a dataset of 1,094 photographs collected from Mbarara city markets to accurately identify the presence of pesticides in the edible parts of vegetables. The model employs the following preprocessing techniques, that is, adaptive histogram equalization and Gaussian filtering, to enhance image quality before feature extraction through color analysis, edge detection, and texture measurement using the Gray Level Co-occurrence Matrix. The major improvement in this study was batch image processing, which significantly increases computational efficiency and enables the simultaneous analysis of several images. The CNN design consists of three convolutional layers, with max pooling coming after each layer. A probabilistic output is then generated by two fully connected layers. The other improvement was made on performance where the accuracy, precision, recall, and F1 score of the models particularly ResNet50 and Inception V3 produce dependable results. The accuracy and precision of ResNet50 were 93.2% and 94.0%, respectively. In comparison to the single image processing model for detecting pesticide residues in edible parts of vegetables, this improved model of batch image processing reduced the training time by 40%, demonstrating scalability for bigger datasets. Our results highlight the potential influence of this model on agricultural food safety practices by indicating that it can be used for the quick and extensive identification of pesticide residues. We suggest that future studies concentrate on the possibility of using multispectral photography and real-time apps to automate the identification of pesticide residues in vegetables.
Received: 22 October 2024 | Revised: 2 July 2025 | Accepted: 22 August 2025
Conflicts of Interest
The authors declare that they have no conflicts of interest to this work.
Data Availability Statement
The data that support the findings of this study are openly available in the vegetable chemical residue detection dataset at https://www.kaggle.com/datasets/vegetabledataset/mancozeb-and-other-chemical-residues.
Author Contribution Statement
Nabaasa Evarist: Conceptualization, Methodology, Validation, Writing – original draft, Writing – review & editing, Software, Data curation, Investigation, Formal analysis. Natumanya Deborah: Conceptualization, Validation, Writing – original draft, Writing review & editing, Data curation, Investigation, Project administration, Formal analysis. Mabirizi Vicent: Methodology, Software, Validation, Writing – original draft, Writing – review & editing, Visualization, Software, Investigation, Formal analysis.
Metrics
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Authors

This work is licensed under a Creative Commons Attribution 4.0 International License.