r/computervision • u/alza3eemhq • 2d ago
Discussion I built an AI street-driving instructor for the Abu Dhabi road test: 7 cameras, plans the lesson, talks in Emirati Arabic, runs fully offline
I've been building AIstructor, an AI driving instructor kit for training cars, aimed at the Abu Dhabi road test. I designed it with a street-driving instructor in Al Ain who has 25+ years on the road, and the rules come from how he actually teaches and what fails people on the test.
The idea: most driving AI grades you after the fact. An instructor plans, warns, corrects and decides. So the system is in charge, and the learner carries out its instructions.
What it does
- Perception: YOLO11 + ByteTrack for vehicles and pedestrians, Hough-based lanes with solid/dashed classification, distance and time-to-collision to the lead car, traffic lights and stop signs, and a road-sign spotter (shape and colour) plus a reference-picture identifier
- Driver monitoring: a cabin camera with YOLO pose for head yaw, so it knows if you checked the mirror and blind spot before moving. Missing that check is an instant fail on the real test
- Lesson planning: from OpenStreetMap (Overpass + networkx). The instructor sets the meeting point, the lesson length and the drop-off point. The planner times the route at a learner's pace (waits at lights and roundabouts included) and collects what the training stage needs: roundabouts, junctions with lights, multi-lane roads. It avoids dead ends and U-turns, and merges a junction drawn as several OSM pieces into one instruction
- In the car: spoken directions ahead of every turn and roundabout exit (with the lane to take), tasks like "change lane" or "pull over", each checked as actually carried out
- Grading: pass or fail like the real test, 7 training stages from an assessment lesson to a mock test, learner records and readiness
- Voice and conversation: Emirati dialect, male or female instructor to match the learner. Everything is local: Habibi-TTS for the voice, faster-whisper to listen, a small LLM in Ollama to answer. It all fits on one RTX 4060 (8 GB)
The rule I'm strict about: the LLM only talks. It never makes a driving decision. Corrections come from deterministic rules and cut the conversation off, and a question asked mid-roundabout waits until you're out of it.
Two modes: simulation (upload a front-camera video) and the in-car kit (7 cameras, GPS, mic, screen).
Honest status: tested on sample road videos and on real Al Ain map data, with 53 automated tests. Solid vs dashed lines came out right on the sample videos, and the sign spotter raised zero false alarms across 1,150 real frames. It has not been tested on real UAE footage from the car yet. That's the next step.
Repo: https://github.com/alza3eemhq/aistructor (free for personal and educational use)
Things I'd love input on:
- Better ways to count roundabout exits from OSM when slip roads and service roads are mapped as exits
- Anyone who has fine-tuned F5-TTS / Habibi on a clean single-speaker recording: how much audio did it take to sound smooth?


