With the rise in motor vehicles, driving safety is a major concern, and autonomous driving technology plays a key role in enhancing safety. Vision-based lane departure warning systems are essential for accurate navigation, focusing on lane line detection. This paper reviews the development of such systems and highlights the limitations of traditional image processing. To improve lane line detection, a dataset from Roboflow Universe will be used, incorporating techniques like priority pixels, least squares fitting for positioning, and a Kalman filter for tracking. YOLOv5 will be enhanced with a di-versified branch block (DBB) for better multi-scale feature extraction and an improved segmentation head inspired by YOLACT (You Only Look At CoefficienTs) for precise lane line segmentation. A multi-scale feature fusion mechanism with self-attention will be introduced to improve robustness. Experiments will demonstrate that the improved YOLOv5 outperforms other models in accuracy, recall, and mAP@0.5. Future work will focus on optimizing the model structure and enhancing the fusion mechanism for better performance.