If you’ve ever harbored doubts about the hygiene of the cooks flipping your burger and frying your fries, you’re definitely not the only one. Thepaper.cn (via the South China Morning Post) reports that local authorities in eastern China have tapped artificial intelligence (AI) to clamp down on unsanitary cooks in kitchens — and to reward those who adhere to best practices.

According to the report, a camera-based system currently being piloted in the Zhejiang city of Shaoxing automatically recognizes “poor [sanitation] habits” and alerts managers to offending workers via a mobile app. It’s reportedly the fruit of a six-year project — Sunshine Kitchen — that seeks to bring transparency to food preparation in catering, hotels, school cafeterias, and restaurants.

Zhou Feng, director of the Food Service Supervision Department in Shaoxing, told Thepaper.cn that the system can identify 18 different “risk management” areas, including smoking and using a smartphone. (Some studies have shown that phones carry 10 times more bacteria than toilet seats.) On the flip side, it recognizes four positive habits, like disinfecting surfaces and hand washing, and monitors kitchen conditions that might impact food safety, such as temperature and humidity.

So far, the local Xianheng Hotel and over 87 catering companies are said to have trialed the system, and authorities reportedly plan to expand the number to over 1,000 this year.

It’s not the first time AI has been applied to food safety.

In November 2018, a study led by researchers at Google and Harvard’s T.H. Chan School of Public Health described a machine learning model — FINDER (Foodborne IllNess DEtector in Real time) — that leveraged search and location data to highlight “potentially unsafe” restaurants. FINDER took in anonymous logs from users who opted to share their location data, and it identified search queries indicative of food poisoning (e.g., “how to relieve stomach pain”) while looking up restaurants visited by the users who performed those searches.

In the end, FINDER not only outperformed complaint-based inspections and routine inspections concerning precision, scale, and latency (the time that passed between people becoming sick and the outbreak being identified), it managed to better attribute the location of foodborne illness to a specific venue than did customers.

San Francisco-based startup ImpactVision, meanwhile, leverages machine learning and hyperspectral imaging — a technique that combines spectroscopy and computer vision — to assess the quality of food in factories and elsewhere automatically. It’s now working with avocado distributors to replace their current systems, and with large berry distributors to potentially automate manual processes, such as counting strawberries.