针对传统客流量统计算法检测精度与速度难以平衡的问题,设计了一种面向嵌入式设备的扶梯客流量实时统计方法.首先,提出无失真缩放方法,以保持测试图像与训练样本的信息一致性,避免影响检测模型性能;此外,将YOLOv4-tiny检测模型通过降维模块、分组卷积进行优化,进而提出YOLOv4-tiny-fast网络,其在保证乘客检测准确率无损失的情况下大幅减少参数量,提高推理速度;最后,提出了一种结合自定义优化矩阵及遮挡处理的匹配算法,以较少的计算量解决了乘客跟踪问题.为证明方法的有效性,以实际环境中的手扶电梯出入口视频进行实验,结果表明,在嵌入式设备平台,所提算法的客流量统计平均准确率达到96.66%,且平均检测速度达到25帧/s,优于已有算法.
In order to address the problem that the accuracy and speed of the traditional statistical calculation method are difficult to balance, we design a real time method of escalator passenger flow statistics for embedded devices. Firstly, a distortion-free scaling method is proposed to maintain the consistency of information between the test and the training sample to avoid affecting the performance of the detection model; furthermore, the YOLOv4-tiny detection model is optimized by a dimensionality reduction module and group convolution, and then a YOLOv4-tiny-fast network is proposed, which significantly reduces the number of parameters and improves the inference speed while ensuring no loss of passenger detection accuracy; finally, a matching algorithm combining custom optimization matrix and occlusion processing is proposed to solve the passenger tracking problem with less computational effort. To demonstrate the effectiveness of the method, experiments are conducted with video of escalator entrances and exits in a real environment. The results show that the proposed algorithm achieves an average accuracy of 96.66% in passenger flow statistics on the embedded device platform, and the average detection speed reaches 25 frames/s, which is better than existing algorithms.