留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

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

钱锦明 王庆 刘鹏飞

钱锦明, 王庆, 刘鹏飞. 基于改进YOLOv8s的车道线检测算法[J]. 交通信息与安全, 2026, 44(1): 127-138. doi: 10.3963/j.jssn.1674-4861.2026.01.011
引用本文: 钱锦明, 王庆, 刘鹏飞. 基于改进YOLOv8s的车道线检测算法[J]. 交通信息与安全, 2026, 44(1): 127-138. doi: 10.3963/j.jssn.1674-4861.2026.01.011
QIAN Jinming, WANG Qing, LIU Pengfei. An Improved YOLOv8s Algorithm for Lane Detection in Road Scenes[J]. Journal of Transport Information and Safety, 2026, 44(1): 127-138. doi: 10.3963/j.jssn.1674-4861.2026.01.011
Citation: QIAN Jinming, WANG Qing, LIU Pengfei. An Improved YOLOv8s Algorithm for Lane Detection in Road Scenes[J]. Journal of Transport Information and Safety, 2026, 44(1): 127-138. doi: 10.3963/j.jssn.1674-4861.2026.01.011

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

doi: 10.3963/j.jssn.1674-4861.2026.01.011
基金项目: 

国家自然科学基金项目 42074039

详细信息
    作者简介:

    钱锦明(1999—),硕士研究生. 研究方向:深度学习、目标检测等. E-mail: 220233718@seu.edu.cn

    通讯作者:

    王庆(1962—),博士,教授. 研究方向:智慧城市定位与空间信息可视化研究、基于北斗的智慧城市定位与空间信息技术等. E-mail: w3398a@263.net

  • 中图分类号: U495.71

