A kind of wisdom railway station flow of the people monitoring system and method
Technical field
The present invention relates to monitoring technology fields, and in particular to a kind of wisdom railway station flow of the people monitoring system.
Background technique
People in daily life, can enter and leave various public places daily, arrive market, airport and railway station greatly, small to ground
Iron station or some concert and arena.These are all that the intensive place of flow of the people, especially railway station, railway station are daily
A large amount of flow of the people will be subject, administrative staff pay close attention to this needs, to prevent congestion and the hairs of emergency cases such as trample
It is raw.
Traditional method is that manager arranges a large amount of manpower to go on patrol, and is effectively dredged flow of the people, is prevented
The generation of emergency event.Meanwhile auxiliary monitoring is carried out using the camera installed at various locations, arrange special messenger's real time inspection.
But implement the method managed not only labor intensive, increase cost in the region of each flow of the people high concentration by manpower, and
And precision is not also high, and camera etc. has not been made full use of to monitor resource.Once emergency event occurs, this cannot be grasped in time
The flow of the people specific value in region is not easy to determine the evacuation and emergency mode for needing to take which kind of rank.
The human face detection tech of present mainstream carries out model development and instruction for application yellow and white facial characteristics
Practice, and the illumination condition in sample is good, and yellow and white face can be preferably detected from video.But
It is that existing algorithm and technology can not cope with Black people and the bad situation of illumination condition, no to the detection existing defects of Black people's face
The face of Black people can be detected well in camera video and photo, it is right especially under the conditions ofs complex background and backlight etc.
The detection of Black people's face is more difficult.For the Face datection of black race, by the end of currently, in the industry temporarily without set of effective
Solution.
Summary of the invention
In view of the deficiencies of the prior art, the present invention is intended to provide a kind of wisdom railway station flow of the people monitoring system, Ke Yichong
Point using camera etc. monitoring resource flow of the people is monitored automatically, the accuracy of Face datection is higher, more save manpower with
Material resources.
To achieve the goals above, the present invention adopts the following technical scheme:
A kind of wisdom railway station flow of the people monitoring system, comprising:
Data acquisition module: described including disposing the cam device of each position and corresponding controller at the train station
Cam device is used to obtain the video data of position and is transmitted to the controller being attached thereto, and controller is transmitted separately to
Data Analysis Platform and monitor terminal;
Data Analysis Platform: including Face datection model, big data analysis module, map components module and storage mould
Block;The Face datection model is used for detecting all people's face data in video data acquired in each cam device
And it stores in a storage module;The big data analysis module is used for the people in each video data stored in memory module
Face quantity is counted, to obtain the face of video data acquired in the cam device of each position under various time points
Quantity, and then count and obtain various time points and detrain the flow of the people data and flow of the people trend of each position of standing, and according to setting
The flow of the people of each position in the following one section of set period of time of the flow of the people trend prediction fixed time in section, when certain predicted
The flow of the people of a position alarm when can be more than preset flow of the people threshold value and quickly indicates responding in conjunction with map assembly module
Position;Map components module is used to store the position of each cam device;
The Face datection model uses MTCNN model, and training obtains in the following way: first collecting white people, Huang
The human face data of kind people, black race, then tentatively instruct MTCNN model using the human face data of white people and yellow
Practice, after reaching the required precision of setting, using the method for transfer learning, then using the human face data of black race to preliminary instruction
The MTCNN model got is trained again, obtains required Face datection model;
Monitor terminal: for receiving data under the collected railway station various time points of acquisition module each position video
Data are simultaneously shown for use as real time monitoring, and following one section of set period of time endogenous fire is obtained from Data Analysis Platform
The each flow of the people trend prediction result in station and warning message are simultaneously shown.
Further, the data acquisition module further includes having lighting device, the lighting device and camera dress
The each position installed together at the train station is set, and is connected to the controller.
Further, the training precision of MTCNN model is also improved by online hard sample mining method,
Specifically: in the training process, train the error in batch to carry out descending sort each, and by ranking results preceding 70%
Sample error take out, carry out error propagation, correct MTCNN model parameter.
Further, in the training of MTCNN model, the image of input is zoomed in and out.
Further, in the training of MTCNN model, using the method for carrying out selective learning for difficult sample.
The present invention also provides a kind of methods for carrying out the monitoring of railway station flow of the people using above system, include the following steps:
Step S1, the cam device for disposing each position at the train station obtains the video data of position and is transmitted to
The controller connected, controller is by video data transmission to Data Analysis Platform and monitor terminal, and monitor terminal is by video counts
It is monitored in real time according to display for staff;
Step S2, in Data Analysis Platform, the Face datection model is to detecting acquired in each cam device
All people's face data store in a storage module in video data;The big data analysis module in memory module to storing
Face quantity in each video data is counted, so that the cam device for obtaining each position under various time points is obtained
The face quantity of the video data taken, so count obtain various time points detrain stand each position flow of the people data and people
Traffic trends, and according to the people of each position in the following one section of set period of time of flow of the people trend prediction in set period of time
Flow alarm when the flow of the people of some position predicted can be more than preset flow of the people threshold value and combines map components
Module quickly indicates responding position;Data Analysis Platform can extremely supervise flow of the people trend prediction result and warning message real-time Transmission
Control terminal is shown, is checked for staff.
The beneficial effects of the present invention are:
1, present system by the cam device that each region is installed be transmitted back to come video data located in real time
Reason goes out whole face included in video as obtaining Face datection model inspection using the training of specially designed training method,
It is counted via the face that big data analysis goes out model inspection, statistics and analysis, the flow of the people depicted in the region becomes
Gesture, and historical data can be called look at any time.When predicting certain region flow of the people and reaching default warning value and Times
It is alert, and after the map of bond area, it provides accurate location and reaches route, arrangement personnel precisely dispose, and realize intelligence control.
2, the Face datection model of present system can accurately detect the yellow occurred in video, white people and Hei
Kind people, is accurately detected whole face included in video, carries out precisely so as to realize to monitoring area flow of the people
Statistics and analysis.
Detailed description of the invention
Fig. 1 is the system composition schematic diagram of the embodiment of the present invention 1;
Fig. 2 is the method flow schematic diagram in the embodiment of the present invention 2;
Fig. 3 is the training flow diagram of the MTCNN model in the embodiment of the present invention 1;
Fig. 4 is the general frame schematic diagram of MTCNN model.
Specific embodiment
Below with reference to attached drawing, the invention will be further described, it should be noted that the present embodiment is with this technology side
Premised on case, the detailed implementation method and specific operation process are given, but protection scope of the present invention is not limited to this reality
Apply example.
It will make simplicity of explanation to technical term involved in embodiment below:
Transfer learning refers to trained model, does the adjustment of some directionality, then moves to one
On related problem.
Tolerance refers to the range for the scene brightness contrast that film can be accommodated correctly, and the tolerance the high, can accommodate bigger
Luminance contrast.
Embodiment 1
The present embodiment provides a kind of wisdom railway station flow of the people monitoring systems, as shown in Figure 1, comprising:
Data acquisition module: described including disposing the cam device of each position and corresponding controller at the train station
Cam device is used to obtain the video data of position and is transmitted to the controller being attached thereto, and controller is transmitted separately to
Data Analysis Platform and monitor terminal;
Data Analysis Platform: including Face datection model, big data analysis module, map components module and storage mould
Block;The Face datection model is used for detecting all people's face data in video data acquired in each cam device
And it stores in a storage module;The big data analysis module is used for the people in each video data stored in memory module
Face quantity is counted, to obtain the face of video data acquired in the cam device of each position under various time points
Quantity, and then count and obtain various time points and detrain the flow of the people data and flow of the people trend of each position of standing, and according to setting
The flow of the people of each position in the following one section of set period of time of the flow of the people trend prediction fixed time in section, when certain predicted
The flow of the people of a position alarm when can be more than preset flow of the people threshold value and quickly indicates responding in conjunction with map assembly module
Position;Map components module is used to store the position of each cam device;
The Face datection model uses MTCNN model, and training obtains in the following way: visiting because can currently disclose
The human face data collection asked is mostly yellow and white people, and the human face data of Black people is very rare.Can have by transfer learning
Effect is to solving the problems, such as that data are unequal, data are rare.The human face data of white people, yellow, black race are first collected, then
Initial training is carried out to MTCNN model using the human face data of white people and yellow, after reaching the required precision of setting,
Using the method for transfer learning, then the MTCNN model that initial training obtains is carried out again using the human face data of black race
Training, obtains required Face datection model, as shown in Figure 3.
Specifically, it migrates in the MTCNN model for obtaining initial training and is instructed again in the human face data to black race
When practicing, model parameter can be finely adjusted according to actual needs.
Monitor terminal: for receiving data under the collected railway station various time points of acquisition module each position video
Data are simultaneously shown for use as real time monitoring, and following one section of set period of time endogenous fire is obtained from Data Analysis Platform
The each flow of the people trend prediction result in station and warning message are simultaneously shown.
In the present embodiment, the data acquisition module further includes having lighting device, the lighting device and the camera shooting
Head device installs each position at the train station together, and is connected to the controller.It may be implemented by the way that lighting device is arranged
Black race is set to be easier to capture in camera picture by changing light conditions, to promote the property of black race's Face datection
Energy.The cam device that high tolerance can also further be used, can make the face of black race more obvious in video,
It is more accurate to detect.
In the present embodiment, the training essence of MTCNN model is also improved by online hard sample mining method
Degree, specifically: in the training process, train the error in batch to carry out descending sort each, and will be before in ranking results
70% sample error is taken out, and error propagation is carried out, and corrects the parameter of MTCNN model.
In the present embodiment, in the training of MTCNN model, the image of input is zoomed in and out, makes the people trained
Face detection model has preferable precision under different images scale.
In the present embodiment, in the training of MTCNN model, using the method for carrying out selective learning for difficult sample,
I.e. in the case where recognition of face error (can less be determined) by being less than the threshold value of setting without parameters revision, for accidentally
The face sample of poor larger (can be determined by being greater than or waiting the threshold value of settings) carries out parameters revision.Due to the skin of black race
Color is deeper, and more people overlap each other the case where there are erroneous detection or missing inspections, the model trained can be made to be directed to using the above method
Difficult sample has better recognition capability.
It should be noted that the overall network structure of MTCNN model is as shown in figure 4, original image is needed by three nets
Network layers grade, cascade structure is used between network, i.e., multiple convolutional network models (CNN) are together in series.Input picture is carried out more
Secondary prediction is constantly promoted for Face datection task accuracy.MTCNN model is divided into three parts in structure, is P- respectively
Net, R-Net, O-Net, each part will carry out three kinds of tasks, predicted whether as face, the positioning of face bounding box respectively
The prediction of 5 key points (left eye, right eye, nose, the left corners of the mouth, the right corners of the mouth) of point prediction and face, can mention from different angles
Rise the accuracy of Face datection.Three portions pers can all screen out some non-face parts, and in the key of original prediction
Make further amendment on the basis of point, model is made to have both real-time and accuracy.
Each level of MTCNN model has corresponding classification information, bounding box information and face key point information, often
Kind information has respective loss function.
(1) for error in classification:
The function is the error function for classification, referred to as logarithm loss function or log-likelihood loss function, also referred to as
Logistic regression loss function or cross entropy loss function.The function is defined in probability Estimation, will be counted by logarithmic function
Value is converted into the fiducial probability of the category.Logarithm loss realizes the amount of the accuracy to classifier by the classification of punishment mistake
Change.Logarithm loss is minimized to be substantially equivalent to maximize the accuracy of classifier.When calculating loss, it is each of affiliated for inputting
The probability value of classification.
It whether include two classification judgement of face progress for detection zone, if comprising face, while model also predicts packet
Whether containing face, then error is 0, and on the contrary then error is not 0, realized by continuing to optimize error function to comprising face progress essence
Quasi- classification.
(2) for bounding box regression error:
The function is mean square error function, is usually used in regression problem, is the difference square of estimates of parameters and parameter true value
Desired value.The function is to be judged based on distance definition by the square error of corresponding element between predicted value and true value
Whether predicted value is accurate, realizes the quantization to device is returned.Optimization mean square error function can reduce the error of prediction numerical value, count
When calculating loss, the numerical value to be predicted is inputted.
The coordinate points of bounding box upper left and bottom right for face return, and the gap between respective coordinates point is European
Distance differs smaller, and it is more accurate to think to return, and error is smaller, on the contrary then bigger.
(3) for the error of face key point:
The function is similar with the error function of bounding box, is equally mean square error function, by optimizing function realization pair
The regression error of face key point minimizes.It is similar for the optimization method of face key point and the optimization method of bounding box, if
The prediction of key point is more accurate, then error is smaller, on the contrary then bigger.
By optimizing these three loss functions, so that overall error drops to minimum, achieve the effect that Face datection.It should
Algorithm can will input the Face datection entered in picture and come out, and return to corresponding face bounding box and face key point, complete
Face datection task.
Embodiment 2
The present embodiment provides a kind of method for carrying out the monitoring of railway station flow of the people using system described in embodiment 1, such as Fig. 2
It is shown, include the following steps:
Step S1, the cam device for disposing each position at the train station obtains the video data of position and is transmitted to
The controller connected, controller is by video data transmission to Data Analysis Platform and monitor terminal, and monitor terminal is by video counts
It is monitored in real time according to display for staff;
Step S2, in Data Analysis Platform, the Face datection model is to detecting acquired in each cam device
All people's face data store in a storage module in video data;The big data analysis module in memory module to storing
Face quantity in each video data is counted, so that the cam device for obtaining each position under various time points is obtained
The face quantity of the video data taken, so count obtain various time points detrain stand each position flow of the people data and people
Traffic trends, and according to the people of each position in the following one section of set period of time of flow of the people trend prediction in set period of time
Flow alarm when the flow of the people of some position predicted can be more than preset flow of the people threshold value and combines map components
Module quickly indicates responding position;Data Analysis Platform can extremely supervise flow of the people trend prediction result and warning message real-time Transmission
Control terminal is shown, is checked for staff.Staff can also instruct and command to responding personnel accordingly.
For those skilled in the art, it can be provided various corresponding according to above technical solution and design
Change and modification, and all these change and modification, should be construed as being included within the scope of protection of the claims of the present invention.