| As a common means of transportation,escalators pose a risk of falling when pedestrians ride irregularly.If the escalator cannot be detected and stopped in a timely manner,it will lead to secondary injury and miss the optimal rescue time.Therefore,it is necessary to detect pedestrian falls in escalators.In recent years,with the rapid development of artificial intelligence and embedded technology,it is necessary to achieve real-time detection of pedestrians riding on escalators through object detection methods.When a pedestrian falls,it is necessary to quickly stop the operation of the escalator and give a timely alarm.This article is based on the YOLOv5 algorithm and improves the problem of pedestrian fall detection with limited dataset,redundant background information,high computational complexity,and high computer hardware requirements.An improved mosaic method is proposed to reduce the generation of black edges during data preprocessing by randomly stitching nine images,thereby increasing data richness.In response to the interference of complex background information,an attention mechanism module is added to the Neck layer of YOLOv5 to strengthen attention to pedestrian information features and reduce attention to other background information features.Compared with the original YOLOv5 algorithm,the accuracy,recall,and average accuracy of YOLOv5-CBAM-WBF algorithm have been improved by 3.2%,2%,and 3.9%,respectively.In order to meet the real-time detection requirements in escalator scenes,a threshold detection algorithm using skip frames is used to fully utilize pixel grayscale information to determine whether there are pedestrians to control the algorithm’s execution.The feature extraction module is changed to a lightweight Shuffle Netv2 module,and the ordinary convolution module is replaced with a lightweight Ghost Net module in the feature fusion stage to reduce the model’s computational complexity and reduce the requirements for computer hardware,Realize real-time detection of escalators.The lightweight YOLOv5 n only sacrifices 1.4% accuracy but improves detection speed by 42.3 FPS,indicating that the improved algorithm has significantly improved the real-time detection performance of escalator pedestrians. |