Artificial intelligence agritechnology and postharvest management in Uganda: a case of aflatoxin early-detection in groundnuts among small-scale farmers of Teso region.
Loading...
Date
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Nkumba University
Abstract
Introduction: Aflatoxin contamination in groundnuts poses significant risks to food safety, farmer incomes, and export trade, and small-scale farmers in Uganda's Teso region currently lack affordable, reliable postharvest detection techniques. This study developed and evaluated a deep learning-based early-detection model to complement existing Good Agricultural Practices, integrating Artificial Intelligence into postharvest management to improve groundnut quality and food security in Soroti, Serere, and Kaberamaido districts. Methods: This was a purely quantitative study, integrated with Design Science Research principles. Groundnut farmers, processors, researchers, and district leaders in Soroti, Serere, and Kaberamaido were surveyed using stratified sampling to test hypothesised relationships between advanced feature extraction, real-time monitoring and decision support, postharvest management, and aflatoxin contamination detection, analysed via Structural Equation Modelling. In parallel, a deep learning model was developed using the Inception-ResNet-V2 architecture, trained via transfer learning on 1,272 labelled groundnut images (813 training, 204 validation, 255 test), and evaluated using accuracy, precision, recall, F1-score, and AUC-ROC. The model's economic feasibility was assessed through a comparative cost analysis against conventional laboratory detection methods. Results: Advanced feature extraction showed a strong positive correlation with aflatoxin detection (r = 0.766, p < 0.001), and real-time monitoring and decision support a significant correlation (r = 0.675, p < 0.001). Regression analysis confirmed both as substantial predictors of contamination detection (β = 0.491, p < 0.001 and β = 0.291, p < 0.001 respectively), with the structural equation model confirming significant path coefficients for real-time monitoring (0.6285, p < 0.001) and advanced feature extraction (0.1531, p = 0.018). The deep learning model achieved 99.29% accuracy on unseen test data, with AUC scores of 0.98 (Healthy), 1.00 (Moldy), 0.97 (Pest Infested), and 0.99 (Physiological Disorder) across the four groundnut quality categories. Economic analysis showed the model's one-off hardware cost (USD 100–220) compares favourably to per-sample costs of conventional detection methods (USD 20–170), with the hardware cost recovered within two to six avoided laboratory tests.
Conclusion: This study introduces the Sustainable Artificial Intelligence Detection (SAID) model, a validated and economically feasible deep learning tool for early aflatoxin detection in groundnuts. Beyond demonstrating strong technical performance, the study shows that the model's cost structure, a fixed hardware cost with negligible marginal cost per sample, offers a structurally more scalable alternative to conventional laboratory testing for resource-constrained postharvest settings, with direct implications for food safety, agricultural productivity, and technology adoption policy in Uganda's Teso region and comparable smallholder farming contexts. Recommendations: Policymakers and agricultural stakeholders should adopt AI-based detection to complement Good Agricultural Practices, deployed through an extension-worker-mediated pathway, using existing District Agricultural Office networks and collection points, rather than assuming direct farmer-level technology adoption, given the affordability and technical-literacy barriers this study identified. Government and development partners should prioritise subsidised deployment and field validation under variable real-world conditions as the next step toward scaling this approach across Uganda's staple-crop value chains.
Description
A Ph.D. Thesis Submitted to School of Postgraduate Studies and Research in Fulfillment of the Requirement for the Award of Degree of Doctor of Philosophy in Computing of Nkumba University
Citation
Lillian, T. (2026). Artificial intelligence agritechnology and postharvest management in Uganda: a case of aflatoxin early-detection in groundnuts among small-scale farmers of Teso region, Nkumba Univeersity.