A new AI model can detect live bacteria in foods like spinach, chicken and cheese within hours, while avoiding false alarms from harmless debris. The advance could help prevent foodborne illness and costly recalls.
A new artificial intelligence model could help keep foods like salad greens, chicken and cheese safer by spotting dangerous bacteria in just a few hours — and doing it with far fewer false alarms.
Researchers from Oregon State University, the University of California, Davis, Korea University and Florida State University have upgraded a deep learning system that analyzes digital images of tiny bacterial colonies. The improved model can now tell the difference between live bacteria and microscopic bits of food debris that often look almost identical under a microscope.
That distinction matters. In earlier versions, when the AI was trained only on images of bacteria, it mistakenly labeled food debris as bacteria more than 24% of the time. After the team retrained the system using images of both bacteria and debris, those misclassifications were eliminated.
The work targets a long-standing challenge in food safety: how to detect contamination quickly and accurately before products leave farms and processing plants.
Traditional methods for detecting bacterial contamination in foods such as leafy greens, meat and cheese usually involve growing bacteria in the lab. Those culture-based tests can take several days to a week and often require specialized expertise. During that time, contaminated food may already be moving through the supply chain.
The new AI model uses digital images of bacteria microcolonies to rapidly detect and classify live bacteria. The method enables reliable detection within about three hours, a major speedup compared with conventional approaches.
Co-corresponding author Luyao Ma, an assistant professor at Oregon State University, emphasized why that speed is critical for public health and the food industry.
“Early detection of foodborne pathogens before products reach the market is essential to prevent outbreaks, protect consumer health and reduce costly recalls,” Ma said in a news release.
Food can become contaminated at many points from farm to table — through animals, irrigation water, soil, air or equipment in processing facilities. The stakes are high: The U.S. Food & Drug Administration estimates that foodborne illness affects 48 million people in the United States each year, leading to 128,000 hospitalizations and 3,000 deaths.
By improving the accuracy of rapid tests, the new AI model aims to help food producers and regulators catch problems earlier and act with more confidence. Fewer false positives from harmless debris could mean fewer unnecessary product holds or recalls, while still flagging real threats.
In the study, published in the journal npj Science of Food, the researchers tested the deep learning model on three types of bacteria: E. coli, listeria and Bacillus subtilis. They also challenged the system with food debris taken from chicken, spinach and Cotija cheese — all common foods where contamination can be a concern.
The enhanced model’s ability to correctly ignore debris while still detecting bacteria suggests it could be useful across a range of food products and processing environments. Because it relies on digital imaging and AI rather than lengthy culture steps alone, it could be integrated into faster, more automated screening systems.
The team is now working to optimize the AI system for industry adoption. That likely means refining the technology so it can handle the complexity and volume of real-world food processing, from high-throughput imaging to user-friendly software that plant workers can operate.
If those next steps succeed, this kind of AI-assisted detection could become a powerful new tool in the food safety toolbox — helping companies move from slow, reactive testing toward faster, more preventive monitoring that keeps contaminated products off store shelves and out of home kitchens.
Source: Oregon State University

