YOLOv5-AC: Attention Mechanism-Based Lightweight YOLOv5 for Track Pedestrian Detection

In response to the dangerous behavior of pedestrians roaming freely on unsupervised train tracks, the real-time detection of pedestrians is urgently required to ensure the safety of trains and people. Aiming to improve the low accuracy of railway pedestrian detection, the high missed-detection rate...

Full description

Bibliographic Details
Main Authors: Haohui Lv, Hanbing Yan, Keyang Liu, Zhenwu Zhou, Junjie Jing
Format: Article
Language:English
Published: MDPI AG 2022-08-01
Series:Sensors
Subjects:
Online Access:https://www.mdpi.com/1424-8220/22/15/5903
_version_ 1827624485870632960
author Haohui Lv
Hanbing Yan
Keyang Liu
Zhenwu Zhou
Junjie Jing
author_facet Haohui Lv
Hanbing Yan
Keyang Liu
Zhenwu Zhou
Junjie Jing
author_sort Haohui Lv
collection DOAJ
description In response to the dangerous behavior of pedestrians roaming freely on unsupervised train tracks, the real-time detection of pedestrians is urgently required to ensure the safety of trains and people. Aiming to improve the low accuracy of railway pedestrian detection, the high missed-detection rate of target pedestrians, and the poor retention of non-redundant boxes, YOLOv5 is adopted as the baseline to improve the effectiveness of pedestrian detection. First of all, L1 regularization is deployed before the BN layer, and the layers with smaller influence factors are removed through sparse training to achieve the effect of model pruning. In the next moment, the context extraction module is applied to the feature extraction network, and the input features are fully extracted using receptive fields of different sizes. In addition, both the context attention module CxAM and the content attention module CnAM are added to the FPN part to correct the target position deviation in the process of feature extraction so that the accuracy of detection can be improved. What is more, DIoU_NMS is employed to replace NMS as the prediction frame screening algorithm to improve the problem of detection target loss in the case of high target coincidence. Experimental results show that compared with YOLOv5, the AP of our YOLOv5-AC model for pedestrians is 95.14%, the recall is 94.22%, and the counting frame rate is 63.1 FPS. Among them, AP and recall increased by 3.78% and 3.92%, respectively, while the detection speed increased by 57.8%. The experimental results verify that our YOLOv5-AC is an effective and accurate method for pedestrian detection in railways.
first_indexed 2024-03-09T12:10:15Z
format Article
id doaj.art-080588d4c541414bb72b85a45d85ed3b
institution Directory Open Access Journal
issn 1424-8220
language English
last_indexed 2024-03-09T12:10:15Z
publishDate 2022-08-01
publisher MDPI AG
record_format Article
series Sensors
spelling doaj.art-080588d4c541414bb72b85a45d85ed3b2023-11-30T22:52:36ZengMDPI AGSensors1424-82202022-08-012215590310.3390/s22155903YOLOv5-AC: Attention Mechanism-Based Lightweight YOLOv5 for Track Pedestrian DetectionHaohui Lv0Hanbing Yan1Keyang Liu2Zhenwu Zhou3Junjie Jing4School of Automation, Chengdu University of Information Technology, Chengdu 610225, ChinaSchool of Automation, Chengdu University of Information Technology, Chengdu 610225, ChinaSchool of Automation, Chengdu University of Information Technology, Chengdu 610225, ChinaSchool of Automation, Chengdu University of Information Technology, Chengdu 610225, ChinaSchool of Automation, Chengdu University of Information Technology, Chengdu 610225, ChinaIn response to the dangerous behavior of pedestrians roaming freely on unsupervised train tracks, the real-time detection of pedestrians is urgently required to ensure the safety of trains and people. Aiming to improve the low accuracy of railway pedestrian detection, the high missed-detection rate of target pedestrians, and the poor retention of non-redundant boxes, YOLOv5 is adopted as the baseline to improve the effectiveness of pedestrian detection. First of all, L1 regularization is deployed before the BN layer, and the layers with smaller influence factors are removed through sparse training to achieve the effect of model pruning. In the next moment, the context extraction module is applied to the feature extraction network, and the input features are fully extracted using receptive fields of different sizes. In addition, both the context attention module CxAM and the content attention module CnAM are added to the FPN part to correct the target position deviation in the process of feature extraction so that the accuracy of detection can be improved. What is more, DIoU_NMS is employed to replace NMS as the prediction frame screening algorithm to improve the problem of detection target loss in the case of high target coincidence. Experimental results show that compared with YOLOv5, the AP of our YOLOv5-AC model for pedestrians is 95.14%, the recall is 94.22%, and the counting frame rate is 63.1 FPS. Among them, AP and recall increased by 3.78% and 3.92%, respectively, while the detection speed increased by 57.8%. The experimental results verify that our YOLOv5-AC is an effective and accurate method for pedestrian detection in railways.https://www.mdpi.com/1424-8220/22/15/5903pedestrian detectiondeep learningmodel pruningcontext extraction moduleattention moduleDIoU_NMS
spellingShingle Haohui Lv
Hanbing Yan
Keyang Liu
Zhenwu Zhou
Junjie Jing
YOLOv5-AC: Attention Mechanism-Based Lightweight YOLOv5 for Track Pedestrian Detection
Sensors
pedestrian detection
deep learning
model pruning
context extraction module
attention module
DIoU_NMS
title YOLOv5-AC: Attention Mechanism-Based Lightweight YOLOv5 for Track Pedestrian Detection
title_full YOLOv5-AC: Attention Mechanism-Based Lightweight YOLOv5 for Track Pedestrian Detection
title_fullStr YOLOv5-AC: Attention Mechanism-Based Lightweight YOLOv5 for Track Pedestrian Detection
title_full_unstemmed YOLOv5-AC: Attention Mechanism-Based Lightweight YOLOv5 for Track Pedestrian Detection
title_short YOLOv5-AC: Attention Mechanism-Based Lightweight YOLOv5 for Track Pedestrian Detection
title_sort yolov5 ac attention mechanism based lightweight yolov5 for track pedestrian detection
topic pedestrian detection
deep learning
model pruning
context extraction module
attention module
DIoU_NMS
url https://www.mdpi.com/1424-8220/22/15/5903
work_keys_str_mv AT haohuilv yolov5acattentionmechanismbasedlightweightyolov5fortrackpedestriandetection
AT hanbingyan yolov5acattentionmechanismbasedlightweightyolov5fortrackpedestriandetection
AT keyangliu yolov5acattentionmechanismbasedlightweightyolov5fortrackpedestriandetection
AT zhenwuzhou yolov5acattentionmechanismbasedlightweightyolov5fortrackpedestriandetection
AT junjiejing yolov5acattentionmechanismbasedlightweightyolov5fortrackpedestriandetection