Share
Export Citation
Computer Vision-Based Detection of Aflatoxin in Stacked Corn Kernels Using U-Net
Parenreng M.M.
Proceedings 2025 8th International Seminar on Research of Information Technology and Intelligent Systems Isriti 2025
Abstract
Detecting aflatoxin mold is essential due to the significant health risks posed by contamination in food and feed. Health threats arise not only for animals that consume aflatoxin-contaminated feed but also for humans that consume animals fed with aflatoxin-contaminated feed. This study aims to develop an aflatoxin detection model utilizing smartphone cameras that are easy to operate by farmers and the feed industries. The U-Net model was chosen for its ability to detect small and varied objects. The data set used varied from individual aflatoxin mold seeds to aflatoxin clusters and piles, posing a challenge because of the large background area compared to the aflatoxin objects themselves. The results obtained from the model showed that the U-Net model was able to detect aflatoxin objects in images of stacked corn wells. The PR AUC value of 0.867 shows a good balance between precision and recall. The model demonstrates strong performance in distinguishing between background and aflatoxin objects, as shown by the ROC AUC value of 1.00. The results of the confusion matrix show that the background can be detected well, reaching 100%, but for the detection of aflatoxins, it reaches 82% with 18% of aflatoxins recognized as background. The Dice Coefficient of 0.771 shows that the model is quite good at recognizing and marking the aflatoxin object area, even though there is still an overlap area between the prediction and the ground truth. These results confirm that U-Net provides reliable detection performance for identifying aflatoxin even with limited dataset variation and offers a promising foundation for developing practical, low-cost smartphone-based aflatoxin monitoring tools for agricultural and feed industry applications.