A TOF camera pedestrian counting method based on hardware front end

Through TOF camera and deep neural network technology based on hardware front-end, combined with Hungarian matching and three-line method, the problem of low pedestrian counting accuracy in the existing technology is solved, accurate pedestrian counting in crowded scenes is achieved, and the processing speed and accuracy.

CN111640135BActive Publication Date: 2024-09-06TAIZHOU ZHIBIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010451383.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-25
Publication Date
2024-09-06
Estimated Expiration
2040-05-25

AI Technical Summary

Technical Problem

The existing technology is not very accurate in pedestrian counting and cannot achieve accurate pedestrian flow statistics, resulting in the need for tedious statistical work by manpower.

Method used

A TOF camera based on hardware front-end is used to collect data, a deep neural network object detector is used for passenger detection and trajectory prediction, and the Hungarian matching algorithm and the three-line method are combined for pedestrian counting.

Benefits of technology

It achieves accurate statistics of pedestrian counting in crowded scenes, reduces human labor, and provides higher accuracy and real-time performance. The processing speed reaches greater than 30fps, and the accuracy rate exceeds 95%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111640135B
    Figure CN111640135B
Patent Text Reader

Abstract

The present invention discloses a method for pedestrian counting using a TOF camera based on a hardware front end, including: marking a learning sample set of pedestrian counting collected by a TOF camera; constructing a deep neural network, and using the data of the sample set to train the neural network; obtaining the depth data of passengers from the TOF camera, and performing enhancement processing on the data; using the trained network model to test the newly acquired data, and adjusting relevant parameters to obtain a sufficiently good detection algorithm; using the output result of the detection algorithm as the input of a tracking system; the tracking system adopts the Hungarian matching algorithm, and adopts methods such as occlusion prediction to solve the occlusion problem; the tracking system assigns an independent ID tag to the result of the detection system, and uses it as the input of the counting system; the counting system counts passengers in the field of view by a three-line method. The present invention can perform real-time processing on an embedded hardware platform for passenger counting in large visual fields and crowded scenes, saving labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer digital image processing and pattern recognition, and in particular to a TOF camera pedestrian counting method based on hardware front end. Background Art

[0002] Pedestrian counting is to count the flow of people at the doors of trains (high-speed trains or subways) or in other related scenarios. If the flow of people is not counted through automated means, it will require manual work, which is time-consuming and labor-intensive.

[0003] With the development of technology, existing technology can directly count people through surveillance cameras, but the accuracy of pedestrian counting by existing cameras is not high and can only be used as a rough statistical means.

[0004] Therefore, the demand for an accurate pedestrian counting method is urgent. Summary of the invention

[0005] The purpose of the present invention is to provide a TOF camera pedestrian counting method based on hardware front-end, to collect TOF camera data in relevant scenarios, and to count pedestrians based on the collected depth data, so as to solve the shortcomings of the prior art.

[0006] In order to achieve the above object, the present invention adopts the following technical solution:

[0007] A TOF camera pedestrian counting method based on hardware front end includes the following steps:

[0008] Step 1: Obtain several pedestrian up-and-down videos from the data set collected by the TOF camera and annotate them to form a learning sample set;

[0009] Step 2: Deep neural network object detector training;

[0010] Step 3: Perform image enhancement processing on the newly acquired image to be identified;

[0011] Step 4: Use the deep neural network target detector trained in step 2 to detect and locate passengers in the image to be identified processed in step 3;

[0012] Step 5: Send the detected passenger location information as input to the tracking system for target trajectory detection / prediction;

[0013] Step 6: The counting system counts the passengers in the field of view using the three-line method based on the target trajectory tracked in step 5.

[0014] Furthermore, in step 1, a number of up and down videos of pedestrians are collected by a TOF camera and manually annotated to form a learning sample set; the amount of sample data is greater than or equal to 5,000.

[0015] Furthermore, step 2 specifically includes:

[0016] Step 2.1, convert the learning sample set into the VOC standard dataset format;

[0017] Step 2.2: Input the converted VOC standard data set into the deep neural network for training to generate a deep neural network target detector. Perform model testing every 50 times and select the model with the best performance to save. After reaching the training times, the model finally saved is the trained deep neural network target detector.

[0018] Furthermore, the deep neural network is YOLO, Fast-RCNN, Faster-RCNN or SSD.

[0019] Furthermore, the specific enhancement processing in step 3 is: enhancing the brightness of the image to be recognized newly acquired by the TOF camera and maintaining the maximum brightness at 255.

[0020] Furthermore, step 5 specifically includes:

[0021] 1) If no target is detected in the current frame, predict the trajectory of all targets in the previous frame;

[0022] 2) If a target is detected in the current frame and no target was detected in the previous frame, a new ID is registered for all targets in the current frame;

