首页|基于改进YOLOv5s的轻量化交通灯检测算法

基于改进YOLOv5s的轻量化交通灯检测算法

扫码查看
针对目前交通灯检测算法网络模型参数量过大、实时性差的问题,提出了一种基于改进YOLOv5s的轻量化交通灯检测算法.首先,用轻量化网络MobileNetv3替换原主干网络并引入注意力机制,在对检测精度影响不大的前提下降低模型参数量;然后,使用深度可分离卷积替换颈部网络中的传统标准卷积,进一步降低模型参数量;接着,针对交通灯尺度小的特点,删除检测大目标的检测层;最后,改进边框回归损失函数,提升边框检测精度.同时,为了能实时部署在嵌入式平台,该算法对网络进行通道剪枝实现模型压缩和加速.实验结果表明,该算法在嵌入式平台NVIDIA Jetson Xavier NX上能达到48.1帧/s的检测速度,相比原始YOLOv5s牺牲了 1.5%的mAP,但是该模型体积压缩了 54.3%,检测速度提高为原来的2.6倍,可以满足在交通道路中实时对交通灯检测的需要.
Lightweight traffic-light detection algorithm based on improved YOLOv5s
A lightweight traffic-light detection algorithm based on improved YOLOv5s is proposed to solve the issue of numerous network model parameters and poor real-time performance of current traffic-light detection algorithms.First,a lightweight network,Mo-bileNetv3,is used to replace the original backbone network,and the attention mechanism is introduced to reduce the number of model parameters on the premise of minimal impact on detection accuracy.Next,the depth separable convolution is used to replace the tra-ditional standard convolution in the neck network to further reduce the number of model parameters.Subsequently,the detection layer for detecting large targets is deleted based on the small scale of traffic lights.Finally,the frame regression loss function is improved to improve the frame detection accuracy.The network is pruned to compress and accelerate the model to be deployed on the embedded platform in real time.The experimental results show that the proposed algorithm can achieve a detection speed of 48.1 frame/s on the embedded platform NVIDIA Jetson Xavier NX,which sacrifices 1.5%mAP compared with the original YOLOv5s.However,the model size is compressed by 54.3%,and the detection speed is increased by 2.6 times,which can satisfy the needs of real-time traffic-light detec-tion on traffic roads.

traffic-light detectionlightweight modelYOLOv5sMobileNetv3channel pruning

蔡管鸿、李国平、王国中、滕国伟

展开 >

上海工程技术大学电子电气工程学院,上海 201620

上海大学通信与信息工程学院,上海 200444

交通灯检测 轻量化模型 YOLOv5s MobileNetv3 通道剪枝

国家重点研发计划资助项目

2019YFB1802700

2024

上海大学学报(自然科学版)
上海大学

上海大学学报(自然科学版)

CSTPCD北大核心
影响因子:0.579
ISSN:1007-2861
年,卷(期):2024.30(1)
  • 20