Indoor passenger flow volume statistical method and system based on infrared and deep learning
1. An indoor passenger flow volume statistical method is characterized by comprising the following steps:
collecting first information when a pedestrian enters a room through a doorway;
acquiring second information at the doorway based on the acquired first information;
and acquiring passenger flow data passing through the doorway based on the acquired second information.
2. The indoor passenger flow volume statistical method according to claim 1, wherein the first information of the pedestrian entering the room through the doorway is collected, specifically: when a pedestrian enters the room through the doorway, the infrared signal emitted by the infrared bijective module installed at the doorway of the entering room is cut off, and the infrared bijective module acquires first information that the pedestrian enters the room through the doorway.
3. The indoor passenger flow volume statistical method according to claim 1, wherein the second information at the doorway is collected based on the collected first information, and specifically comprises: the RGB camera data acquisition module starts and carries out image acquisition to the gate after receiving that there is the pedestrian to get into indoor first information through the gate to the image information of the gate that gathers is as the second information.
4. The indoor passenger flow volume statistical method according to claim 1, wherein the obtaining of the passenger flow volume data through the doorway based on the collected second information is specifically: and inputting the collected second information at the doorway into a trained human body detection model based on deep learning, and acquiring passenger flow data passing through the doorway.
5. The indoor passenger flow volume statistical method according to claim 4, wherein the training method of the deep learning-based human body detection model comprises the following steps:
collecting human body sample data off line, and dividing the human body sample data into a training sample and a test sample;
training and constructing a human body detection model based on training samples and based on deep learning, and adjusting model parameters;
and testing the converged human body detection model based on deep learning based on the test sample, if the test result does not accord with the set detectable rate, continuing training by using the training sample until the test result accords with the set detectable rate, and outputting a model parameter file.
6. An indoor passenger flow volume statistical system, characterized by includes:
the infrared double-emission module is arranged at a doorway for entering the room and is used for collecting first information when a pedestrian enters the room through the doorway;
the RGB camera data acquisition module is used for acquiring second information at the doorway based on the acquired first information;
and the data processing module is used for acquiring the passenger flow data passing through the doorway based on the acquired second information.
7. The indoor passenger flow volume statistic system according to claim 6, wherein when a pedestrian enters the room through the doorway, the infrared signal emitted from the infrared bijective module installed at the doorway of the entering room is cut off, and the infrared bijective module acquires first information that the pedestrian currently enters the room through the doorway.
8. The indoor passenger flow volume statistical system according to claim 6, wherein the RGB camera data collection module is started after receiving the first information sent by the infrared bijection module, and collects images at the doorway, and uses the collected image information at the doorway as the second information.
9. The indoor passenger flow volume statistical system according to claim 6, wherein the data processing module inputs the collected second information at the doorway into a trained human body detection model based on deep learning to obtain the passenger flow volume data passing through the doorway.
10. The indoor passenger flow volume statistical system according to claim 6, further comprising a positioning module and a data transmission module, wherein the positioning module is used for judging and acquiring the position and time information of the current statistical equipment; the data transmission module is used for uploading the passenger flow data passing through the doorway to the upper computer.
Background
The current common passenger flow volume statistical method mainly comprises a manual statistical method and an automatic passenger flow volume counting method based on image vision. The method has the advantages of high accuracy, large workload of personnel and incapability of carrying out online statistics on the number of passengers entering or exiting each site in real time in a real-time manner. The image vision based automatic passenger flow counting method realizes real-time automatic counting of the number of people in a room by combining a network transmission technology and an image vision processing technology. The image vision processing technology mainly detects and tracks the human head entering and exiting an indoor space to realize automatic counting of passenger flow, but the accuracy of the traditional machine learning image processing method is greatly influenced by light, the problems of crowding, hating, backpacks and the like cannot be solved, and the problems of easy false detection or missed detection and the like due to no trigger mechanism exist.
Disclosure of Invention
In order to overcome the defects in the prior art, the invention provides the indoor passenger flow volume statistical method and system based on infrared and deep learning, and the method and system have the characteristics of high human body detection accuracy, low missing detection rate, low false detection rate and the like.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
in a first aspect, an indoor traffic statistic method is provided, including: collecting first information when a pedestrian enters a room through a doorway; acquiring second information at the doorway based on the acquired first information; and acquiring passenger flow data passing through the doorway based on the acquired second information.
Further, gather the first information when having the pedestrian to pass through the gate and get into indoor, specifically do: when a pedestrian enters the room through the doorway, the infrared signal emitted by the infrared bijective module installed at the doorway of the entering room is cut off, and the infrared bijective module acquires first information that the pedestrian enters the room through the doorway.
Further, the acquiring second information at the doorway based on the acquired first information specifically includes: the RGB camera data acquisition module starts and carries out image acquisition to the gate after receiving that there is the pedestrian to get into indoor first information through the gate to the image information of the gate that gathers is as the second information.
Further, the acquiring passenger flow volume data through the doorway based on the acquired second information specifically includes: and inputting the collected second information at the doorway into a trained human body detection model based on deep learning, and acquiring passenger flow data passing through the doorway.
Further, the training method of the human body detection model based on deep learning comprises the following steps: collecting human body sample data off line, and dividing the human body sample data into a training sample and a test sample; training and constructing a human body detection model based on training samples and based on deep learning, and adjusting model parameters; and testing the converged human body detection model based on deep learning based on the test sample, if the test result does not accord with the set detectable rate, continuing training by using the training sample until the test result accords with the set detectable rate, and outputting a model parameter file.
In a second aspect, an indoor traffic statistic system is provided, including: the infrared double-emission module is arranged at a doorway for entering the room and is used for collecting first information when a pedestrian enters the room through the doorway; the RGB camera data acquisition module is used for acquiring second information at the doorway based on the acquired first information; and the data processing module is used for acquiring the passenger flow data passing through the doorway based on the acquired second information.
Further, when a pedestrian enters the room through the doorway, the infrared signal emitted by the infrared bijective module installed at the doorway of the entering room is cut off, and the infrared bijective module acquires first information that the pedestrian enters the room through the doorway.
Furthermore, the RGB camera data acquisition module is started after receiving the first information sent by the infrared bijection module, and performs image acquisition on the portal, so that the acquired image information of the portal is used as second information.
Further, the data processing module inputs the collected second information at the doorway into a trained human body detection model based on deep learning, and passenger flow volume data passing through the doorway are obtained.
The system further comprises a positioning module and a data transmission module, wherein the positioning module is used for judging and acquiring the position and time information of the current statistical equipment; the data transmission module is used for uploading the passenger flow data passing through the doorway to the upper computer.
Compared with the prior art, the invention has the following beneficial effects:
(1) according to the invention, the infrared double-shot sensor is combined to collect the first information when a pedestrian enters the room through the doorway, the RGB camera is started to collect the image information at the doorway as the second information when the pedestrian passes through, and the trained human body detection model based on deep learning is utilized to obtain the passenger flow data passing through the doorway, so that the problems that the accuracy of the traditional machine learning image processing method is greatly influenced by light, and the problems of crowding, hating, knapsack, easiness in false detection or missing detection and the like cannot be solved are solved, and the method has the characteristics of high human body detection accuracy, missing detection, low false detection rate and the like;
(2) the invention has stronger applicability to the conditions of various postures of human bodies and complex backgrounds; the statistical data can be transmitted to the monitoring center in real time, and the background can conveniently control and count; the cost is lower, and the efficiency is higher.
Drawings
Fig. 1 is a schematic system architecture diagram of an indoor passenger flow volume statistical system based on infrared and deep learning according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating passenger flow statistics according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating image detection in passenger flow statistics according to an embodiment of the present invention.
Detailed Description
The invention is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
The first embodiment is as follows:
as shown in fig. 1 to 3, an indoor passenger flow volume statistical method based on infrared and deep learning includes: collecting first information when a pedestrian enters a room through a doorway; acquiring second information at the doorway based on the acquired first information; and acquiring passenger flow data passing through the doorway based on the acquired second information.
Gather the first information when having the pedestrian to get into indoor through the gate, specifically do: when a pedestrian enters the room through the doorway, the infrared signal emitted by the infrared bijective module installed at the doorway of the entering room is cut off, and the infrared bijective module acquires first information that the pedestrian enters the room through the doorway. Based on the first information of gathering, gather the second information of gate department, specifically do: the RGB camera data acquisition module starts and carries out image acquisition to the gate after receiving that there is the pedestrian to get into indoor first information through the gate to the image information of the gate that gathers is as the second information. Based on the second information that gathers, acquire the passenger flow volume data through the gate, specifically do: and inputting the collected second information at the doorway into a trained human body detection model based on deep learning, and acquiring passenger flow data passing through the doorway. The training method of the human body detection model based on deep learning comprises the following steps: collecting human body sample data off line, and dividing the human body sample data into a training sample and a test sample; training and constructing a human body detection model based on training samples and based on deep learning, and adjusting model parameters; and testing the converged human body detection model based on deep learning based on the test sample, if the test result does not accord with the set detectable rate, continuing training by using the training sample until the test result accords with the set detectable rate, and outputting a model parameter file.
As shown in fig. 2, wherein S1, S2, S3 are off-line training stages for human body detection, and are mainly used for training parameters of a human body detection model based on deep learning, which has ideal effect and convergence, for on-line detection in an on-line stage; s4, S5, S6, S7, S8 and S9 are online real-time statistics and data uploading stages. The indoor passenger flow volume statistical method based on infrared and deep learning specifically comprises the following steps:
s1, collecting human body sample data off line, dividing the human body sample data into a training sample and a testing sample, and converting the human body sample data into an LMDB format required by a caffe deep learning frame;
s2, building a human body detection model based on deep learning, training and testing through a mask (Convolutional neural network framework) deep learning framework based on sample data, continuously adjusting parameters, and learning to obtain a final model parameter file when the training process is converged;
s3: testing the model obtained by training in the S2 stage by using the test sample, continuing to train the model if the detection rate of the model test is lower than the requirement, and storing the learned model parameters if the detection rate of the model test is lower than the requirement so as to use the model for actual detection in the online stage;
s4, at this stage, infrared sensor systems built on two sides of the population are mainly adopted, and infrared bijection modules are adopted;
s5, the stage is mainly to judge whether the infrared sensor is cut off by the target object, and trigger the signal to start the human body detection system of the image signal, which can effectively reduce the false detection and missing detection;
s6: the stage is mainly to detect the real-time video stream by utilizing the model learned in the off-line stage and store the detected human body information;
s7: the stage is mainly to track the human body target information detected in continuous multi-frame images and determine a plurality of moving objects; as shown in fig. 3, the passenger flow statistics detection diagram based on deep learning is used for counting the passenger flow of the people entering or exiting the detection area defined in advance;
s8: the stage is mainly to analyze and judge the moving target determined in the stage S6 and a preset threshold line, and when the moving target passes through the threshold line, the number is automatically counted;
and S9, if the trigger of the timing signal is detected, uploading the counted final number of the people who enter and exit to a network background.
According to the embodiment, the infrared double-shot sensor is combined to collect first information when a pedestrian enters the room through the doorway, the RGB camera is started to collect image information at the doorway as second information when the pedestrian passes through, and the trained human body detection model based on deep learning is utilized to obtain passenger flow data passing through the doorway, so that the problems that the accuracy of the traditional machine learning image processing method is greatly influenced by light, and congestion, hats, backpacks, easy false detection or missed detection and the like cannot be solved are solved, and the method has the characteristics of high human body detection accuracy, missed detection, low false detection rate and the like; the embodiment has stronger applicability to the conditions of various postures of human bodies and complex backgrounds; the statistical data can be transmitted to the monitoring center in real time, and the background can conveniently control and count; the cost is lower, and the efficiency is higher.
Example two:
based on the first embodiment of the indoor passenger flow volume statistical method based on infrared and deep learning, the present embodiment provides an indoor passenger flow volume statistical system based on infrared and deep learning, including: the system comprises an infrared bijection module, an RGB camera data acquisition module, a positioning module and a transmission module which are respectively electrically connected with a data processing module, wherein as shown in figure 1, the infrared bijection module is arranged at a doorway of an indoor entrance and is used for acquiring first information when a pedestrian enters the indoor entrance through the doorway; the RGB camera data acquisition module is used for acquiring second information at the doorway based on the acquired first information; the data processing module (CPU processing module) is used for acquiring passenger flow data passing through the doorway based on the acquired second information; the positioning module adopts GPS positioning and is used for judging and acquiring the position and time information of the current statistical equipment; the data transmission module is used for transmitting data through a 4G network and uploading passenger flow data passing through a doorway to an upper computer.
When a pedestrian enters the room through the doorway, the infrared signal emitted by the infrared bijective module installed at the doorway of the entering room is cut off, and the infrared bijective module acquires first information that the pedestrian enters the room through the doorway. The RGB camera data acquisition module is started after receiving the first information sent by the infrared bijection module, and carries out image acquisition on the doorway, and the acquired image information of the doorway is used as second information. And the data processing module inputs the acquired second information at the doorway into a trained human body detection model based on deep learning, and acquires passenger flow data passing through the doorway.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.