[0023] 3) If a target is detected in the current frame and a target is detected in the previous frame, the Hungarian matching algorithm is performed to assign IDs to all targets in the current frame;

[0024] 4) If a new ID appears in the current frame, register the new ID;

[0025] 5) If a missing ID appears in the current frame, predict its trajectory;

[0026] 6) If the target trajectory or predicted trajectory exceeds the field of view, or the length of continuous missed detection exceeds the corresponding threshold, the target will be deregistered.

[0027] Furthermore, the specific method of predicting the trajectory is as follows:

[0028] S1. If the missed ID is close to the upper edge of the image to be identified, the predicted trajectory is predicted at a uniform speed according to the trajectory of the lower edge of the bounding box of the deep neural network object detector obtained in step 2;

[0029] S2. If the missed ID is close to the lower edge of the image to be identified, the predicted trajectory is predicted at a uniform speed according to the trajectory of the upper edge of the bounding box of the deep neural network object detector obtained in step 2;

[0030] S3. If the missed ID is in the center of the field of view, the position of the target source that causes the ID target to be blocked is also first searched in the field of view;

[0031] S4, if the occlusion source is above the missed ID, the predicted trajectory is predicted at a uniform speed according to the trajectory of the lower edge of the bounding box of the deep neural network object detector obtained in step 2;

[0032] S5. If the occlusion source is below the missed ID, the predicted trajectory is predicted at a uniform speed according to the trajectory of the upper edge of the bounding box of the deep neural network object detector obtained in step 2.

[0033] Furthermore, the threshold in step 6) is an adaptive threshold, which is designed as follows:

[0034] a. If the target is at the lower boundary when it is missed and the speed direction is upward, or if the target is at the upper boundary when it is missed and the speed direction is downward, it means that the target has just entered the field of view, and its threshold is set to 8;

[0035] b. If the target is at the lower boundary when it is missed and the speed direction is downward, or if the target is at the upper boundary when it is missed and the speed direction is upward, it means that the target is out of the field of view, and its threshold is set to 1;

[0036] c. If the target is in the middle of the field of view when it is missed, set its threshold to 20.

[0037] Furthermore, step 6 specifically includes:

[0038] Step 6.1: When the target enters the field of view, record whether it enters from above or below;

[0039] Step 6.2, if the target disappears below / above the center line, the corresponding down / up counter is incremented by one;

[0040] Step 6.3: If the target has / superior Line behavior, without waiting for the target to disappear, the corresponding down / up counter is increased by one, and the variable recording the direction of entering the field of view at this time is reversed, that is, up becomes down, and down becomes up.

[0041] Compared with the prior art, the present invention has the following beneficial effects:

[0042] The present invention is a pedestrian counting method based on a hardware front-end TOF camera, which performs real-time detection, tracking and counting by placing the data collected by the TOF camera in the relevant scene. By processing the enhanced TOF video data into pictures, the learning samples of the detection system are manually annotated; the target detector of the deep learning network is trained based on the samples; the passengers in the field of view are detected by using a deep neural network; the detected passenger targets are ID matched by Hungarian matching and occlusion trajectory prediction; the matched passenger ID information is used according to the motion trajectory in the video, and the number of pedestrians is counted by using the three-line method. The present invention can effectively perform real-time human flow statistics on pedestrians with a certain degree of congestion, reduce the tedious labor of manpower, and provide better system services and management of relevant scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is a flow chart of a method for counting pedestrians using a TOF camera based on a hardware front end of the present invention;

[0044] Figure 2 is a sample set used for deep neural network training; Figure 2 (a) is a view of the sample set annotation method; Figure 2 (b) is the composition of the sample set. DETAILED DESCRIPTION

[0045] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0046] See also Figure 1 As shown, the present invention provides a TOF camera pedestrian counting method based on hardware front end, which specifically includes the following steps:

[0047] Step 1: Get the TOF camera acquisition learning sample set:

[0048] This example uses the labeled sample set collected by the TOF camera as the deep neural network learning sample set for training the deep neural network target detector. Specifically, the TOF camera installed in the relevant scene collects several pedestrian up and down videos, including various complex scenes, such as different levels of crowding, different postures, and different luggage; and manually annotates to form a learning sample set. The sample data volume is about 5,000, Figure 2 It is a sample set of some deep neural network learning.

[0049] Step 2: Deep neural network object detector training;

[0050] Use a deep learning algorithm to train a deep neural network target detector: Use a deep neural network to learn a sample set, and make the network's prediction results close to the actual results by continuously reducing the error between the real attributes and the predicted attributes. The specific steps are:

[0051] 2.1. Convert the learning sample set into the VOC standard data set format so that the computer can read it;