An Improved YOLOv8s Algorithm for Lane Detection in Road Scenes

  • 摘要: 从道路场景图像中准确检测车道线对于自动驾驶与智能交通系统的环境感知具有重要意义。然而,在复杂的交通场景下,车道线目标呈现细长结构与形态多变的特征,使其极易受到诸如光照变化、物体遮挡以及恶劣天气等外部因素的干扰,传统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%,预测线条整体保持连续性与完整性,体现出较强的环境适应性和鲁棒性。

     

  • 图  1  改进的YOLOv8s模型

    Figure  1.  Architecture of the improved YOLOv8s model

    图  2  CA模块

    Figure  2.  CA module

    图  3  CBAM模块

    Figure  3.  CBAM module

    图  4  DCNv4单元

    Figure  4.  DCNv4 module

    图  5  2种数据集检测结果

    Figure  5.  Detection results on two datasets

    图  6  复杂天气检测结果

    Figure  6.  Detection results under complex weather conditions

    表  1  混淆矩阵

    Table  1.   Confusion matrix

    样本情况 预测结果
    正样本 负样本
    正样本 TP FN
    负样本 FP TN
    下载: 导出CSV

    表  2  损失函数对比实验结果

    Table  2.   Comparison of different loss functions

    模型 准确率/% 召回率/% mAP/% FPS/(f/s)
    YOLOv8s+CIOU 64.6 49.4 50.9 47.6
    YOLOv8s+GIOU 61.2 47.8 49.5 49.2
    YOLOv8s+DIOU 63.0 48.2 50.3 48.5
    YOLOv8s+EIOU 63.7 49.0 51.2 47.1
    YOLOv8s+SIOU 65.0 49.8 52.0 45.9
    YOLOv8s+Wise-IOU 58.4 48.9 52.0 53.8
    下载: 导出CSV

    表  3  多种注意力机制对比结果

    Table  3.   Comparison of different attention mechanisms

    模型 mAP50/% GFLOPs FPS/(f/s)
    YOLOv8s 50.9 28.5 47.6
    YOLOv8s+SE 52.6 38.1 47.9
    YOLOv8s+CBAM 53.3 50.5 46.5
    YOLOv8s+CA 54.1 63.8 46.9
    YOLOv8s+CCAM(ours) 54.8 81.2 47.4
    下载: 导出CSV

    表  4  C2f-DCNv4不同位置对比结果

    Table  4.   Comparison of C2f-DCNv4 at different positions

    模型 mAP50/% GFLOPs FPS/(f/s)
    YOLOv8s 50.9 28.5 47.6
    C2f-DCNv4-all 58.3 26.1 45.1
    C2f-DCNv4-backbone 55.2 27.3 47.4
    C2f-DCNv4-neck(ours) 56.5 26.9 47.0
    下载: 导出CSV

    表  5  算法对比实验结果

    Table  5.   Comparative results of different algorithms

    模型 mAP50/% Params/M GFLOPs FPS/(f/s)
    YOLOv5s 47.2 7.2 17.1 59.0
    YOLOv6s 48.9 15.0 45.2 42.0
    YOLOv7 51.3 36.9 105.2 34.5
    YOLOv8s 50.9 11.1 28.5 47.6
    Faster RCNN[27] 45.6 42.0 180.0 12.0
    Ghost-YOLOv8[28] 51.5 5.9 16.1 52.5
    YOLOv8-World[29] 52.2 13.4 54.7 30.0
    CLRNet 55.7 32.1 42.5 36.8
    LSTR 53.6 30.5 48.1 28.4
    YOLOv8-Lane 57.4 11.5 29.7 45.9
    YOLOv8-Seg 58.3 12.8 34.5 39.7
    Ours 59.8 21.6 79.7 44.8
    下载: 导出CSV

    表  6  消融实验结果

    Table  6.   Results of ablation experiments

    模型 CCAM C2f-DCNv4 Wise-IOU 精确率/% 召回率/% mAP/% Params/M GFLOPs FPS/(f/s)
    YOLOv8s 64.6 49.4 50.9 11.1 28.5 47.6
    模型2 60.9 54.3 54.8 22.4 81.2 47.4
    模型3 68.7 50.1 56.5 10.1 26.9 47.0
    模型4 58.4 48.9 52.0 11.1 28.5 53.8
    模型5 55.3 58.6 57.6 21.6 79.7 47.9
    模型6 60.4 52.6 53.8 10.1 26.9 44.8
    模型7 69.4 49.9 58.9 22.2 80.9 45.5
    本文模型 62.8 50.0 59.8 21.6 79.7 44.8
    下载: 导出CSV

    表  7  复杂度性价比

    Table  7.   Performance-to-Complexity ratio。

    模型 ΔmAP/% ΔGFLOPs 性价比
    模型2 +3.9 +52.7 0.074
    模型3 +5.6 -1.6
    模型4 +1.1 0
    模型5 +6.7 +51.2 0.131
    模型6 +2.9 -1.6
    模型7 +8.0 +52.4 0.153
    本文模型 +8.9 +51.2 0.174
    下载: 导出CSV

    表  8  外部验证数据集试验结果

    Table  8.   Experimental results on external validation dataset

    模型 CCAM C2f-DCNv4 Wise-IOU 精确率/% 召回率/% mAP/% Params/M GFLOPs FPS/(f/s)
    YOLOv8s 89.9 91.5 93.8 10.8 28.0 97.0
    模型2 93.3 89.9 96.2 22.2 87.7 100.0
    模型3 91.6 92.7 95.2 10.1 26.8 97.0
    模型4 89.8 89.3 93.7 11.8 28.0 111.0
    本文模型 93.0 92.0 96.1 21.6 79.5 91.0
    下载: 导出CSV
  • [1] 周经美, 王钰, 宁航, 等. 面向多元场景结合GLNet的车道线检测算法[J]. 中国公路学报, 2021, 34(7): 118-127.

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

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

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

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

    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)
    [6] JOCHER G, STOLEN A, BOROVEC J. YOLOv5 [OL]. (2020-06-09) [2021-07-09]. https://github.com/ultralytics/yolov5.
    [7] 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.
    [8] 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.
    [9] 李琳辉, 张鑫亮, 付一帆, 等. 基于TC-YOLOv7算法的可见光与红外后融合检测研究[J]. 汽车工程, 2023, 45(12): 2280-2290.

    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)
    [10] 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. doi: 10.3390/s23062934
    [11] 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.
    [12] 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. doi: 10.3390/s23208361
    [13] 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.
    [14] 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.
    [15] 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. doi: 10.1049/ipr2.70065
    [16] 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. doi: 10.62527/joiv.9.1.3791
    [17] 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.
    [18] 邵延华, 张铎, 楚红雨, 等. 基于深度学习的YOLO目标检测综述[J]. 电子与信息学报, 2022, 44(10): 3697-3708.

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

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

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

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

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

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

    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)
    [26] 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.
    [27] 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.
    [28] 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.
    [29] 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.
  • 加载中
图(6) / 表(8)
计量
  • 文章访问数:  53
  • HTML全文浏览量:  27
  • PDF下载量:  5
  • 被引次数: 0
出版历程
  • 收稿日期:  2025-07-15
  • 网络出版日期:  2026-08-28

目录

    /

    返回文章
    返回