With the development of autonomous driving, low-cost visual perception solutions have become a current research hotspot. However, the performance of the pure visual scheme in unfriendly environments such as low light, rain and fog, and complex traffic scenes has a large room for improvement. Moreover, with the development and application of deep learning, the balance between the accuracy and real-time performance of deep learning models is a difficult problem for current research. Aiming at the problems of large differences in the target scale of pavement signs and the difficulty of balancing model accuracy and real-time performance, a ground semantic cognition method based on segmentation and attention mechanism is proposed. The lightweight semantic segmentation model ERFNet is used to realize the semantic segmentation of pavement signs and the instantiation of lane lines. When only lane line detection is required, the prediction branch of lane line existence is introduced based on the lightweight semantic segmentation model ERFNet to realize lane line instantiation cognition, solve the imbalance of positive and negative lane line detection samples, and obtain the final lane line detection result via postprocessing. Deep features were used to guide shallow layers to extract semantic features at high resolution, and the model performance was further optimized without increasing the inference cost.