Some Canadian researchers are developing a kind of high-tech back-seat driver that keeps an eye on motorists and makes sure they’re paying attention to the road.

But it’ll ride right up front, perhaps on the dashboard.

Technology developed at the University of Waterloo in Ontario can tell if a driver’s texting or doing something else that’s a distraction from driving, said Fakhri Karray, a UW professor of electrical and computer engineering. The technology uses cameras and artificial intelligence to follow the movements of a person’s head, hands and other movements to assess whether a person is paying attention. The machine then assesses the degree of inattention and what sort of safety threat it poses.

It’s the sort of technology that already plays a key role in the development of autonomous vehicles and could also make driving safer long before we arrive at the point of totally self-driving cars. It’s also the sort of technology that might just intensify the creepy feeling that someone or something is watching you, no matter where you are these days: Are we moving to the day when Big Brother is not just in the black box, but in the passenger seat too?

“There is a concern there,” Karray said. But he added: “It simply alerts you.”

Of course you also have to listen to it. Just this week, the National Transportation Safety Board (NTSB) issued its report on a May 7, 2016, crash involving a Tesla automobile and its “autopilot” system, saying the driver ignored onboard warnings to keep his hands on the steering wheel.

The NTSB said he had become  too reliant on the car’s autopilot system before the vehicle ran into a tractor-trailer rig. The NTSB said the driver’s overreliance on the auto­pilot system allowed him to take his attention away from driving for prolonged periods of time and was  inconsistent with the manufacturer’s operating instructions. The autopilot worked fine; the driver simply ignored warnings to take the wheel.

Waterloo’s researchers said their technology — which was discussed in a recent article in Overdrive magazine — uses algorithms and machine-learning to detect when a driver is texting, talking on a cellphone or doing something else distracting. The work grew out of other research designed to recognize when a driver was at risk of falling asleep behind the wheel, perhaps because of frequent blinking. But other factors, including head position, are assessed, too. Even one’s pupil size and heart rate could become important data to monitor to see if a person’s paying attention.

Karray, who is director of the Center for Pattern Analysis and Machine Intelligence at Waterloo, said the technology could be packaged separately someday and installed in a vehicle, or it could be built in by automotive manufacturers. But it’s a key piece of the puzzle in moving from manual driving to autonomous driving, he said  — as the fatal crash of a Tesla last year has shown.

Read more of Tripping: