基于改进 YOLOv8s 的车道线检测算法

钱锦明 ,  王庆 ,  刘鹏飞

交通信息与安全 ›› 2026, Vol. 44 ›› Issue (1) : 127 -138.

PDF (2135KB)
交通信息与安全 ›› 2026, Vol. 44 ›› Issue (1) : 127 -138. DOI: 10.3963/j.jssn.1674-4861.2026.01.011
交通信息工程与控制

基于改进 YOLOv8s 的车道线检测算法

作者信息 +

An Improved YOLOv8s Algorithm for Lane Detection in Road Scenes

Author information +
文章历史 +
PDF (2186K)

摘要

从道路场景图像中准确检测车道线对于自动驾驶与智能交通系统的环境感知具有重要意义。然而,在复杂的交通场景下,车道线目标呈现细长结构与形态多变的特征,使其极易受到诸如光照变化、物体遮挡以及恶劣天气等外部因素的干扰,传统YOLOv8s车道线检测模型在特征表达能力与结构建模方面仍存在不足,导致检测精度和鲁棒性有待提升。为解决上述问题,研究了基于改进YOLOv8s 的车道线检测算法YOLOv8s-CLW。为增强网络对狭长细粒度车道线特征的表征能力,在特征提取阶段构建复合注意力机制,以强化网络对关键语义特征与空间信息的关注能力;为提升模型对曲线及非刚性车道线结构的适应能力,引入轻量化可变形卷积结构,实现对车道线形变特征的自适应建模;为进一步提升边界框定位精度,在损失函数中引入改进的边界回归损失函数,以提高边界回归的稳定性与检测精度。实验结果表明:在原始测试集上,YOLOv8s-CLW的Recall和mAP分别达到50.0%和59.8%,相比基线YOLOv8s模型分别提升0.6%和8.9%;在外部验证集上,Precision、Recall和mAP分别达到93.0%、92.0%和96.1%,整体检测性能得到明显提升。在复杂天气(雾、雨、沙尘、降雪)条件下的可视化实验表明,模型仍能识别部分车道线,检测数量占正常天气的约30%~85%,轻度干扰下可达 80%~85%,极端天气约为30%~50%,预测线条整体保持连续性与完整性,体现出较强的环境适应性和鲁棒性。

Abstract

Accurate lane detection from road scene images is crucial for environment perception in autonomous driving and intelligent transportation systems. However, in complex traffic scenarios, lane markings are slender, variable in shape, and easily affected by illumination changes, occlusion, and adverse weather, which restricts the feature representation and structural modeling capability of the conventional YOLOv8s lane detection model, resulting in suboptimal detection accuracy and robustness. To overcome these limitations, this study proposes an improved YOLOv8s-based lane detection algorithm, YOLOv8s-CLW. A composite attention mechanism is integrated into the feature extraction stage to enhance the network's focus on critical semantic features and spatial information of slender lane markings. Lightweight deformable convolution is introduced to adaptively model curved and non-rigid lane structures, and an improved bounding box regression loss is employed to enhance localization stability and detection precision. Experimental results demonstrate that, on the original test set, YOLOv8s-CLW achieves a Recall of 50.0% and a mAP of 59.8%, representing improvements of 0.6% and 8.9% over the baseline YOLOv8s. On an external validation set, Precision, Recall, and mAP reach 93.0%, 92.0%, and 96.1%, demonstrating significant performance gains. Qualitative visualization results under complex weather conditions (fog, rain, dust, and snow) indicate that the model can still detect partial lane lines, with the number of detected lane lines ranging from approximately 30% to 85% of that under normal conditions—80%~85% under mild interference and 30%~50% under extreme weather, while maintaining continuity and completeness of predictions, reflecting strong environmental adaptability and robustness.

关键词

智能交通 / 车道线检测 / YOLOv8s / 复合注意力机制 / 可变形卷积 / 边界回归损失

Key words

intelligent transportation / lane detection / YOLOv8s / composite attention mechanism / de-formable convolution / bounding box regression loss

引用本文

引用格式 ▾
钱锦明,王庆,刘鹏飞. 基于改进 YOLOv8s 的车道线检测算法[J]. 交通信息与安全, 2026, 44(1): 127-138 DOI:10.3963/j.jssn.1674-4861.2026.01.011

登录浏览全文

4963

注册一个新账户 忘记密码

参考文献

[1]

周经美, 王钰, 宁航, 等 . 面向多元场景结合 GLNet 的车道线检测算法[J]. 中国公路学报, 2021, 34(7): 118-127.

[2]

ZHOU J M, WANG Y, NING H, et al. Lane detection algorithm for multiple scenarios based on GLNet[J]. China Journal of Highway and Transport, 2021, 34(7): 118-127.(in Chinese)

[3]

范英, 石磊, 苏伟伟, 等 . 基于 PINet+RESA 网络的车道线检测算法[J]. 江苏大学学报(自然科学版), 2023, 44(4): 373-378.

[4]

FAN Y, SHI L, SU W W, et al. Lane detection algorithm based on PINet+RESA network[J]. Journal of Jiangsu University(Natural Science Edition), 2023, 44(4): 373-378.(in Chinese)

[5]

崔建东, 崔岩 . 一种基于多维度自注意力机制的轻量级车道线检测算法[J]. 计算机科学与应用, 2022, 12(1): 108.

[6]

CUI J D, CUI Y . A lightweight lane detection algorithm based on multidimensional self—attention mechanism[J]. Computer Science and Applications, 2022, 12(1): 108.(in Chinese)

[7]

张孝杰, 张艳伟, 邹鹰, 等 . 基于改进 YOLOv7 的码头作业人员检测算法[J]. 交通信息与安全, 2024, 42(2): 67-75.

[8]

ZHANG X J, ZHANG Y W, ZOU Y, et al. Dock workers detection algorithm based on improved YOLOv7[J]. Journal of Transport Information and Safety, 2024, 42(2): 67-75.(in Chinese)

[9]

张逸凡, 聂琳真, 黄灏然, 等 . 基于改进YOLOv5 算法的道路交通参与者实时检测方法[J]. 交通信息与安全, 2024, 42(1): 115-123.

[10]

ZHANG Y F, NIE L Z, HUANG H R, et al. Real—time detection method for road traffic participants based on improved YOLOv5 algorithm[J]. Journal of Transport Information and Safety, 2024, 42(1): 115-123.(in Chinese)

[11]

JOCHER G, STOLEN A, BOROVEC J . YOLOv5 [OL]. (2020—06—09)[2021—07—09]. https://github.com/ultralytics/yolov5.

[12]

LI C,LI L,JIANG H, et al. YOLOv6:A single—stage object detection framework for industrial applications[J]. arXiv preprint, 2022,arXiv:2209.02976.

[13]

WANG C Y, BOCHKOVSKIY A, LIAO H Y M . YOLOv7:trainable bag—of—freebies sets new state—of—the—art for real—time object detectors[C]. The IEEE/CVF Conference on Computer Vision and Pattern Recognition,Vancouver,Canada:IEEE, 2023.

[14]

李琳辉, 张鑫亮, 付一帆, 等 . 基于 TC—YOLOv7 算法的可见光与红外后融合检测研究[J]. 汽车工程, 2023, 45(12): 2280-2290.

[15]

LI L H, ZHANG X L, FU Y F, et al. Study on visible and infrared fusion detection based on TC—YOLOv7 algorithm [J]. Automotive Engineering, 2023, 45(12): 2280-2290.(in Chinese)

[16]

BAO C, CAO J, HAO Q, et al. Dual—YOLO architecture from infrared and visible images for object detection [J]. Sensors, 2023, 23(6): 2934.

[17]

HAIMER Z,MATEUR K,FARHAN Y, et al. Road marking detection and instance segmentation using YOLOv8 models[C]. International Conference on Optimization and Applications(ICOA),Almería,Spain:IEEE, 2024.

[18]

WANG X, GAO H, JIA Z, et al. BL—YOLOv8:an improved road defect detection model based on YOLOv8[J]. Sensors, 2023, 23(20): 8361.

[19]

SUN H, LIU S, LI W, DU L, ZHANG T, et al. New lane detection method for autonomous driving[C]. Eighth International Conference on Traffic Engineering and Transportation System,Beijing,China:SPIE, 2024.

[20]

REN Z . Adaptive multi—scale fusion for infrared and visible object detection in YOLOv8[J]. Journal of Theory and Practice of Engineering Science, 2024, 4(9): 28-34.

[21]

ABDULLAH A, LING G, AL—SOSWA M, et al. LC—YOLO:an improved YOLOv8—based lane detection model for enhanced lane intrusion detection[J]. IET Image Processing, 2025, 19(1): e70065.

[22]

