News

Sep 15 '26

New AI Model Detects Foodborne Bacteria in Three Hours

#AIFS

News Banner Image

The summer of 2026 was a rough one for grocery shoppers. In just a few months, recall notices piled up for iceberg lettuce, alfalfa sprouts, jalapeños, frozen berries and beef. These recalls point to a larger food safety challenge: contamination can start anywhere between the farm and the dinner table, and finding it fast makes a major difference.

The Problem: Testing Food Still Takes Days

Standard methods for detecting bacteria often need samples to be grown for several days. Speeding that up usually means costly instruments, trained staff or complex lab steps. Most food plants do not have those on site.

Researchers from the University of California, Davis, Oregon State University, Florida State University and Korea University are exploring a different approach. They taught artificial intelligence to recognize tiny bacterial colonies in ordinary white-light microscope images, after just three hours of incubation.

The study, supported by the AI Institute for Next Generation Food Systems (AIFS), focused on three bacteria: E. coli, Listeria monocytogenes and Bacillus subtilis.

How It Works: Teaching AI to Ignore Food Debris

Recognizing bacteria was only half the real challenge. Real food samples still contain tiny pieces of the food itself. Under a microscope, some of those particles, like chicken fibers and cheese particles look surprisingly similar to bacterial colonies.

In this case, the team built two versions of the same AI model, using an architecture called Faster R-CNN. One version saw only pictures of bacteria during training. The other saw pictures of bacteria and pictures of food debris, with every crumb labeled as a crumb. Then the researchers compared them on images they had never seen. Through such data training, the false-positive rate dropped from 24.2% to 0%. Detection stayed accurate, at 100% mean precision and 94.4% mean recall.

The researchers also tested a second AI architecture, YOLOv7. Training it with food debris improved its performance as well. That supports a broader idea. AI systems for food testing do better when they are trained on the confusing background material they will meet in real samples. In this study, however, Faster R-CNN performed better overall.

Testing the System in Real Food Samples

The team went one step further by placing B. subtilis into samples of spinach, cheese and chicken.

To make sure they knew exactly which objects in the microscope images were bacteria, the researchers used a strain of B. subtilis engineered to produce green fluorescent protein, or GFP. Under a fluorescence filter, those bacteria glow. That gave the team an independent answer key to compare against what the AI found in the ordinary microscope images.

Across the three food types, the model achieved 94.6% mean precision and 92.5% mean recall. Of 133 bacterial microcolonies present in the samples, the model correctly detected 123 and missed 10. This gave the researchers an independent way to check whether the AI was finding real bacteria rather than look-alike food particles.

Why It Matters

The study points toward a faster and more practical way to screen food for harmful bacteria.

Instead of waiting several days for colonies to grow large enough to analyze, the system looks at very small colonies after about three hours, providing a more rapid, accessable and easy food safety detection alternative plan to other complex rapid detection methods.

The work also carries a broader lesson for AI in food safety. A model needs to train on the data of messy reality of the place where it will be used.

What's Next

There are still important steps ahead. The researchers note that the system cannot yet reliably tell apart many bacteria in foods that carry their own natural microbes. Future studies will need larger datasets covering more foods, more bacteria and those background microbes. The team also proposes pairing AI imaging with other tools, such as fluorescence, hyperspectral imaging or molecular tests.

If those challenges can be solved, this approach could move testing closer to the speed food production actually runs at. That means better information sooner, and a smaller chance that unsafe products reach shoppers.

About This Research

Hyeon Woo Park, Zhengao Li, Luyao Ma and Nitin Nitin, “Deep learning enabled rapid detection of live bacteria in the presence of food debris,npj Science of Food (2025), 9:274

The work received support from the USDA National Institute of Food and Agriculture, the USDA/NSF AI Institute for Next Generation Food Systems and additional university and USDA programs.

Related News & Events