[0052] 2.2. The converted VOC standard data set is input into the deep neural network for training 7000 times to generate a deep neural network target detector. The model is tested every 50 times and the model with the best performance is selected and saved. The final saved model is the trained deep neural network target detector.

[0053] Deep neural networks have made great progress in the field of image target detection. The present invention can use a variety of deep neural networks for video analysis, including: YOLO, Fast-RCNN, Faster-RCNN, SSD. After multiple experimental tests, SSD has achieved a comparative trade-off between speed and accuracy. The present invention achieves the best results when using the SSD deep neural network, but is not limited to the SSD deep neural network.

[0054] The SSD network is an object detection algorithm that directly predicts the coordinates and categories of the bounding box. It was proposed by Liu Wei of UNC Chapel Hill in 2016. For details, see the literature: Liu W, Anguelov D, Erhan D, et al. SSD: Single Shot MultiBox Detector [J]. 2016. The basic idea is to propose to cancel the process of generating proposals and use feature maps of different convolutional layers to achieve the same effect. Experiments have shown that removing the bounding box proposal and the subsequent pixel or feature resampling steps has better performance. SSD has significantly improved speed compared to other networks.

[0055] Step 3: Perform image enhancement processing on the newly acquired image to be identified;

[0056] Increase the brightness of the image to be recognized newly acquired by the TOF camera and keep the maximum brightness at 255;

[0057] Step 4: Use the deep neural network target detector trained in step 2 to detect and locate passengers in the image to be identified processed in step 3;

[0058] Step 5: Send the detected passenger location information as input to the tracking system. The tracking system is designed as follows:

[0059] 1) If no target is detected in the current frame, predict the trajectory of all targets in the previous frame;

[0060] 2) If a target is detected in the current frame and no target was detected in the previous frame, a new ID is registered for all targets in the current frame;

[0061] 3) If a target is detected in the current frame and a target is detected in the previous frame, the Hungarian matching algorithm is performed to assign IDs to all targets in the current frame;

[0062] 4) If a new ID appears in the current frame, register the new ID;

[0063] 5) If a missing ID appears in the current frame, predict its trajectory;

[0064] 6) If the target trajectory or predicted trajectory exceeds the field of view, or the length of continuous missed detection exceeds the corresponding threshold, the target will be deregistered, where the threshold is adaptive.

[0065] The specific method of predicting the trajectory in step 1) and step 5) is as follows:

[0066] S1. If the missed ID is close to the upper edge of the image to be identified, the predicted trajectory is predicted at a uniform speed according to the trajectory of the lower edge of the bounding box of the deep neural network object detector obtained in step 2;

[0067] S2. If the missed ID is close to the lower edge of the image to be identified, the predicted trajectory is predicted at a uniform speed according to the trajectory of the upper edge of the bounding box of the deep neural network object detector obtained in step 2;

[0068] S3. If the missed ID is in the center of the field of view, the position of the target source that causes the ID target to be blocked is also first searched in the field of view;

[0069] S4, if the occlusion source is above the missed ID, the predicted trajectory is predicted at a uniform speed according to the trajectory of the lower edge of the bounding box of the deep neural network object detector obtained in step 2;

[0070] S5. If the occlusion source is below the missed ID, the predicted trajectory is predicted at a uniform speed according to the trajectory of the upper edge of the bounding box of the deep neural network object detector obtained in step 2.

[0071] The threshold in step 6) is an adaptive threshold, which is designed as follows:

[0072] a. If the target is at the lower boundary when it is missed and the speed direction is upward, or if the target is at the upper boundary when it is missed and the speed direction is downward, it means that the target has just entered the field of view, and its threshold is set to 8;

[0073] b. If the target is at the lower boundary when it is missed and the speed direction is downward, or if the target is at the upper boundary when it is missed and the speed direction is upward, it means that the target is out of the field of view, and its threshold is set to 1;

[0074] c. If the target is in the middle of the field of view when it is missed, set its threshold to 20.

[0075] Step 6: The counting system counts the passengers in the field of view using the three-line method according to the target trajectory tracked in step 5. The three-line method is designed as follows:

[0076] 6.1. When the target enters the field of view, record the direction (up / down) from which it enters;

[0077] 6.2. If the target disappears below / above the center line, the corresponding down / up counter increases by one;

[0078] 6.3. If the target has / superior Line behavior, without waiting for the target to disappear, the corresponding down / up counter is increased by one, and the variable recording the direction of entering the field of view at this time is reversed, that is, up becomes down, and down becomes up.

[0079] Experimental results show that this technical solution can accurately count pedestrians in crowded scenes. The processing speed on the embedded platform is greater than 30fps, and the accuracy rate is over 95%. Compared with the existing methods, this invention has better advantages in counting pedestrians in large fields of view and crowded scenes.

