CN117197944B - Security identification method and equipment for gate equipment - Google Patents

Security identification method and equipment for gate equipment Download PDF

Info

Publication number
CN117197944B
CN117197944B CN202311452268.4A CN202311452268A CN117197944B CN 117197944 B CN117197944 B CN 117197944B CN 202311452268 A CN202311452268 A CN 202311452268A CN 117197944 B CN117197944 B CN 117197944B
Authority
CN
China
Prior art keywords
pedestrian
gate
traffic
pedestrians
predicted
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311452268.4A
Other languages
Chinese (zh)
Other versions
CN117197944A (en
Inventor
李代刚
陆信欣
王林
任江华
陈尚权
王振乾
盘晴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southern Power Grid Energy Storage Co ltd Information And Communication Branch
Original Assignee
Information Communication Branch of Peak Regulation and Frequency Modulation Power Generation of China Southern Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Information Communication Branch of Peak Regulation and Frequency Modulation Power Generation of China Southern Power Grid Co Ltd filed Critical Information Communication Branch of Peak Regulation and Frequency Modulation Power Generation of China Southern Power Grid Co Ltd
Priority to CN202311452268.4A priority Critical patent/CN117197944B/en
Publication of CN117197944A publication Critical patent/CN117197944A/en
Application granted granted Critical
Publication of CN117197944B publication Critical patent/CN117197944B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The present invention relates generally to the field of gate technology. More specifically, the invention relates to a security identification method and device for gate equipment, wherein the method comprises the following steps: acquiring video data near a gate; detecting video frames, determining a predicted track, further determining a predicted distance and predicted time, further determining a priority, and further determining a traffic queue; acquiring a face recognition result and corresponding confidence coefficient of at least one pedestrian in at least one video frame in a traffic queue, further determining a recognition difference degree and a reference confidence coefficient, further determining a traffic rate, and further obtaining a first traffic number; and responding to the actual passing pedestrians including at least one non-allowed pedestrian, carrying out early warning, and determining the non-allowed pedestrians according to the passing rate. The invention solves the potential safety hazard of unknown personnel due to time delay when the gate is released, and the problems of one-to-one check of face information of visiting personnel and lower one-to-one passing efficiency.

Description

Security identification method and equipment for gate equipment
Technical Field
The present invention relates generally to the field of gate technology. More particularly, the invention relates to a security identification method and device for gate equipment.
Background
The existing gate can verify visiting personnel through face recognition technology, has the effect of security protection on areas such as cells, but can cause part of unknown personnel to be mixed in due to certain delay of gate release, so that certain unestimable potential safety hazards are generated on the cells.
In the prior art, a method for checking face information of visiting persons one by one is provided to prevent unknown persons from crossing a gate, wherein the database corresponding to the gate does not have information of the unknown persons, but the efficiency of the visiting persons passing through the gate is lower because only one visiting person passes through each time. Moreover, when the face recognition is performed on the waiting person in the visiting person queue, the face of the waiting person is often shielded by the preceding person and the like, the efficiency of the face recognition performed on the waiting person is low, and the accuracy is low.
Disclosure of Invention
In order to solve one or more of the above technical problems, the present invention proposes to determine the priority of pedestrians according to a predicted trajectory, further obtain a traffic queue, perform face recognition on at least one pedestrian in the traffic queue to determine the traffic rate of the pedestrian, further determine a first number of traffic people, pass the first number of traffic people at a time, and perform early warning on the pedestrians including non-permitted pedestrians. To this end, the present invention provides solutions in various aspects as follows.
In a first aspect of the embodiment of the present invention, a security identification method for a gate device is provided, including: acquiring video data near a gate; detecting video frames in the video data, obtaining a predicted track of at least one pedestrian, further obtaining predicted time for the pedestrian to reach a position near a gate opening and predicted distance between the position near the gate opening and the gate opening, and obtaining the priority of the pedestrian according to the predicted time and the predicted distance; obtaining a traffic queue according to the priority; performing face recognition on at least one identified pedestrian in the passing queue under at least one corresponding video frame to obtain an identification result and a corresponding confidence level, wherein the identification result comprises pedestrian passing and pedestrian refusing, and further the identification difference degree and the reference confidence level are obtained; obtaining the passing rate of the identified pedestrians according to the identification difference degree and the reference confidence; and responding to the actual passing pedestrians including at least one non-allowed pedestrian, and carrying out early warning, wherein the non-allowed pedestrians are determined according to the passing rate.
In one embodiment, obtaining the traffic rate of the identified pedestrians according to the identification difference degree and the reference confidence comprises: the pass rate is according toObtained by (1), wherein->Identifying the traffic rate of pedestrians for the ith, < +.>For normalization function->The degree of recognition difference for the ith recognition pedestrian, < +.>The reference confidence of the pedestrian is identified for the ith.
In one embodiment, the method for obtaining the recognition difference degree and the reference confidence comprises the following steps: acquiring a first confidence coefficient histogram corresponding to pedestrian traffic of the identified pedestrians, wherein the abscissa of the first confidence coefficient histogram is confidence coefficient, the ordinate of the first confidence coefficient histogram is the number of the pedestrian traffic, and fitting the first confidence coefficient histogram according to a Gaussian function to obtain a first Gaussian function model; acquiring a second confidence coefficient histogram corresponding to pedestrian refusal of the identified pedestrian, wherein the abscissa of the second confidence coefficient histogram is the confidence coefficient, the ordinate of the second confidence coefficient histogram is the number of the pedestrian refusal, and fitting the second confidence coefficient histogram according to a Gaussian function to obtain a second Gaussian function model; according to the first Gaussian function model and the second Gaussian function model, the recognition difference degree of the recognized pedestrians is obtained through calculation according to a KL divergence formula; and taking the average value of the confidence coefficient corresponding to at least one pedestrian passing of the identified pedestrians as the reference confidence coefficient of the identified pedestrians.
In one embodiment, obtaining a traffic queue according to the priority comprises: and arranging pedestrians with priorities greater than or equal to a preset priority threshold according to the priorities from large to small to obtain a traffic queue.
In one embodiment, according to theThe predicting time and the predicting distance to obtain the priority of the pedestrian comprises the following steps: the priority is according toObtained by (1), wherein->Priority for the jth pedestrian, +.>For the predicted distance, < > for the jth pedestrian>For the predicted time of the jth pedestrian, < > j>Is an exponential function based on a natural constant e.
In one embodiment, the method for obtaining the predicted distance and the predicted time includes: taking the minimum value of the first position coordinate in the predicted track of the pedestrian and the second position coordinate of the pixel point at the edge of the gate as the predicted distance of the pedestrian; and taking the position coordinate with the smallest distance from the second position coordinate in the predicted track of the pedestrian as a third position coordinate, and taking the absolute value of the difference value of the first sequence value of the current video frame and the second sequence value of the video frame corresponding to the third position coordinate as the predicted time of the pedestrian.
In one embodiment, the method for obtaining the predicted track includes: in a video frame, acquiring a bounding box of the pedestrian, and taking the coordinate of the center of the bounding box as the position coordinate of the pedestrian under the video frame; obtaining an actual track of the pedestrian according to the position coordinates of the pedestrian under at least one video frame; and fitting the actual track according to a least square method to obtain the predicted track of the pedestrian.
In one embodiment, identifying the at least one identified pedestrian in the traffic queue in response to the at least one video frame includes: and carrying out face recognition on a preset number of identified pedestrians in the traffic queue under the condition of corresponding at least one video frame, wherein the at least one video frame comprises at least one historical video frame.
In one embodiment, the pre-warning is performed in response to the actual passing pedestrian comprising at least one non-permitted pedestrian, the non-permitted pedestrian being determined from the traffic rate, comprising: in the front preset number of identified pedestrians, the traffic rate of the front maximum number of pedestrians is larger than a preset traffic threshold, and the maximum number is used as a first traffic number; and responding to the fact that the actual traffic number is equal to the first traffic number, and responding to the fact that the actual traffic number comprises at least one non-allowed pedestrian, and carrying out early warning, wherein the traffic rate of the non-allowed pedestrian is smaller than or equal to the preset traffic threshold value.
In a second aspect of the embodiment of the present invention, there is provided a security identification device facing a gate device, including: a processor and a memory storing computer program instructions which, when executed by the processor, implement the method of any of the embodiments described above.
The beneficial effects of the invention include:
according to the predicted track, the priority of the corresponding pedestrians is obtained, then a traffic queue is obtained, the priority represents the priority degree of the corresponding pedestrian traffic, the priority degree of the pedestrian traffic in the traffic queue is higher, and the pedestrians with higher traffic priority degree are screened out.
And recognizing the face of at least one pedestrian in the passing queue under the condition of corresponding at least one video frame, wherein when the at least one video frame comprises a historical video frame, the position of the pedestrian in the historical video frame is far away from a gate, and the face recognition accuracy of the pedestrian under the historical video frame is higher because the further the face is away from the gate, the higher the possibility that the face is not blocked, and the higher the face recognition accuracy is.
Counting the number of people actually passing through the gate, and controlling the gate to be closed when the number of the actually passing people is equal to the first number of the traffic people. The passing efficiency is high because of passing through a plurality of people at one time. If at least one non-allowed pedestrian is included in the actual passing pedestrians, early warning is carried out, so that the passing pedestrians are safer, and the security effect is better.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
fig. 1 is a flowchart schematically illustrating a security identification method for a gate-oriented device according to an embodiment of the present invention;
fig. 2 is a block diagram schematically showing a configuration of a security identification device for a gate device according to the present embodiment.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart schematically illustrating a security identification method for a gate-oriented device according to an embodiment of the present invention. As shown in fig. 1, first, according to a first aspect of the present invention, there is provided a security identification method for a gate device, including: acquiring video data near a gate; detecting video frames in the video data, obtaining a predicted track of at least one pedestrian, further obtaining predicted time for the pedestrian to reach a position near a gate opening and predicted distance between the position near the gate opening and the gate opening, and obtaining the priority of the pedestrian according to the predicted time and the predicted distance; obtaining a traffic queue according to the priority; performing face recognition on at least one identified pedestrian in the passing queue under at least one corresponding video frame to obtain an identification result and a corresponding confidence level, wherein the identification result comprises pedestrian passing and pedestrian refusing, and further the identification difference degree and the reference confidence level are obtained; obtaining the passing rate of the identified pedestrians according to the identification difference degree and the reference confidence; and responding to the actual passing pedestrians including at least one non-allowed pedestrian, and carrying out early warning, wherein the non-allowed pedestrians are determined according to the passing rate.
The specific description is as follows, including steps S1 to S4:
as shown in fig. 1, in step S1, video data in the vicinity of a gate is acquired.
The gate is provided with a camera module which can be used for collecting RGB image data, the camera module can collect video data of a region in front of the gate in real time, the gate is connected with a data processing center of a security platform through a cable, the gate can transmit the video data to the data processing center in real time through the cable, the data processing center is provided with a database of face data of passable people, and the data processing center can achieve the purpose of security by comparing the face data of the people in the video of the gate with the face data in the database. Therefore, it is necessary to acquire video data in the vicinity of the gate. It should be noted that the security platform may be a community security platform or the like.
As shown in fig. 1, in step S2, a predicted time and a predicted distance are obtained according to a predicted trajectory of a pedestrian, and then a priority of the pedestrian is obtained. Specifically, detecting a video frame in the video data, obtaining a predicted track of at least one pedestrian, further obtaining predicted time for the pedestrian to reach a position near a gate opening and predicted distance between the position near the gate opening and the gate opening, and obtaining the priority of the pedestrian according to the predicted time and the predicted distance.
After the video data is obtained, pedestrian identification and numbering are carried out on video frame images in the video data by utilizing a pre-trained pedestrian detection network, so that a pedestrian detection frame is obtained, wherein the video frames comprise current video frames and historical video frames. And acquiring the priority of the pedestrian according to pedestrian detection results under different video frames in the video data.
For a pedestrian, the position of the pedestrian in different video frames may be different, and thus, the actual trajectory of the pedestrian may be obtained according to the position of the pedestrian in different video frames. The track of the pedestrian has a certain inertia, so that the future track of the pedestrian can be predicted according to the actual track of the pedestrian, and the predicted track comprises the future track of the pedestrian. According to the predicted track of the pedestrian, the predicted time for the pedestrian to reach the position near the gate and the predicted distance between the position near the gate and the gate can be obtained. The prediction time is used for representing the first time from the current moment to the position near the gate of the corresponding pedestrian, and the first time is related to the priority degree of the corresponding pedestrian passing through the gate; the predicted distance is related to a predicted willingness of the corresponding pedestrian to pass through the gate, the willingness being related to a priority of the corresponding pedestrian to pass through the gate. The priority is used for representing the priority degree of the corresponding pedestrians passing through the gate, so that the priority of the corresponding pedestrians can be obtained according to the predicted time and the predicted distance. And the pedestrians with smaller priority degree can not be recognized in the follow-up process according to the priority, so that the calculated amount is reduced.
As shown in fig. 1, in step S3, the recognition difference degree and the reference confidence of at least one recognized pedestrian in the traffic queue are obtained according to the priority, so as to obtain the traffic rate of the recognized pedestrian. Specifically, a traffic queue is obtained according to the priority; performing face recognition on at least one identified pedestrian in the passing queue under at least one corresponding video frame to obtain an identification result and a corresponding confidence level, wherein the identification result comprises pedestrian passing and pedestrian refusing, and further the identification difference degree and the reference confidence level are obtained; and obtaining the traffic rate of the identified pedestrians according to the identification difference degree and the reference confidence.
And carrying out face recognition detection according to the priority of the pedestrian, wherein the face recognition detection efficiency is influenced by more unstable factors when queuing is carried out, so that the historical face recognition result of the pedestrian in the video data is analyzed, and the face recognition result with higher accuracy is obtained. Wherein the instability factors are that the face of the pedestrian is blocked by the pedestrian in front, etc.; the historical face recognition result is obtained according to the historical video frames.
And obtaining a traffic queue according to the priority, wherein the priority degree of pedestrians passing through the gate in the traffic queue is higher. After the traffic queue is obtained, at least one identified pedestrian in the traffic queue is subjected to face recognition under at least one corresponding video frame so as to judge whether the pedestrian can pass. The human face recognition network is a faceNet network. The practitioner may select other suitable existing pre-trained face recognition networks based on the particular real-time scenario.
In a video frame of a pedestrian, the face recognition result of the pedestrian is represented by both passion through the gate and fail to pass through the gate, wherein passion through the gate is represented by passion through the pedestrian and fail to pass through the gate.
The confidence corresponding to the face recognition result refers to the certainty of the neural network to the recognition result, and the greater the confidence is, the more reliable the corresponding recognition result is, namely the greater the possibility that the corresponding recognition result is correct. The face recognition result of a pedestrian under one video frame corresponds to one confidence level.
The recognition difference degree is used for representing the effect of face recognition, the reference confidence is used for representing the overall accuracy degree of pedestrian passing of the result of face recognition on the corresponding pedestrians, the overall accuracy degree of pedestrian passing of the result of face recognition on the corresponding pedestrians is related to whether the corresponding pedestrians can pass, whether the pedestrians can pass can be determined through the pass rate of the corresponding pedestrians, and therefore the pass rate of the corresponding recognized pedestrians can be obtained according to the recognition difference degree and the reference confidence.
As shown in fig. 1, in step S4, early warning is performed in response to the actual passing pedestrian including at least one non-permitted pedestrian, which is determined according to the passing rate.
When the actual passing pedestrians comprise at least one non-allowed pedestrian, the non-passing pedestrians pass through the gate, and early warning is needed, wherein the actual passing pedestrians are pedestrians which pass through the gate at one time. And determining whether the pedestrian can pass or not according to the pass rate of the corresponding pedestrian, and taking the passersby which cannot pass as the non-allowed passersby.
In one embodiment, the method for obtaining the predicted track includes: in a video frame, acquiring a bounding box of the pedestrian, and taking the coordinate of the center of the bounding box as the position coordinate of the pedestrian under the video frame; obtaining an actual track of the pedestrian according to the position coordinates of the pedestrian under at least one video frame; and fitting the actual track according to a least square method to obtain the predicted track of the pedestrian.
After the video data is acquired, the pedestrian detection is performed on the video frames in the video data by adopting a pedestrian re-recognition pre-training neural network model with pedestrian detection. In this embodiment, a pre-trained yolov8 neural network model is selected to perform pedestrian detection on the video frame image.
In a video frame with a pedestrian, acquiring a bounding box of the pedestrian, acquiring the center of the bounding box by using the existing bounding box center extraction method, and taking the coordinate corresponding to the center as the position coordinate of the pedestrian under the video frame. And in other video frames with the pedestrian, similarly, acquiring the position coordinates corresponding to the video frames of the pedestrian. And according to the position coordinates respectively corresponding to the different video frames of the pedestrian, the different video frames all have images of the pedestrian, and a position coordinate sequence of the pedestrian is obtained, wherein the position coordinate sequence can represent an actual track. And performing multiple fitting on the position coordinate sequence of the pedestrian according to a least square method to obtain a predicted position coordinate sequence of the pedestrian, wherein the predicted position coordinate sequence can represent a predicted track of the pedestrian. The least squares method is well known to those skilled in the art and will not be described in detail herein.
In one embodiment, the method for obtaining the predicted distance and the predicted time includes: taking the minimum value of the first position coordinate in the predicted track of the pedestrian and the second position coordinate of the pixel point at the edge of the gate as the predicted distance of the pedestrian; and taking the position coordinate with the smallest distance from the second position coordinate in the predicted track of the pedestrian as a third position coordinate, and taking the absolute value of the difference value of the first sequence value of the current video frame and the second sequence value of the video frame corresponding to the third position coordinate as the predicted time of the pedestrian.
Because the gate has different mounting modes, the position of the gate opening in the video frame is not fixed, and relevant experience personnel can mark the pixel point coordinates of the gate opening in the video frame according to specific implementation scenes. When the gate is marked, only the gate corresponding to the camera is considered, and the gate is marked as a blocky continuous area in the video frame, so that the connected area is extracted from the area corresponding to the gate, and the edge pixel point of the connected area is obtained and is the gate edge pixel point.
And calculating the distance between each position coordinate in the predicted position coordinate sequence of a pedestrian and the position coordinate of each gate edge pixel point, and taking the minimum value of the distance as the predicted distance of the pedestrian. The larger the predicted distance of the pedestrian is, the larger the position of the pedestrian, which is the smallest in the predicted distance from the gate, deviates from the gate, the lower the predicted willingness of the pedestrian to pass through the gate is, and the lower the priority of the pedestrian to pass through the gate is.
When video data is acquired, the time intervals between every two adjacent video frames are equal, each video frame has a sequence value, and for the two adjacent video frames, the difference between the sequence value of the video frame at the later time of generation and the sequence value of the video frame at the other is 1, in other words, the difference between the sequence value of the newer video frame and the sequence value of the other video frame is 1. The absolute value of the difference between the sequence values of the two video frames is positively correlated with the corresponding time interval. The larger the absolute value of the difference between the first sequence value of the current video frame and the second sequence value of the video frame corresponding to the third position coordinate is, the larger the predicted time from the current moment to the position corresponding to the third position coordinate is, the longer the pedestrian needs to reach the gate opening from the current position is, which means that the more the pedestrian deviates from the gate opening, the more the pedestrian deviates to the rear of the queuing queue, and the lower the priority of the pedestrian passing through the gate is, wherein the position of the third position coordinate is the predicted position closest to the gate, the current moment is the moment corresponding to the current video frame, and the current position is the position of the pedestrian under the current video frame. Therefore, the larger the prediction time is, the lower the priority of the corresponding pedestrian passing through the gate.
In one embodiment, obtaining the priority of the pedestrian according to the predicted time and the predicted distance includes: the priority is according toObtained by (1), wherein->Priority for the jth pedestrian, +.>For the predicted distance, < > for the jth pedestrian>For the predicted time of the jth pedestrian, < > j>Is an exponential function based on a natural constant e.
If the predicted track of a pedestrian approaches the gate, and the predicted time for the pedestrian to reach the gate from the current moment is shorter, the priority of the pedestrian passing through the gate is higher.
The smaller the predicted distance of the jth pedestrian, the higher the priority of the pedestrian passing through the gate. The priority of a pedestrian passing through the gate is characterized by the priority of the pedestrian. The smaller the predicted distance of the jth pedestrian, the greater the priority of the jth pedestrian.
The smaller the predicted time of the jth pedestrian, the greater the priority of the pedestrian passing through the gate. The priority of a pedestrian passing through the gate is characterized by the priority of the pedestrian. The smaller the predicted time of the jth pedestrian, the greater the priority of the jth pedestrian.
The sum of the predicted distance and predicted time of the jth pedestrian is inversely related to the priority of the pedestrian, so that the sum of the predicted distance and predicted time of the jth pedestrian can be mappedThe priority of the pedestrian is obtained. The higher the priority of the jth pedestrian, the higher the priority of the pedestrian passing through the gate. In one embodiment, the function of the negative correlation map may beA function. In other embodiments, the function of the negative correlation map may select other negative correlation map functions.
For example, if the predicted distance of pedestrian a is small compared to the predicted distance of pedestrian b and the predicted time of pedestrian a is small compared to the predicted time of pedestrian b, then the priority of pedestrian a is greater than the priority of pedestrian b.
In one embodiment, obtaining a traffic queue according to the priority comprises: and arranging pedestrians with priorities greater than or equal to a preset priority threshold according to the priorities from large to small to obtain a traffic queue.
When detecting pedestrians according to video frames, a pedestrian corresponds to a priority, and it is possible that all people have low priority or some people have low priority, and for people with low priority, face recognition should not be performed, so that traffic rate calculation is not needed. Therefore, pedestrians with priorities greater than or equal to a preset priority threshold are ranked according to the priorities from large to small, and a traffic queue is obtained, wherein the pedestrians in the traffic queue have higher priorities. In the present embodiment, the preset priority threshold is set to 5. In other embodiments, the preset priority threshold may be set by the practitioner at his or her discretion depending on the particular scenario.
In one embodiment, identifying the at least one identified pedestrian in the traffic queue in response to the at least one video frame includes: and carrying out face recognition on a preset number of identified pedestrians in the traffic queue under the condition of corresponding at least one video frame, wherein the at least one video frame comprises at least one historical video frame.
The face recognition and the traffic rate calculation can be performed for each person, but this leads to an excessive amount of calculation, and further, in order to reduce the amount of calculation, the face recognition and the traffic rate calculation are performed for the front preset number of pedestrians in the traffic queue, which is 5 in this embodiment. The predetermined number is a super parameter. In other embodiments, the practitioner may set the pre-set number according to the specific implementation scenario. It should be noted that, the priority of the pre-set number of pedestrians is higher.
Because the pedestrian is nearer to the gate, the front view of the face of the pedestrian can not necessarily be taken by the corresponding camera, and the possibility that the face of the pedestrian is blocked by other pedestrians and the like when the pedestrian is queued is higher, so that the accuracy of face recognition of the pedestrian is lower. However, since the pedestrian is far from the gate at the corresponding position of the historical video frame, the possibility of capturing the face of the pedestrian is high when the pedestrian is far from the gate, and since the possibility of shielding the face of the pedestrian is low when the pedestrian is far from the gate, and the pedestrian is captured to different video frames at different distances, the possibility of shielding the face of the pedestrian in the different video frames is low, and if the face of the pedestrian in the different video frames is shielded, the pedestrian may intentionally shield the face, and the pedestrian has a safety risk. Accordingly, at least one identified pedestrian in the traffic queue is identified as having face recognition with respect to at least one video frame that includes at least one historical video frame.
In one embodiment, the method for obtaining the recognition difference degree and the reference confidence comprises the following steps: acquiring a first confidence coefficient histogram corresponding to pedestrian traffic of the identified pedestrians, wherein the abscissa of the first confidence coefficient histogram is confidence coefficient, the ordinate of the first confidence coefficient histogram is the number of the pedestrian traffic, and fitting the first confidence coefficient histogram according to a Gaussian function to obtain a first Gaussian function model; acquiring a second confidence coefficient histogram corresponding to pedestrian refusal of the identified pedestrian, wherein the abscissa of the second confidence coefficient histogram is the confidence coefficient, the ordinate of the second confidence coefficient histogram is the number of the pedestrian refusal, and fitting the second confidence coefficient histogram according to a Gaussian function to obtain a second Gaussian function model; according to the first Gaussian function model and the second Gaussian function model, the recognition difference degree of the recognized pedestrians is obtained through calculation according to a KL divergence formula; and taking the average value of the confidence coefficient corresponding to at least one pedestrian passing of the identified pedestrians as the reference confidence coefficient of the identified pedestrians.
The method of fitting the histogram according to the gaussian function is well known to those skilled in the art, and will not be described herein. The KL divergence formula is a prior art well known to those skilled in the art and will not be described in detail herein. It should be noted that, if the difference between the first gaussian function model and the second gaussian function model is larger, the corresponding recognition difference degree is larger. Conversely, if the difference between the first gaussian function model and the second gaussian function model is smaller, the corresponding recognition difference degree is smaller.
For a recognized pedestrian, the face recognition result of the recognized pedestrian under different video frames and the confidence corresponding to the face recognition result are obtained. The recognition result is only in two cases of pedestrian traffic and pedestrian refusal under the same video frame, and under the condition of good face recognition effect, a large difference exists between the two cases of pedestrian traffic and pedestrian refusal, namely the number of pedestrian traffic is large, the confidence degree of pedestrian traffic correspondence is large, or the number of pedestrian refusal is large, and the confidence degree of pedestrian refusal correspondence is large. Under the condition of poor face recognition effect, small difference exists between the two conditions of pedestrian traffic and pedestrian refusal, and the corresponding possibility that the pedestrian cannot pass through the gate is high.
In order to measure the difference between the pedestrian passing condition and the pedestrian refusing condition of a recognized pedestrian, the recognition difference degree of the recognized pedestrian is calculated and obtained through a KL divergence formula according to a first Gaussian function model and a second Gaussian function model, and the recognition difference degree is used for representing the difference between the two conditions.
The larger the difference between the pedestrian passing condition and the pedestrian refusing condition of the identified pedestrian is, the larger the difference between the first Gaussian function model and the second Gaussian function model is, and the larger the identification difference degree of the identified pedestrian is. The degree of difference is used to characterize the effect of face recognition. The greater the recognition difference degree is, the better the effect of carrying out face recognition on the corresponding recognized pedestrians is.
Instead of selecting the average value of the confidence levels corresponding to the at least one pedestrian rejection of the identified pedestrian as the reference confidence level of the identified pedestrian, the average value of the confidence levels corresponding to the at least one pedestrian pass of the identified pedestrian is selected as the reference confidence level of the identified pedestrian, because it is necessary to determine whether the identified pedestrian can pass for the pedestrian pass according to the identification result of the identified pedestrian.
In another embodiment, an average value of confidence levels corresponding to each pedestrian traffic of a recognized pedestrian is selected as the reference confidence level of the recognized pedestrian.
The face recognition result of a recognition pedestrian under one video frame corresponds to a confidence level, and the more the confidence level is, the more reliable the face recognition result is, namely the more the corresponding recognition result is likely to be correct. Therefore, the greater the reference confidence of the pedestrian, the greater the overall accuracy of pedestrian traffic as a result of the face recognition of the corresponding identified pedestrian.
In one embodiment, obtaining the traffic rate of the identified pedestrians according to the identification difference degree and the reference confidence comprises: the pass rate is according toObtained by (1), wherein->Identifying the traffic rate of pedestrians for the ith, < +.>For normalization function->The degree of recognition difference for the ith recognition pedestrian, < +.>The reference confidence of the pedestrian is identified for the ith.
The greater the degree of recognition difference of the ith recognition pedestrian, the better the effect of recognizing the face of the corresponding recognition pedestrian, and the higher the degree to which the pedestrian should pass through the gate. The extent to which the pedestrian should pass through the gate is characterized by the pedestrian's rate of passage. Therefore, the greater the degree of the recognition difference of the i-th recognition pedestrian, the greater the pass rate of the pedestrian.
The greater the reference confidence of the ith identified pedestrian, the greater the overall accuracy of the pedestrian traffic as a result of the face recognition of the corresponding identified pedestrian, and the greater the degree to which the pedestrian should pass through the gate. The extent to which the pedestrian should pass through the gate is characterized by the pedestrian's rate of passage. Thus, the greater the reference confidence of the ith identified pedestrian, the greater the pass rate of that pedestrian.
The bigger and +.>The larger the i-th recognition result of the pedestrian is, the more the number of pedestrians pass through is indicated, the confidence corresponding to the pedestrian pass through is higher, and the difference between the two situations of pedestrian pass through and pedestrian refusal of the recognition pedestrians is more obvious.
The product of the recognition difference degree of the ith recognition pedestrian and the reference confidence is positively correlated with the traffic rate of the pedestrian, so that the traffic rate of the pedestrian can be obtained by normalizing the product. The greater the rate of passage, the greater the extent to which the pedestrian should pass through the gate. In one embodiment, the normalization function may beNormalizing the function. In other embodiments, the normalization function may select other normalization functions.
As an example, if the degree of recognition difference of the recognition pedestrian c is large compared to the degree of recognition difference of the recognition pedestrian d, and the reference confidence of the recognition pedestrian c is large compared to the reference confidence of the recognition pedestrian d, the traffic rate of the recognition pedestrian c is larger than the traffic rate of the recognition pedestrian d.
In one embodiment, the pre-warning is performed in response to the actual passing pedestrian comprising at least one non-permitted pedestrian, the non-permitted pedestrian being determined from the traffic rate, comprising: in the front preset number of identified pedestrians, the traffic rate of the front maximum number of pedestrians is larger than a preset traffic threshold, and the maximum number is used as a first traffic number; and responding to the fact that the actual traffic number is equal to the first traffic number, and responding to the fact that the actual traffic number comprises at least one non-allowed pedestrian, and carrying out early warning, wherein the traffic rate of the non-allowed pedestrian is smaller than or equal to the preset traffic threshold value.
And in the preset number of identified pedestrians, taking the position coordinate with the smallest distance from the pixel point at the edge of the gate in a predicted position coordinate sequence of one pedestrian as a third position coordinate. When the pedestrian with the maximum priority reaches the position corresponding to the corresponding third position coordinate, if the traffic rate is larger than the preset traffic threshold value, the pedestrian with the maximum priority can pass; similarly, judging whether pedestrians with the next highest priority can pass; and the like, until the situation that the pedestrian is judged to be non-passable occurs, the passable pedestrian passing rate is smaller than or equal to a preset passing threshold value, or the number of the previous preset number of identified pedestrians can pass, and the number of passable persons is accumulated, wherein the accumulated number of passable persons is stopped when the pedestrian is judged to be non-passable. The accumulated number of passable people is the first passer number, and passers-by is the non-allowed passer.
In one embodiment, the preset pass threshold is set to 0.8. In other embodiments, the preset pass threshold is set by the practitioner on his own according to the specific real-time scenario.
The actual passersby is the pedestrian that passes through the floodgate machine in fact once, and actual passersby is the pedestrian's that passes through the floodgate machine in fact once that corresponds quantity, and this quantity can be counted the people that passes through the floodgate machine by the inductive device who corresponds the floodgate machine and obtain, when actual passersby equals with first passersby, controls the floodgate machine and closes, prevents that other pedestrians from passing again, appears two kinds of situations this moment: in the first case, corresponding actual passers-by includes non-allowed passers-by, early warning is carried out, and then security identification of the gate equipment is completed; in the second case, the corresponding actual traffic pedestrians do not include non-permitted pedestrians, early warning is not carried out, the traffic queue is recalculated, and the next cycle is entered.
As an example, when the pedestrian g with the greatest priority reaches the position corresponding to the corresponding third position coordinate, if the traffic rate is 0.9, the preset traffic threshold is set to 0.8, and when the pedestrian f with the next greatest priority reaches the position corresponding to the corresponding third position coordinate, if the traffic rate is 0.7, the first traffic number is 1. After a corresponding gate senses that a person passes, the gate is controlled to be closed, and if the actual passing pedestrians comprise non-allowed pedestrians, early warning is carried out.
Fig. 2 is a block diagram schematically showing a configuration of a security identification device for a gate device according to the present embodiment.
The invention also provides security identification equipment for the gate equipment. As shown in fig. 2, the device includes a processor and a memory, where the memory stores computer program instructions that, when executed by the processor, implement a security identification method for a gate-oriented device according to the first aspect of the present invention.
The device also includes other components known to those skilled in the art, such as a communication bus and a communication interface, the arrangement and function of which are known in the art and therefore will not be described in detail herein.
In the context of this patent, the foregoing memory may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, the computer readable storage medium may be any suitable magnetic or magneto-optical storage medium, such as, for example, resistance change Memory RRAM (Resistive Random Access Memory), dynamic Random Access Memory DRAM (Dynamic Random Access Memory), static Random Access Memory SRAM (Static Random-Access Memory), enhanced dynamic Random Access Memory EDRAM (Enhanced Dynamic Random Access Memory), high-Bandwidth Memory HBM (High-Bandwidth Memory), hybrid storage cube HMC (Hybrid Memory Cube), etc., or any other medium that may be used to store the desired information and that may be accessed by an application, a module, or both. Any such computer storage media may be part of, or accessible by, or connectable to, the device. Any of the applications or modules described herein may be implemented using computer-readable/executable instructions that may be stored or otherwise maintained by such computer-readable media.
In the description of the present specification, the meaning of "a plurality", "a number" or "a plurality" is at least two, for example, two, three or more, etc., unless explicitly defined otherwise.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.

Claims (9)

1. A security identification method for gate equipment is characterized by comprising the following steps:
acquiring video data near a gate;
detecting video frames in the video data, obtaining a predicted track of at least one pedestrian, further obtaining predicted time for the pedestrian to reach a position near a gate opening and predicted distance between the position near the gate opening and the gate opening, and obtaining the priority of the pedestrian according to the predicted time and the predicted distance;
obtaining a traffic queue according to the priority; performing face recognition on at least one identified pedestrian in the passing queue under at least one corresponding video frame to obtain an identification result and a corresponding confidence level, wherein the identification result comprises pedestrian passing and pedestrian refusing, and further the identification difference degree and the reference confidence level are obtained; obtaining the passing rate of the identified pedestrians according to the identification difference degree and the reference confidence;
responding to the actual passing pedestrians including at least one non-allowed pedestrian, and carrying out early warning, wherein the non-allowed pedestrians are determined according to the passing rate;
acquiring a first confidence coefficient histogram corresponding to pedestrian traffic of the identified pedestrians, wherein the abscissa of the first confidence coefficient histogram is confidence coefficient, the ordinate of the first confidence coefficient histogram is the number of the pedestrian traffic, and fitting the first confidence coefficient histogram according to a Gaussian function to obtain a first Gaussian function model;
the method for acquiring the recognition difference degree and the reference confidence comprises the following steps:
acquiring a second confidence coefficient histogram corresponding to pedestrian refusal of the identified pedestrian, wherein the abscissa of the second confidence coefficient histogram is the confidence coefficient, the ordinate of the second confidence coefficient histogram is the number of the pedestrian refusal, and fitting the second confidence coefficient histogram according to a Gaussian function to obtain a second Gaussian function model;
according to the first Gaussian function model and the second Gaussian function model, the recognition difference degree of the recognized pedestrians is obtained through calculation according to a KL divergence formula;
and taking the average value of the confidence coefficient corresponding to at least one pedestrian passing of the identified pedestrians as the reference confidence coefficient of the identified pedestrians.
2. The security recognition method for gate equipment according to claim 1, wherein obtaining the traffic rate of the recognized pedestrians according to the recognition difference degree and the reference confidence comprises:
the pass rate is according toObtained by (1), wherein->Identifying the traffic rate of pedestrians for the ith, < +.>For normalization function->The degree of recognition difference for the ith recognition pedestrian, < +.>The reference confidence of the pedestrian is identified for the ith.
3. The security identification method for gate equipment according to claim 1, wherein obtaining a traffic queue according to the priority comprises:
and arranging pedestrians with priorities greater than or equal to a preset priority threshold according to the priorities from large to small to obtain a traffic queue.
4. The security recognition method for a gate device according to claim 1, wherein obtaining the priority of the pedestrian according to the predicted time and the predicted distance comprises:
the priority is according toObtained by (1), wherein->Priority for the jth pedestrian, +.>For the predicted distance, < > for the jth pedestrian>For the predicted time of the jth pedestrian, < > j>Is an exponential function based on a natural constant e.
5. The security identification method for a gate device according to claim 1 or 4, wherein the method for obtaining the predicted distance and the predicted time comprises:
taking the minimum value of the first position coordinate in the predicted track of the pedestrian and the second position coordinate of the pixel point at the edge of the gate as the predicted distance of the pedestrian;
and taking the position coordinate with the smallest distance from the second position coordinate in the predicted track of the pedestrian as a third position coordinate, and taking the absolute value of the difference value of the first sequence value of the current video frame and the second sequence value of the video frame corresponding to the third position coordinate as the predicted time of the pedestrian.
6. The security identification method for a gate device according to claim 1, wherein the method for obtaining the predicted track comprises:
in a video frame, acquiring a bounding box of the pedestrian, and taking the coordinate of the center of the bounding box as the position coordinate of the pedestrian under the video frame;
obtaining an actual track of the pedestrian according to the position coordinates of the pedestrian under at least one video frame; and fitting the actual track according to a least square method to obtain the predicted track of the pedestrian.
7. The security recognition method for a gate device according to claim 1, wherein recognizing the face of at least one pedestrian in the traffic queue under the corresponding at least one video frame comprises:
and carrying out face recognition on a preset number of identified pedestrians in the traffic queue under the condition of corresponding at least one video frame, wherein the at least one video frame comprises at least one historical video frame.
8. The gate-oriented security recognition method of claim 7, wherein the pre-warning is performed in response to an actual passing pedestrian comprising at least one non-permitted pedestrian, the non-permitted pedestrian being determined from the pass rate, comprising:
in the front preset number of identified pedestrians, the traffic rate of the front maximum number of pedestrians is larger than a preset traffic threshold, and the maximum number is used as a first traffic number; and responding to the fact that the actual traffic number is equal to the first traffic number, and responding to the fact that the actual traffic number comprises at least one non-allowed pedestrian, and carrying out early warning, wherein the traffic rate of the non-allowed pedestrian is smaller than or equal to the preset traffic threshold value.
9. Security protection identification equipment towards floodgate machine equipment, characterized in that includes:
a processor and a memory storing computer program instructions which, when executed by the processor, implement a gate device oriented security identification method according to any one of claims 1 to 8.
CN202311452268.4A 2023-11-03 2023-11-03 Security identification method and equipment for gate equipment Active CN117197944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311452268.4A CN117197944B (en) 2023-11-03 2023-11-03 Security identification method and equipment for gate equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311452268.4A CN117197944B (en) 2023-11-03 2023-11-03 Security identification method and equipment for gate equipment

Publications (2)

Publication Number Publication Date
CN117197944A CN117197944A (en) 2023-12-08
CN117197944B true CN117197944B (en) 2024-01-16

Family

ID=88987170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311452268.4A Active CN117197944B (en) 2023-11-03 2023-11-03 Security identification method and equipment for gate equipment

Country Status (1)

Country Link
CN (1) CN117197944B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110491004A (en) * 2019-08-14 2019-11-22 金陵科技学院 A kind of residential communities personnel security management system and method
CN112164218A (en) * 2020-09-04 2021-01-01 重庆攸亮科技股份有限公司 Pedestrian street crossing system and method based on face recognition technology
WO2022126905A1 (en) * 2020-12-18 2022-06-23 平安科技(深圳)有限公司 Face tracking method and system, terminal and storage medium
CN115830761A (en) * 2022-12-09 2023-03-21 熵基科技股份有限公司 Gate passage marking method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110491004A (en) * 2019-08-14 2019-11-22 金陵科技学院 A kind of residential communities personnel security management system and method
CN112164218A (en) * 2020-09-04 2021-01-01 重庆攸亮科技股份有限公司 Pedestrian street crossing system and method based on face recognition technology
WO2022126905A1 (en) * 2020-12-18 2022-06-23 平安科技(深圳)有限公司 Face tracking method and system, terminal and storage medium
CN115830761A (en) * 2022-12-09 2023-03-21 熵基科技股份有限公司 Gate passage marking method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN117197944A (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN106056079B (en) A kind of occlusion detection method of image capture device and human face five-sense-organ
CN108319926A (en) A kind of the safety cap wearing detecting system and detection method of building-site
CN110706261A (en) Vehicle violation detection method and device, computer equipment and storage medium
CN108038176B (en) Method and device for establishing passerby library, electronic equipment and medium
CN110390229B (en) Face picture screening method and device, electronic equipment and storage medium
CN109389019B (en) Face image selection method and device and computer equipment
CN110674680A (en) Living body identification method, living body identification device and storage medium
CN112380892B (en) Image recognition method, device, equipment and medium
Ghidoni et al. Texture-based crowd detection and localisation
KR102142315B1 (en) ATM security system based on image analyses and the method thereof
CN117197944B (en) Security identification method and equipment for gate equipment
CN113743212B (en) Method and device for detecting congestion or carryover at entrance and exit of escalator and storage medium
CN107993446A (en) A kind of traffic prohibition parking area domain parking offense monitoring device
CN115761423A (en) Same target fusion method and device for multiple anomaly detection and electronic equipment
CN112235589B (en) Live network identification method, edge server, computer equipment and storage medium
CN114708544A (en) Intelligent violation monitoring helmet based on edge calculation and monitoring method thereof
CN113936294A (en) Construction site personnel identification method, readable storage medium and electronic device
CN113807209A (en) Parking space detection method and device, electronic equipment and storage medium
CN112861711A (en) Regional intrusion detection method and device, electronic equipment and storage medium
CN116681955B (en) Method and computing device for identifying traffic guardrail anomalies
CN115376275B (en) Construction safety warning method and system based on image processing
CN113129532B (en) Stranger early warning method and device, electronic equipment and storage medium
CN113269060B (en) Vehicle illegal behavior review method and device, electronic equipment and storage medium
CN117197916B (en) Attendance registration method and system for door access identification
CN111932545B (en) Image processing method, object counting method and related devices

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240702

Address after: Room 1503, No. 858, Lianhua Avenue West, Donghuan Street, Panyu District, Guangzhou, Guangdong 510000

Patentee after: Southern Power Grid Energy Storage Co.,Ltd. Information and Communication Branch

Country or region after: China

Address before: Room 1503, No. 858, Lianhua Avenue West, Donghuan Street, Panyu District, Guangzhou, Guangdong 510000

Patentee before: INFORMATION COMMUNICATION BRANCH, SOUTHERN POWER GRID PEAKING FM POWER GENERATION Co.,Ltd.

Country or region before: China