Accelerating the Detection of Bacteria in Food Using Artificial Intelligence and Optical Imaging

A simple, cost-effective, and rapid method is desired to identify potential pathogen contamination in food products and thus prevent foodborne illnesses and outbreaks. This study combined artificial intelligence (AI) and optical imaging to detect bacteria at the microcolony stage within 3 h of inoculation. ABSTRACT In assessing food microbial safety, the presence of Escherichia coli is a critical indicator of fecal contamination. However, conventional detection methods require the isolation of bacterial macrocolonies for biochemical or genetic characterization, which takes a few days and is labor-intensive. In this study, we show that the real-time object detection and classification algorithm You Only Look Once version 4 (YOLOv4) can accurately identify the presence of E. coli at the microcolony stage after a 3-h cultivation. Integrating with phase-contrast microscopic imaging, YOLOv4 discriminated E. coli from seven other common foodborne bacterial species with an average precision of 94%. This approach also enabled the rapid quantification of E. coli concentrations over 3 orders of magnitude with an R2 of 0.995. For romaine lettuce spiked with E. coli (10 to 103 CFU/g), the trained YOLOv4 detector had a false-negative rate of less than 10%. This approach accelerates analysis and avoids manual result determination, which has the potential to be applied as a rapid and user-friendly bacterial sensing approach in food industries. IMPORTANCE A simple, cost-effective, and rapid method is desired to identify potential pathogen contamination in food products and thus prevent foodborne illnesses and outbreaks. This study combined artificial intelligence (AI) and optical imaging to detect bacteria at the microcolony stage within 3 h of inoculation. This approach eliminates the need for time-consuming culture-based colony isolation and resource-intensive molecular approaches for bacterial identification. The approach developed in this study is broadly applicable for the identification of diverse bacterial species. In addition, this approach can be implemented in resource-limited areas, as it does not require expensive instruments and significantly trained human resources. This AI-assisted detection not only achieves high accuracy in bacterial classification but also provides the potential for automated bacterial detection, reducing labor workloads in food industries, environmental monitoring, and clinical settings.