A new artificial intelligence (AI) system will detect when a driver becomes too drowsy to safely drive a vehicle, reports CNN Business.

As of 2022, new safety technologies will become mandatory in new European vehicles, including “a warning of driver drowsiness and distraction.”

Bosch, the German engineering and technology company, is positioning itself to be one of the main providers of this technology, announcing in December that it has developed an interior monitoring system that detects drowsy and distracted drivers.

The technology, which will be built into new cars from 2022, uses cameras and AI to detect when a driver’s eyelids are getting heavy, or when they are distracted from looking at a phone or turning towards another passenger.