| To achieve crowd counting and people flow statistics,this paper makes improvements on CSRNet crowd counting algorithm and YOLOv7 object detection algorithm.Experiments are conducted on related datasets to demonstrate the effectiveness of our proposed solution.The implementation of the human detection and counting system on the embedded platform TB-RK3399 Pro D is also proposed to show the feasibility of deploying artificial-intelligence applications on embedded systems.The contributions of this paper are as follows:(1)To count the sum of people in a static image,this paper makes improvements on CSRNet algorithm.In order to obtain a lightweight model,the CSRNet is compressed in the channel dimension.It is also integrated with the “Cross Stage Partial” module,channels of which are reversed in the order before being concatenated.A convolutional neural network is proposed to generate density maps as the dynamic labels for model training.To compensate for the model performance loss,the online structured knowledge transfer is adopted to maintain the balance between accuracy and efficiency.Experiments indicate that the mean absolute error of the proposed model reaches 24.12,1.45 and 10.71 on Venice,Beijing-BRT and Shanghai Tech Part B datasets,and the embedded platform can run inference at the speed of 22 millisecond per frame.Ablation experiments show the effectiveness of the proposed methods as well.(2)This paper employs YOLOv7 object detection algorithm and Byte Track multiple objects tracking algorithm as the foundation to achieve people flow statistics.A parallel data preprocessing method is proposed to reduce the time cost of the YOLOv7 algorithm.Besides,the head of the object detector is separated from the model to avoid the adjustment in the dimension and order of the feature channels.To achieve higher efficiency of the procedure,filtering valid boxes of the postprocessing in object detection is also executed in a parallel way.Experiments show that the embedded platform is able to execute YOLOv7 algorithm at the speed of 37.9 frame per second on COCO dataset,and Byte Track algorithm is run at the speed of 16.3 and 6.2 frame per second on MOT17 and MOT20 datasets.Ablation experiments also indicate feasibility of the proposed methods.(3)In order to deploy artificial intelligence applications on embedded systems,the implementation of human detection and counting system is proposed based on TB-RK3399 Pro D platform.The system consists of the processing embedded platform and the user-interaction computer platform.The software technologies to develop the system are comprised of the RTSP multimedia streaming,GStreamer application development,RKNN framework,Open CL application development and Qt application development.Functional tests are conducted on self-collected authentic datasets to demonstrate the practicality of the proposed solution. |