YUMENG X, MANSHOR N B, HUSIN N A, et al. Improving YoloPX using YoloP and YOLOv8 for panoptic driving perception[J]. JOIV:International Journal on Informatics Visualization, 2025, 9(1): 248-257.

[23]

LIU R, YUAN Z, LIU T, et al. End—to—end lane shape prediction with transformers[C]. The IEEE/CVF Winter Conference on Applications of Computer Vision, Waikoloa,USA:IEEE, 2021.

[24]

邵延华, 张铎, 楚红雨, 等 . 基于深度学习的YOLO 目标检测综述[J]. 电子与信息学报, 2022, 44(10): 3697-3708.

[25]

SHAO Y H, ZHANG D, CHU H Y, et al. A survey on YOLO—based object detection using deep learning[J]. Journal of Electronics & Information Technology, 2022, 44(10): 3697-3708.(in Chinese)

[26]

李岩超, 史卫亚, 冯灿 . 面向无人机航拍小目标检测的轻量级 YOLOv8 检测算法[J]. 计算机工程与应用, 2024, 60(17): 167-178.

[27]

LI Y C, SHI W Y, FENG C . Lightweight YOLOv8 detection algorithm for small target detection in UAV aerial images[J]. Computer Engineering and Applications, 2024, 60(17): 167-178.(in Chinese)

[28]

谷喜阳, 谢颖华 . 基于改进 YOLOv8 的交通标志检测算法研究[J]. 计算机科学与应用, 2025, 15(5): 282-292.

[29]

GU X Y, XIE Y H . Research on traffic sign detection algorithm based on improved YOLOv8[J]. Computer Science and Applications, 2025, 15(5): 282-292.(in Chinese)

[30]

YASEEN M. What is YOLOv9:an in—depth exploration of the internal features of the next—generation object detector[J]. arXiv preprint, 2024,arXiv:2409.07813.

[31]

张德祥, 王俊, 袁培成 . 基于注意力机制的多尺度全场景监控目标检测方法[J]. 电子与信息学报, 2022, 44(9): 3249-3257.

[32]

ZHANG D X, WANG J, YUAN P C . Multi—scale full—scene surveillance object detection method based on attention mechanism[J]. Journal of Electronics & Information Technology, 2022, 44(9): 3249-3257.(in Chinese)

[33]

胡丹丹, 张忠婷, 牛国臣 . 融合 CBAM 注意力机制与可变形卷积的车道线检测[J]. 北京航空航天大学学报, 2022, 50(7): 2150-2160.

[34]

HU D D, ZHANG Z T, NIU G C . Lane detection integrating CBAM attention mechanism and deformable convolution[J]. Journal of Beijing University of Aeronautics and Astronautics, 2022, 50(7): 2150-2160.(in Chinese)

[35]

邓立国, 沙文丹 . SCA—YOLO:基于可变形卷积与上下文感知注意力的实时目标检测[J]. 广东工业大学学报, 2025.

[36]

DENG L, SHA W . SCA—YOLO:real—time target detection based on deformable convolution and context—aware attention[J]. Journal of Guangdong University of Technology, 2025.(in Chinese)

[37]

李子茂, 李嘉晖, 尹帆, 等 . 基于可形变卷积与 SimAM 注意力的密集柑橘检测算法[J]. 中国农机化学报, 2023, 44(2): 156.

[38]

LI Z M, LI J H, YIN F, et al. Dense citrus detection algorithm based on deformable convolution and SimAM attention[J]. Journal of Chinese Agricultural Mechanization, 2023, 44(2): 156.(in Chinese)

[39]

TONG Z, CHEN Y, XU Z, et al. Wise—IoU:bounding box regression loss with dynamic focusing mechanism[J]. arXiv preprint, 2023,arXiv:2301.10051.

[40]

REN S, HE K, GIRSHICK R, et al. Faster R—CNN:towards real—time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2016, 39(6): 1137-1149.

[41]

HUANGFU Z, LI S, YAN L . Ghost—YOLOv8:an attention—guided enhanced small target detection algorithm for floating litter on water surfaces[J]. Computers,Materials & Continua, 2024, 80(3): 3713-3731.

[42]

CHENG T,SONG L,GE Y, et al. Yolo—world:real—time open—vocabulary object detection[C]. The IEEE/CVF Conference on Computer Vision and Pattern Recognition,Seattle,USA:IEEE, 2024.

基金资助

国家自然科学基金项目(42074039)

AI Summary AI Mindmap
PDF (2135KB)

0

访问

0

被引

详细

导航
相关文章

AI思维导图

/

〈 〉