Improving Road Detection Code

In the repo I put my openCV code, as well as the test images and the output. It is for a autodriving simulator that I am working on. I want only to extract the white road-side lines and leave the rest. I have tried masking it and extracting the white bits, then canny and bitwise to get the final image. The result kinda works but doesnt at certain lighting and angles. How can I make it better? I’ve thought about Hough lines but I would like to keep the curvature information as if I do hough lines it will struggle with sharp turns.