The accurate and real-time detection of road lanes is crucial for the safe navigation of autonomous vehicles (AVs). This paper presents a novel approach to lane detection by leveraging the capabilities of the Mask Region-based Convolutional Neural Network (Mask R-CNN) model. Our method adapts Mask R-CNN to specifically address the challenges posed by diverse traffic scenarios and varying environmental conditions. We introduce a robust, efficient, and scalable architecture for lane detection, which segments the lane markings and generates precise boundaries for AVs to follow. We augment the model with a custom dataset, consisting of images collected from different geographical locations, weather conditions, and road types. This comprehensive dataset ensures the model's generalizability and adaptability to real-world conditions. We also introduce a multi-scale feature extraction technique, which improves the model's ability to detect lanes in both near and far fields of view. Our proposed method significantly outperforms existing state-of-the-art techniques in terms of accuracy, processing speed, and adaptability. Extensive experiments were conducted on public datasets and our custom dataset to validate the performance of the proposed method. Results demonstrate that our Mask R-CNN-based approach achieves high precision and recall rates, ensuring reliable lane detection even in complex traffic scenarios. Additionally, our model's real-time processing capabilities make it an ideal solution for implementation in AVs, enabling safer and more efficient navigation on roads.