[0080] The present invention adopts a deep learning approach and multiple prediction methods to perform occlusion prediction, and achieves real-time processing on an embedded platform, which can well solve the pain points of existing pedestrian counting.

[0081] The above description is only a preferred embodiment of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be proposed without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A TOF camera pedestrian counting method based on hardware front end, characterized in that: The following steps are involved: Step 1: Obtain several pedestrian up-and-down videos from the data set collected by the TOF camera and annotate them to form a learning sample set; Step 2: Deep neural network object detector training; Step 3: Perform image enhancement processing on the newly acquired image to be identified; Step 4: Use the deep neural network target detector trained in step 2 to detect and locate passengers in the image to be identified processed in step 3; Step 5: Send the detected passenger location information as input to the tracking system for target trajectory detection / prediction; Step 6: The counting system counts the passengers in the field of view using the three-line method according to the target trajectory tracked in step 5; Step 5 specifically includes: 1) If no target is detected in the current frame, predict the trajectory of all targets in the previous frame; 2) If a target is detected in the current frame and no target was detected in the previous frame, a new ID is registered for all targets in the current frame; 3) If a target is detected in the current frame and a target is detected in the previous frame, the Hungarian matching algorithm is performed to assign IDs to all targets in the current frame; 4) If a new ID appears in the current frame, register the new ID; 5) If a missing ID appears in the current frame, predict its trajectory; 6) If the target trajectory or predicted trajectory exceeds the field of view, or the length of continuous missed detection exceeds the corresponding threshold, the target will be deregistered; The specific method of predicting trajectory is as follows: S1. If the missed ID is close to the upper edge of the image to be identified, the predicted trajectory is predicted at a uniform speed according to the trajectory of the lower edge of the bounding box of the deep neural network object detector obtained in step 2; S2. If the missed ID is close to the lower edge of the image to be identified, the predicted trajectory is predicted at a uniform speed according to the trajectory of the upper edge of the bounding box of the deep neural network object detector obtained in step 2; S3. If the missed ID is in the center of the field of view, the position of the target source that causes the ID target to be blocked is also first searched in the field of view; S4, if the occlusion source is above the missed ID, the predicted trajectory is predicted at a uniform speed according to the trajectory of the lower edge of the bounding box of the deep neural network object detector obtained in step 2; S5. If the occlusion source is below the missed ID, the predicted trajectory is predicted at a uniform speed according to the trajectory of the upper edge of the bounding box of the deep neural network object detector obtained in step 2; The threshold in step 6) is an adaptive threshold, which is designed as follows: a. If the target is at the lower boundary when it is missed and the speed direction is upward, or if the target is at the upper boundary when it is missed and the speed direction is downward, it means that the target has just entered the field of view, and its threshold is set to 8; b. If the target is at the lower boundary when it is missed and the speed direction is downward, or if the target is at the upper boundary when it is missed and the speed direction is upward, it means that the target is out of the field of view, and its threshold is set to 1; c. If the target is in the middle of the field of view when it is missed, set its threshold to 20.

2. According to a TOF camera pedestrian counting method based on hardware front end according to claim 1, it is characterized in that: In step 1, a number of pedestrian up-and-down videos are collected through a TOF camera and manually annotated to form a learning sample set; the amount of sample data is greater than or equal to 5,000.

3. According to a TOF camera pedestrian counting method based on hardware front end according to claim 1, it is characterized in that: Step 2 specifically includes: Step 2.1, convert the learning sample set into the VOC standard dataset format; Step 2.2: Input the converted VOC standard data set into the deep neural network for training to generate a deep neural network target detector. Perform model testing every 50 times and select the model with the best performance to save. After reaching the training times, the model finally saved is the trained deep neural network target detector.

4. According to claim 3, a TOF camera pedestrian counting method based on hardware front end is characterized in that: The deep neural network is YOLO, Fast-RCNN, Faster-RCNN or SSD.

5. The method for counting pedestrians using a TOF camera based on a hardware front end according to claim 1, characterized in that: The specific enhancement processing in step 3 is: the brightness of the image to be recognized newly acquired by the TOF camera is increased, and the maximum brightness is kept at 255.

6. The method for counting pedestrians using a TOF camera based on a hardware front end according to claim 1, characterized in that: Step 6 specifically includes: Step 6.1: When the target enters the field of view, record whether it enters from above or below; Step 6.2, if the target disappears below / above the center line, the corresponding down / up counter is incremented by one; Step 6.3: If the target has / superior Line behavior, without waiting for the target to disappear, the corresponding down / up counter is increased by one, and the variable recording the direction of entering the field of view at this time is reversed, that is, up becomes down, and down becomes up.