Abstract
This study evaluated the efficacy of optimized deep learning architectures using a portable fluorescence imaging device specifically for the in-situ detection of fecal contamination on chicken eggshells to enhance food safety. The research utilized a Contamination and Sanitization Inspection device to establish a comprehensive dataset of fluorescence images, leveraging the spectral characteristics of fecal matter which emits fluorescence in the 600 to 720 nm range. Based on this fluorescence image data set, the study developed high performance models to identify fecal residues across both brown and white eggshells. Experimental results demonstrated that the fluorescence signals of fecal contaminants remain highly stable under ambient lighting, with both the primary mode utilizing 405 nm excitation and the enhance mode utilizing 365 nm excitation achieving Structural Similarity Index Measure (SSIM) values consistently exceeding 0.9200. These metrics confirm that the intrinsic high contrast of fluorescence imaging maintains structural integrity without the need for strict darkroom environments. Through the evaluation of nine distinct neural networks, it was found that the 365 nm excitation effectively suppressed background interference on brown eggs, allowing the lightweight MobileNet architecture to detect fecal contamination with an accuracy of 0.9000. For white eggshells, the 405 nm excitation coupled with the ViT Base 384 model yielded a peak accuracy of 0.9333 in identifying minute fecal traces. The reliability of the detection was further validated through Explainable AI frameworks which confirmed that the classification logic was consistently based on actual contaminated regions marked by fecal residues. These findings provide a robust methodology for leveraging handheld portable fluorescence technology to establish objective standards for detecting fecal contamination in the poultry industry.