Open Pilot is AI based platform to control car programmatically
To start platform look in trackerOS.py - here are train engine to collect all data from incoming video frames. It was based on SCAM - to create 3D model. Still in work.
By this model you can detect lines with OpenCV functions. Also you can write your own 3D model based on this code.
Only prepare to implement AI base to detect road, cars and other options. Also in plan - add LIDAR to understand positions of cars