Campus personnel track early warning method based on face recognition
Patent Information
- Application Number
- CN202611113086.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-25
- Publication Date
- 2026-10-30
AI Technical Summary
[0004]针对现有技术的不足,本发明提供了一种基于人脸识别的校园人员轨迹预警方法,解决因人脸识别缺失而误判人员未经过相应区域,导致轨迹节点缺失及未到达误预警的问题
[0050]1、本发明通过上下游摄像设备构建闭环人员样本,在屏蔽待校准摄像设备自身观测数据的情况下,结合通行拓扑、通行方向及旁路观测计算必经可信度,避免以目标设备未识别到人员直接判定其未经过,降低轨迹断裂及未到达误预警。
Smart Images

Figure CN123016493A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of campus intelligent monitoring technology, specifically a campus personnel trajectory early warning method based on facial recognition. Background Technology
[0002] Campus personnel trajectory early warning refers to the use of surveillance equipment deployed at school gates, roads, teaching buildings, dormitories, and other public areas to collect data on the location, travel time, and direction of movement of students, faculty, and visitors. Based on the spatial relationships between different monitoring areas, continuous trajectories are formed, and alerts are issued when personnel do not arrive according to the predetermined route or exhibit abnormal movement. To improve the accuracy of the correspondence between trajectory nodes and specific personnel identities, existing campus surveillance typically combines facial feature extraction and identity feature database comparison, associating the identified personnel identity with the camera equipment location, observation time, and direction of movement.
[0003] Current methods typically connect personnel trajectories by the time sequence of facial recognition records output by each camera device and the device location. Whether a target person's identity is recorded at the corresponding camera device is used as the basis for determining whether they have passed through the monitored area. However, when a person actually passes through the monitored area, factors such as lighting changes, facial occlusion, shooting angle, or the person's posture can affect the camera's ability to capture video and detect the human body, but fail to create a valid facial recognition record. This can easily lead to misjudgment of this missing recognition as the person not having passed through the corresponding area, resulting in missing trajectory nodes and false alarms of the person not arriving. Summary of the Invention
[0004] To address the shortcomings of existing technologies, this invention provides a campus personnel trajectory early warning method based on facial recognition, which solves the problem of misjudging that personnel have not passed through the corresponding area due to the lack of facial recognition, resulting in missing trajectory nodes and false early warnings of non-arrival.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a campus personnel trajectory early warning method based on facial recognition, comprising:
[0006] S1. Based on the campus personnel access topology network, determine the camera equipment to be calibrated and its corresponding upstream first camera equipment and downstream second camera equipment;
[0007] S2. Obtain the identification data of the first and second camera devices. If the same target person is identified by the first and second camera devices in succession, then mark the target person as a closed-loop person.
[0008] S3. Shield the observation data of the camera device to be calibrated, and calculate the reliability of the closed-loop personnel passing through the area of the camera device to be calibrated based on the recognition time and recognition direction of the first and second cameras and the passage topology network;
[0009] S4. If the required confidence level is greater than the preset threshold, then based on the identification time and road segment passage time efficiency parameters, a forward and reverse bidirectional deduction is used to generate the expected time window for the closed-loop person to pass through the camera device to be calibrated.
[0010] S5. Within the expected time window, extract the human detection results, trajectory generation results, face capture results and identity matching results of the camera device to be calibrated in sequence;
[0011] S6. Aggregate the extraction results of multiple closed-loop personnel, and calculate the stratified observation rate of the camera device to be calibrated at the human body, trajectory, face and identity levels according to the sample size ratio of adjacent progressive results;
[0012] S7. When the observation rate of the human body and trajectory meets the normal threshold, and the observation rate of the face or identity is lower than the abnormal threshold, retain the trajectory node of the closed-loop person in the area of the camera device to be calibrated, set its identity attribute to inferred identity, and block the corresponding personnel non-arrival warning.
[0013] Preferably, step S1 specifically includes the following steps:
[0014] The physical areas for personnel passage within the campus are constructed as a directed connected graph. The edges in the graph are defined as passage segments, and the nodes in the graph are defined as the monitoring fields of the camera equipment. Corresponding passage direction and standard passage time parameters are configured for each passage segment.
[0015] The topological position of the camera device to be calibrated in the directed connected graph is obtained. The directly adjacent monitoring node is identified as the upstream first camera device by traversing the inbound passage segment of the camera device to be calibrated in reverse direction. The directly adjacent monitoring node is identified as the downstream second camera device by traversing the outbound passage segment in forward direction.
[0016] Preferably, step S2 specifically includes the following steps:
[0017] The local facial features, global body appearance features, observation time, and direction of departure or entry of the target person are extracted from the video processing data of the first and second camera devices, respectively.
[0018] Calculate the comprehensive similarity of the features extracted by the first camera device and the second camera device. When the comprehensive similarity reaches the identity confirmation threshold and the difference between the two extracted observation times matches the one-way physical passage time from the first camera device to the second camera device in the passage topology network, they are determined to be the same target person and marked as a closed-loop person.
[0019] Preferably, step S3 specifically includes the following steps:
[0020] Under the premise of shielding the observation data of the camera device to be calibrated, all connected branches from the first camera device to the second camera device are traversed in the access topology network to generate a set of candidate access paths for the closed-loop personnel;
[0021] Based on the physical travel distance of each path in the candidate travel path set and the degree of matching with the actual travel direction of people, an initial travel probability is assigned to each candidate travel path;
[0022] By combining the observation data of the other bypass cameras in the traffic topology network (excluding the camera to be calibrated), the initial traffic probability of each candidate traffic path is dynamically weighted and updated, and the updated probabilities of all candidate traffic paths passing through the camera to be calibrated are summed to obtain the certainty confidence.
[0023] Preferably, the step of dynamically updating the initial travel probability of each candidate travel path by combining the observation data of the other bypass cameras in the travel topology network (excluding the camera to be calibrated) specifically includes:
[0024] Extract the actual identification records of the closed-loop personnel from the bypass camera devices distributed along each candidate passage path;
[0025] For alternative candidate paths that do not pass through the camera device to be calibrated, if the bypass camera device included in the alternative candidate path does not generate the identification record of the closed-loop personnel, then an attenuation penalty coefficient is applied to the alternative candidate path to reduce its probability of passage.
[0026] The probability weights that are reduced due to the applied attenuation penalty coefficient are normalized and compensated and superimposed on the candidate paths passing through the camera device to be calibrated, thus completing the dynamic weight update.
[0027] Preferably, step S4 specifically includes the following steps:
[0028] Based on the identification time, the first observation time of the closed-loop person at the first camera device and the second observation time at the second camera device are extracted, and the first time interval from the first camera device to the camera device to be calibrated and the second time interval from the camera device to the second camera device are extracted from the passage timeliness parameters.
[0029] Add the first observation time to the preceding time interval to deduce the first time interval containing the first time lower bound and the first time upper bound in a forward deduction;
[0030] By subtracting the latter time interval from the second observation time, a second time interval containing the second time lower bound and the second time upper bound is derived by reverse deduction.
[0031] Extract the overlapping portion of the first time interval and the second time interval on the time axis, and use it as the final expected time window.
[0032] Preferably, extracting the overlapping portion of the first time interval and the second time interval on the time axis and using it as the final expected time window specifically includes:
[0033] Determine whether the first time interval and the second time interval have an intersection. If there is an intersection, directly extract the intersecting segment as the expected time window.
[0034] If the first time interval and the second time interval do not intersect, the timing offset of the two time intervals is calculated, and a preset device system clock drift tolerance parameter is introduced to perform bidirectional outward expansion compensation on the boundary of the first time interval and the second time interval until the two time intervals after compensation intersect, and the envelope overlap segment formed after outward expansion compensation is used as the expected time window.
[0035] Preferably, step S5 specifically includes the following steps:
[0036] Human morphology detection is performed on the video stream of the camera device to be calibrated within the expected time window. If a target is detected, the detection result is extracted as a human observation event.
[0037] A tracking algorithm is executed on the extracted human observation events. If the target forms a continuous coordinate sequence that crosses the preset passage boundary, the trajectory information is extracted as a trajectory observation event.
[0038] Extract the face image of the target human body region in the trajectory observation event. If the image meets the preset face clarity and face size thresholds, then the image is extracted as a face observation event.
[0039] The extracted face image is compared with the feature vector similarity of the identity feature database. If the similarity is higher than the preset threshold, the matching result is extracted as an identity observation event.
[0040] Preferably, step S6 specifically includes the following steps:
[0041] Summarize the extraction results of all closed-loop personnel regarding the camera device to be calibrated within a preset time period, and count the total number of closed-loop personnel as the evaluation base.
[0042] Among the total number of people in the closed loop, the number of independent samples for which human detection results, trajectory generation results, face capture results, and identity matching results were successfully extracted are counted in sequence.
[0043] Based on the physical progression dependency of the task hierarchy, the number of samples that successfully output results from the previous level is used as the dynamic calculation base. The percentage of the current level's sample count relative to the dynamic calculation base is calculated, and the hierarchical observation rate of the camera device to be calibrated is output.
[0044] Preferably, the step of calculating the percentage of the current level's sample count relative to the dynamic calculation base, based on the physical progression dependency of the task hierarchy and using the number of samples that successfully output results at the previous level as the dynamic calculation base, specifically includes:
[0045] The number of samples from which human body detection results were extracted is divided by the total number of people in the closed loop to calculate the stratified observation rate at the human body level.
[0046] The hierarchical observation rate of the trajectory level is calculated by dividing the number of samples from the trajectory generation results by the number of samples from the human detection results.
[0047] The hierarchical observation rate at the face level is calculated by dividing the number of samples of the extracted face capture results by the number of samples of the extracted trajectory generation results.
[0048] The hierarchical observation rate at the identity level is calculated by dividing the number of samples from which identity matching results are extracted by the number of samples from which face capture results are extracted.
[0049] This invention provides a method for early warning of campus personnel trajectories based on facial recognition. It has the following beneficial effects:
[0050] 1. This invention constructs a closed-loop personnel sample by using upstream and downstream camera equipment. While shielding the observation data of the camera equipment to be calibrated, it calculates the reliability of the necessary passage by combining the traffic topology, traffic direction and bypass observation. This avoids directly determining that the person has not passed by based on the fact that the target equipment has not identified the person, thereby reducing trajectory breakage and false alarms of not arriving.
[0051] 2. This invention uses forward and reverse bidirectional deduction to determine the expected time window for a person to pass through the camera device to be calibrated, and uses the device clock drift tolerance to expand the interval compensation, which can narrow the video retrieval range, reduce the impact of device time deviation on trajectory association results, and improve the time positioning accuracy of intermediate trajectory nodes.
[0052] 3. This invention calculates the stratified observation rate according to the progressive relationship of human body detection, trajectory generation, face capture and identity matching, which can distinguish between undetected human body, tracking failure, insufficient face quality and identity matching failure; when the face or identity layer is abnormal, the inferred identity trajectory node is retained and the non-arrival warning is blocked, thereby improving the reliability of the warning result. Attached Figure Description
[0053] Figure 1 This is a flowchart of a campus personnel trajectory early warning method based on face recognition according to the present invention;
[0054] Figure 2 This is a schematic diagram of the necessary credibility calculation process of the present invention;
[0055] Figure 3 This is a schematic diagram of the planar structure of an embodiment of the present invention. Detailed Implementation
[0056] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] Please see the appendix Figure 1 and attached Figure 2 This invention provides a method for early warning of campus personnel trajectories based on facial recognition, comprising:
[0058] S1. Based on the campus personnel access topology network, determine the camera equipment to be calibrated and its corresponding upstream first camera equipment and downstream second camera equipment;
[0059] Furthermore, S1 specifically includes the following steps:
[0060] The physical areas for personnel passage within the campus are constructed as a directed connected graph. The edges in the graph are defined as passage segments, and the nodes in the graph are defined as the monitoring fields of the camera equipment. Corresponding passage direction and standard passage time parameters are configured for each passage segment.
[0061] Obtain the topological position of the camera device to be calibrated in the directed connected graph, identify the directly adjacent monitoring node as the upstream first camera device by traversing the inbound passage segment of the camera device to be calibrated in reverse, and identify the directly adjacent monitoring node as the downstream second camera device by traversing the outbound passage segment in forward.
[0062] Specifically, the campus personnel traffic topology network can be established based on the campus map, building floor plan, road connectivity data, and the field-of-view calibration results of the camera equipment. During implementation, the school gates, roads, corridors, staircases, building entrances and exits, and other physical areas where personnel are permitted to pass are first divided into continuous traffic segments. Then, the monitoring field of view is determined based on the spatial range within which each camera can stably capture personnel traffic images. Each monitoring field of view is treated as a node in a directed connected graph, and adjacent monitoring fields of view are connected by physical segments where personnel can pass continuously, serving as edges between the two nodes. For situations where the same camera can observe multiple independent traffic directions, it can be divided into multiple monitoring field of view nodes according to traffic boundaries and directions to avoid mixing personnel observation data from different directions. Each traffic segment is configured with a start node, an end node, permitted traffic directions, and standard traffic time parameters. The standard traffic time parameters can be determined based on the segment length, road surface type, staircase slope, and normal walking speed of campus personnel, or corrected based on historical personnel trajectory samples generated during normal equipment operation. The standard passage time parameter is preferably set as a time range consisting of the shortest and longest passage times, representing the time required for a person to complete passage through the corresponding road segment without any abnormal stops. Through the above processing, the relationship between camera devices is determined by the actual passable path, rather than by the straight-line distance between camera devices, thereby eliminating erroneous adjacent relationships between camera devices in areas with partitions, on different floors, or without direct passage.
[0063] After completing the directed connectivity graph, the monitoring field of view corresponding to the camera equipment whose observation capability needs to be evaluated is identified as the node to be calibrated, and the incoming and outgoing traffic segments connected to this node are read. Along the reverse direction of the incoming traffic segment, a directly adjacent node is found that has no other monitoring field of view nodes between it and the node to be calibrated; the camera equipment corresponding to this node is identified as the upstream first camera equipment. Along the personnel traffic direction of the outgoing traffic segment, a directly adjacent node is found; the camera equipment corresponding to this node is identified as the downstream second camera equipment. When the node to be calibrated connects to multiple incoming or outgoing traffic segments, combinations of the first camera equipment, the camera equipment to be calibrated, and the second camera equipment are established according to the traffic direction to be evaluated, so that each combination corresponds to a clear personnel traffic direction. For example, the node corresponding to the camera at the dormitory exit is the first camera, the node corresponding to the camera in the middle of the tree-lined path is the camera to be calibrated, and the node corresponding to the camera at the teaching building entrance is the second camera. The standard travel time from the dormitory exit to the middle of the tree-lined path is 70 to 110 seconds, and the standard travel time from the middle of the tree-lined path to the teaching building entrance is 90 to 150 seconds. If the incoming edge of the node in the middle of the tree-lined path connects to the dormitory exit node, and the outgoing edge connects to the teaching building entrance node, then the three cameras are established as a forward calibration combination. This combination, along with the corresponding travel direction, road segment connection relationship, and standard travel time parameters, is transmitted to the subsequent closed-loop personnel identification and expected time window calculation process, giving the determination of upstream and downstream equipment a clear spatial connectivity basis.
[0064] S2. Obtain the identification data from the first and second cameras. If the same target person is identified by the first and second cameras in succession, then mark the target person as a closed-loop person.
[0065] Furthermore, S2 specifically includes the following steps:
[0066] The local facial features, global body appearance features, observation time, and direction of departure or entry of the target person are extracted from the video processing data of the first and second cameras, respectively.
[0067] Calculate the comprehensive similarity of the features extracted by the first camera device and the second camera device. When the comprehensive similarity reaches the identity confirmation threshold and the difference between the two extracted observation times matches the one-way physical passage time from the first camera device to the second camera device in the passage topology network, they are determined to be the same target person and marked as a closed-loop person.
[0068] Specifically, the first and second cameras detect and track personnel entering the monitoring field of view, generating observation records at the moment a person crosses the corresponding monitoring boundary. For each observation record, local facial features representing the relationship between the eyes, nose, mouth, and contours are extracted from the face region, while global body appearance features representing clothing texture, color distribution, body proportions, and visible accessories are extracted from the body region. The camera device number, observation time, and direction of travel are also recorded. Local facial features can be obtained from existing facial feature extraction models, and global body appearance features can be obtained from existing pedestrian re-identification models. The direction of travel is determined based on the intersection order of the target's trajectory and the monitoring boundary. When the target crosses the boundary outward from the monitoring field of view of the first camera, it is recorded as the departure direction; when the target enters the monitoring field of view of the second camera from the outside, it is recorded as the entry direction. If the same person appears continuously in a single camera and generates multiple snapshots, the observation record associated with the boundary-crossing trajectory and whose facial quality meets preset conditions is prioritized to avoid duplicate snapshots and multiple targets to be matched. The above processing enables the data output by the first and second camera devices to simultaneously include identity representation, appearance representation, time and location, and direction of travel, providing mutually independent judgment criteria for personnel association across camera devices.
[0069] When associating the personnel observation records output by the first camera device with those output by the second camera device, records with inconsistent directions are first filtered out according to the upstream to downstream travel direction established in S1, and then records that are inaccessible in terms of time are filtered out according to the one-way physical travel time of the corresponding road segment. For the remaining records, facial local features and global human appearance features are compared separately, and a comprehensive similarity is formed according to preset weights. When the facial image quality meets the requirements, the participation of facial local features in the comprehensive similarity is increased; when the face is occluded or deflected, the global human appearance features are mainly used for auxiliary judgment. When the comprehensive similarity reaches the identity confirmation threshold, the second observation time is later than the first observation time, and the time difference between the two observations is within the travel time range of the corresponding path from the first camera device to the second camera device, the two observation records are associated with the same target person, and this target person is marked as a closed-loop person. For example, the first camera detected student A leaving the dormitory building at 7:30:10, and the second camera detected a person with the same facial features and similar clothing entering the teaching building at 7:33:20, with a 190-second interval between the two observations. If the one-way passage time from the dormitory exit to the teaching building entrance in S1 is 160 to 260 seconds, and the direction of both observations is consistent with the passage direction from the dormitory area to the teaching area, then this person can be identified as a closed-loop person. The identity of the closed-loop person, the first observation time, the second observation time, and the passage direction are passed to the subsequent necessary confidence calculation process to determine whether they have passed through the area of the camera equipment to be calibrated.
[0070] Please see the appendix Figure 2 S3. Shield the observation data of the camera device to be calibrated, and calculate the reliability of the closed-loop personnel passing through the area of the camera device to be calibrated based on the recognition time, recognition direction and passage topology of the first and second cameras.
[0071] Furthermore, S3 specifically includes the following steps:
[0072] Under the premise of shielding the observation data of the camera device to be calibrated, all connected branches from the first camera device to the second camera device are traversed in the traffic topology network to generate a set of candidate traffic paths for closed-loop personnel;
[0073] Based on the physical travel distance of each path in the candidate travel path set and the degree of matching with the actual travel direction of people, an initial travel probability is assigned to each candidate travel path;
[0074] By combining the observation data of the bypass cameras in the traffic topology network (excluding the camera to be calibrated), the initial traffic probability of each candidate traffic path is dynamically updated with weights, and the updated probabilities of all candidate traffic paths passing through the camera to be calibrated are summed to obtain the reliability of the necessary passage.
[0075] Specifically, after a closed-loop personnel is formed, the human detection, trajectory, face capture, identity matching, and non-detection data generated by the camera to be calibrated are not read immediately. Instead, the corresponding node of the first camera is used as the starting node and the corresponding node of the second camera is used as the ending node. Connecting branches are searched along the personnel passage direction in the campus personnel passage topology network. During the search, branches containing reverse passage segments are removed, and branches whose cumulative passage time is incompatible with the recognition time difference between the first and second cameras are also removed. Each retained connecting branch consists of sequentially connected monitoring nodes and passage segments, and the path length, allowed passage direction, standard passage time, and whether it passes through the area of the camera to be calibrated are recorded, thus forming a set of candidate passage paths. By shielding the observation data of the camera to be calibrated itself, it is possible to avoid using the detection or non-detection results of the device to reversely prove whether the closed-loop personnel have passed through the area of that device.
[0076] For the first in the candidate path set For each path, an initial score is determined based on its physical travel distance and direction matching degree. The initial scores for each path are then normalized to obtain the initial travel probability. The initial score and initial travel probability can be expressed as follows:
[0077] , ;
[0078] In the formula, For the first Initial scores for candidate travel paths, This represents the degree of matching between the path and the actual travel direction of the people in the closed loop. This represents the physical travel distance of the route. For the first The initial probability of passage for each candidate path. The number of candidate travel paths is determined by the direction matching degree, which is based on the number of road segments in the path that match the travel direction from the first camera to the second camera and the total number of road segments in the path. Taking three candidate travel paths as an example, their physical travel distances are 220 meters, 260 meters and 310 meters, respectively, and their direction matching degrees are 1, 0.8 and 0.6, respectively. After normalization, the initial travel probabilities of the three paths can be determined as 0.476, 0.322 and 0.202, respectively. This processing gives the shorter paths with the same travel direction a higher initial probability, but does not directly exclude alternative paths with longer distances.
[0079] After determining the initial passage probability, the observation data of bypass cameras (excluding the camera to be calibrated) on each candidate passage path are retrieved. The presence of a closed-loop person at the corresponding bypass node is checked. If the bypass observation matches a candidate path, the relative weight of that path in the candidate set is increased. If the bypass camera does not generate a closed-loop person identification record within the corresponding time range, the weight of the candidate path passing through that bypass node is decreased. After completing the dynamic weight update, the [number of paths] is [set / update]. The updated probabilities of the candidate paths are denoted as follows: The paths passing through the area of the camera device to be calibrated are grouped into a set. The credibility of a given process is expressed as:
[0080] ;
[0081] In the formula, To determine the reliability of closed-loop personnel passing through the area of the camera equipment to be calibrated, For the first Candidate travel routes This is the set of candidate paths that pass through the area of the camera equipment to be calibrated. This represents the updated probability of the corresponding path. If the first and third paths of the aforementioned three paths pass through the area of the camera to be calibrated, and the dynamically updated probabilities are 0.68, 0.12, and 0.20 respectively, then the certainty confidence is 0.88. This value is compared with a preset threshold. When the preset threshold is reached, the time range for the person passing through the area of the camera to be calibrated is determined based on the upstream and downstream identification time of the closed-loop personnel and the road segment passage time parameters.
[0082] Furthermore, by combining the observation data from the bypass cameras in the traffic topology network (excluding the camera to be calibrated), the initial traffic probability of each candidate traffic path is dynamically updated with weights, specifically including:
[0083] Extract the actual identification records of closed-loop personnel from the bypass cameras distributed along each candidate passage path;
[0084] For alternative candidate paths that do not pass through the camera equipment to be calibrated, if the bypass camera equipment included in the alternative candidate path does not generate a closed-loop personnel identification record, an attenuation penalty coefficient is applied to the alternative candidate path to reduce its probability of passage.
[0085] The probability weights that are reduced due to the applied attenuation penalty coefficient are normalized and compensated and superimposed on the candidate paths passing through the camera device to be calibrated, thus completing the dynamic weight update.
[0086] Specifically, for each path in the candidate travel path set, the identification records of the bypass camera devices are extracted according to the order of the monitoring nodes in the path. Bypass camera devices refer to cameras installed on the candidate travel paths, excluding the camera device to be calibrated, the first camera device, and the second camera device. The identification record includes at least the person's identity, identification time, travel direction, and device location. The identification time should be within the time range of the closed-loop person moving from the first camera device to the second camera device, and the travel direction should be consistent with the direction of the corresponding candidate travel path. Person's identity can be determined based on facial feature matching results; if the facial image quality is insufficient, it can be associated with global human appearance features. After verifying the identity, time, and direction, the valid records generated by the bypass camera devices are associated with the corresponding candidate travel path to indicate that there is intermediate observational evidence that the path matches the closed-loop person.
[0087] Candidate paths that do not pass through the camera device to be calibrated are recorded as alternative candidate paths. When none of the bypass cameras on the alternative candidate path generate a valid identification record of a person in a closed loop, a decay penalty is applied to the initial passage probability of that path. The probability of passage after the decay of alternative candidate paths is expressed as follows:
[0088] ;
[0089] In the formula, For the first The probability of passage after the decay of alternative candidate paths; This represents the initial probability of passage for this path; This is the attenuation penalty coefficient. When the corresponding bypass camera does not generate a valid identification record... Take a value greater than 0 and less than 1; when the bypass camera generates a valid identification record, Set to 1. The attenuation penalty coefficient can be pre-configured based on the number of bypass cameras, their operating status, and the effective field of view coverage. If the alternative candidate path includes two normally functioning and fully covered bypass cameras, but neither camera has detected a person in the closed loop, the attenuation penalty coefficient can be set to 1. Set to 0.25; if one of the devices is offline, the unidentified results of the offline device will not be used to reduce the path probability.
[0090] The probability reduction due to decay is:
[0091] ;
[0092] In the formula, The total probability weights for replacing candidate paths that are reduced; This is a set of alternative candidate paths that do not pass through the camera device to be calibrated. For the first A set of candidate paths that pass through the camera device to be calibrated. The reduced probability weights are normalized and compensated according to the proportion of the initial travel probability of each path in the set. For the set... The first in There are 10 paths, and their updated probabilities are:
[0093] ;
[0094] For alternative candidate paths, the updated probability is:
[0095] ;
[0096] In the formula, and These are the dynamically updated passage probabilities. For the first camera equipment to be calibrated The initial probability of passage for each path is calculated using three candidate paths as an example. Two of these paths pass through the camera to be calibrated, with initial probabilities of 0.48 and 0.20, respectively. The initial probability of the alternative candidate path is 0.32. If the alternative candidate path does not generate a bypass identification record, the attenuation penalty coefficient is set to 0.25, reducing its probability to 0.08, a reduction of 0.24. After this reduction is compensated according to the ratio of 0.48 to 0.20, the updated probabilities of the first two paths are 0.649 and 0.271, respectively. The sum of the probabilities of the three paths remains 1. The updated path probabilities are used to summarize the candidate path probabilities passing through the area of the camera to be calibrated, in order to determine the certainty of the closed-loop personnel's passage.
[0097] S4. If the reliability of the necessary path is greater than the preset threshold, then based on the identification time and the road section passage time parameters, the expected time window for the closed-loop personnel to pass through the camera equipment to be calibrated is generated by using forward and reverse bidirectional deduction.
[0098] Furthermore, S4 specifically includes the following steps:
[0099] Based on the identification time, the first observation time of the closed-loop personnel at the first camera device and the second observation time at the second camera device are extracted, and the time interval from the first camera device to the camera device to be calibrated and the time interval from the camera device to the second camera device are extracted from the passage time efficiency parameters.
[0100] Add the first observation time to the previous time interval, and deduce the first time interval containing the first time lower bound and the first time upper bound in a forward deduction;
[0101] By subtracting the time interval of the latter part from the second observation time, the second time interval containing the lower bound of the second time and the upper bound of the second time is derived by reverse deduction.
[0102] Extract the overlapping portion of the first and second time intervals on the time axis and use it as the final expected time window.
[0103] Specifically, once the credibility of a person's path in the closed loop reaches a preset threshold, the first and second observation times are read from the identification records of the first and second cameras, respectively. Both observation times use a unified time base and are associated with the acquisition time of the corresponding video frames. Based on the candidate travel path determined during the credibility calculation, the standard travel time for each segment between the first camera and the camera to be calibrated is read. The shortest travel time for each segment is summed to obtain the shortest travel time for the first segment, and the longest travel time for each segment is summed to obtain the longest travel time for the first segment, thus forming the first segment travel time interval. The same method is used to sum the travel times for the segments between the camera to be calibrated and the second camera, forming the second segment travel time interval. Using the same first and second segment travel time parameters for the same candidate travel path avoids mixing travel times from different paths.
[0104] Using the first observation time as the starting point, the preceding time interval is superimposed onto the first observation time to obtain the first time interval for the closed-loop personnel to arrive at the area of the camera equipment to be calibrated. The calculation method is as follows:
[0105] ;
[0106] In the formula, Indicates the first time interval. Indicates the first observation time. This indicates the shortest time taken from the first camera device to the camera device to be calibrated. This indicates the longest execution time in the corresponding front-end. The first lower bound is... The first upper limit is This time interval defines the range of time during which personnel in the closed loop might pass by the camera equipment to be calibrated, starting from the upstream observation location and moving in the positive direction.
[0107] Using the second observation time as the end point, the second time interval for the closed-loop personnel to pass through the camera equipment to be calibrated is determined by reverse calculation based on the subsequent time interval. The calculation method is as follows:
[0108] ;
[0109] In the formula, Indicates the second time interval. Indicates the second observation time. This indicates the shortest time taken from the camera device to the second camera device to be calibrated. This indicates the longest execution time for the corresponding subsequent segment. The second lower bound is... The second time upper bound is This time interval, derived from the downstream identification results, constrains the time period during which the target person appears in the intermediate region.
[0110] Map the first and second time intervals to the same time axis, and take the overlapping portion of the two as the expected time window:
[0111] ;
[0112] In the formula, Indicates the expected time window, and These represent the lower and upper bounds of the first time interval, respectively. and These represent the lower and upper bounds of the second time interval, respectively. When Not greater than When the two time intervals overlap, taking the first observation time of 7:30:10 and the second observation time of 7:33:20 as an example, the first time interval is from 70 to 110 seconds, resulting in the first time interval of 7:31:20 to 7:32:00; the second time interval is from 90 to 150 seconds, resulting in the second time interval of 7:30:50 to 7:31:50. Therefore, the expected time window is from 7:31:20 to 7:31:50. This window serves as the retrieval range for the video data of the camera equipment to be calibrated, used to extract the progressive observation results corresponding to the closed-loop personnel. If the two time intervals do not overlap, the interval boundaries and their interval values are retained for subsequent clock offset compensation processing.
[0113] Furthermore, the overlapping portion of the first and second time intervals on the time axis is extracted and used as the final expected time window, specifically including:
[0114] Determine whether there is an intersection between the first time interval and the second time interval. If there is an intersection, directly extract the intersecting segment as the expected time window.
[0115] If the first time interval and the second time interval do not intersect, the timing offset of the two time intervals is calculated, and the preset device system clock drift tolerance parameter is introduced to perform bidirectional outward expansion compensation on the boundary between the first time interval and the second time interval until the two time intervals intersect after compensation, and the envelope overlap segment formed after outward expansion compensation is used as the expected time window.
[0116] Specifically, after obtaining the first and second time intervals, they are placed on a unified time axis for boundary comparison. During the comparison, the start and end times of the two time intervals are read separately. If the later start time is not later than the earlier end time, it is determined that the two time intervals have an intersection, and the time segment covered by both is directly extracted as the expected time window. This time segment simultaneously meets the forward passage constraint formed by the observation time of the first camera and the reverse passage constraint formed by the observation time of the second camera. Subsequently, only the video processing data of the camera to be calibrated within this time segment is retrieved, without expanding the original data extraction range.
[0117] If the later start time is later than the earlier end time, a time interval is determined to exist between the two time intervals, and a time offset is calculated. The time offset can be expressed as:
[0118] ;
[0119] In the formula, This represents the time difference between adjacent boundaries when two time intervals do not intersect; and These represent the start and end times of the first time interval, respectively. and These represent the start and end times of the second time interval, respectively. The four boundary data mentioned above use the time data obtained from both forward and backward deduction. The timing offset is used to determine whether the degree of inconsistency between the two time intervals is within the range that can be explained by the local clock deviation of the camera device.
[0120] For time intervals that can be explained by device clock drift, pre-configure the single expansion step size and device system clock drift tolerance. The unilateral expansion amount used in this compensation is:
[0121] ;
[0122] In the formula, Indicates the first The expansion of the single-sided boundary of each time interval during the second compensation; Indicates the number of times compensation is required; This indicates the preset single expansion step size. During each compensation, the start times of the first and second time intervals are adjusted forward, respectively. And the corresponding termination times will be adjusted backwards respectively. Then, the compensated interval boundaries are compared again. The expansion process uses a step-by-step approach to increase the compensation amount, stopping when the two time intervals first overlap, to prevent excessive expansion at once from introducing video data unrelated to the closed-loop personnel.
[0123] For example, the first time interval is from 7:31:20 to 7:31:40, and the second time interval is from 7:31:47 to 7:32:08, with a timing offset of 7 seconds between them. The single outward expansion step size is set to 2 seconds, and the device system clock drift tolerance is set to 6 seconds. After the first compensation, the two intervals are adjusted to 7:31:18 to 7:31:42 and 7:31:45 to 7:32:10 respectively, and there is still no overlap. The second compensation uses a 4-second single-sided outward expansion, and the two intervals are adjusted to 7:31:16 to 7:31:44 and 7:31:43 to 7:32:12 respectively. At this time, an overlapping segment is formed from 7:31:43 to 7:31:44, and this segment is determined as the expected time window. If the extrapolation amount reaches the device system clock drift tolerance and still does not form an intersection, the corresponding closed-loop personnel will be marked as time-inconsistent samples and will not be used for the extraction of progressive observation results and hierarchical observation rate statistics of the camera equipment to be calibrated.
[0124] S5. Within the expected time window, sequentially extract the human detection results, trajectory generation results, face capture results, and identity matching results of the camera device to be calibrated;
[0125] Furthermore, S5 specifically includes the following steps:
[0126] Human morphology detection is performed on the video stream of the camera device to be calibrated within the expected time window. If a target is detected, the detection result is extracted as a human observation event.
[0127] A tracking algorithm is executed on the extracted human observation events. If the target forms a continuous coordinate sequence that crosses the preset passage boundary, the trajectory information is extracted as a trajectory observation event.
[0128] Extract facial images of the target human body region from the trajectory observation event. If the image meets the preset facial clarity and facial size thresholds, the image is extracted as a facial observation event.
[0129] The extracted face image is compared with the feature vector similarity of the identity feature database. If the similarity is higher than the preset threshold, the matching result is extracted as an identity observation event.
[0130] Specifically, within the expected time window, the video stream of the corresponding time period of the camera to be calibrated is retrieved, and human morphology detection is performed sequentially according to the video frames. Human morphology detection can employ a pre-trained target detection model, outputting a human detection bounding box, detection confidence score, frame time, and human region coordinates for each video frame. When the human detection confidence score reaches a preset detection threshold, and the human detection bounding box is located within the effective monitoring area of the camera to be calibrated, the corresponding detection result is recorded as a human observation event and assigned a temporary target number. For the same human body detected in multiple consecutive frames, only the observation record associated with the same temporary target number is retained to avoid repeatedly counting consecutive occurrences as multiple human observation events.
[0131] For human observation events, single-camera target tracking is performed on the detection box. Based on the human position, movement direction, and appearance features in adjacent video frames, detection results belonging to the same target are associated as a continuous coordinate sequence. A pre-set passage boundary corresponding to the actual passage location is set in the monitoring screen of the camera to be calibrated, such as a doorway boundary line, corridor dividing line, or stairwell entrance boundary. If the continuous coordinate sequence moves from one side of the passage boundary to the other, and the number of consecutive frames and the direction of movement meet preset conditions, then the target is confirmed to have completed one area passage, and the continuous coordinate sequence, the time of boundary crossing, the direction of boundary crossing, and the temporary target number are recorded as a trajectory observation event. This eliminates invalid trajectories formed only briefly at the edge of the screen, stationary, or with instantaneous jumps in the detection box.
[0132] Based on the established trajectory observation events, facial images are extracted from the continuous human body regions of the temporary target according to its temporary target number. Facial images can be selected from multiple frames before and after the target approaches the passage boundary, and quality is filtered based on face detection confidence, image sharpness, deflection angle, and face pixel size. Sharpness can be determined by the edge information or blurriness of the face region, while face size is determined by the width and height of the face detection bounding box. Only images that simultaneously meet the preset sharpness and size thresholds are recorded as face observation events; if the quality conditions are not met, the corresponding human body observation event and trajectory observation event are retained, but no valid face observation event is generated, to accurately reflect which processing level the observation process is at.
[0133] Facial feature vectors are extracted from face images that meet quality requirements and compared with the similarity vectors of personnel in the campus identity feature database. The identity feature database can pre-store the identity numbers and corresponding facial features of authorized personnel. If the highest similarity reaches the identity matching threshold, and the difference between the highest and second-highest matching results meets the preset discrimination conditions, then the matched personnel number, similarity, observation time, and associated trajectory observation event are recorded as an identity observation event. Taking the expected time window of a closed-loop personnel as 7:31:43 to 7:31:48 as an example, if a human body is detected during this period and forms a continuous trajectory crossing the boundary of the teaching building entrance, but the extracted face image does not reach the clarity threshold due to side face occlusion, then a valid human body observation event and trajectory observation event are formed, but no face observation event and identity observation event are formed. By maintaining the progressive association between human body, trajectory, face, and identity results, different observation states such as target not appearing, tracking not completed, face not effectively captured, and identity not successfully matched can be distinguished.
[0134] S6. Aggregate the extraction results of multiple closed-loop personnel, and calculate the stratified observation rate of the camera device to be calibrated at the human body, trajectory, face and identity levels according to the sample size ratio of adjacent progressive results.
[0135] Furthermore, S6 specifically includes the following steps:
[0136] Summarize the extraction results of all closed-loop personnel for the camera equipment to be calibrated within the preset time period, and count the total number of closed-loop personnel as the evaluation base.
[0137] Within the total number of people in the closed loop, the number of independent samples for which human detection results, trajectory generation results, face capture results, and identity matching results were successfully extracted were counted in sequence.
[0138] Based on the physical progression dependency of the task hierarchy, the number of samples that successfully output results from the previous level is used as the dynamic calculation base. The percentage of the current level's sample count relative to the dynamic calculation base is calculated, and the hierarchical observation rate of the camera device to be calibrated is output.
[0139] Specifically, the statistical period is a preset evaluation time period, summarizing the results of closed-loop personnel extraction corresponding to the camera equipment to be calibrated within that time period. The preset evaluation time period can be set according to campus traffic patterns, such as a break between classes, a morning / evening peak traffic period, or a calendar day. Closed-loop personnel included in the statistics should have completed upstream and downstream identity association, reliability judgment, and expected time window determination. Personnel whose upstream and downstream identification times are inconsistent and who cannot form an effective time window within the clock drift tolerance will not be included in the sample for this equipment observation capability evaluation. For the same closed-loop personnel generating multiple duplicate capture results within the same evaluation period, a sample association identifier is formed using the personnel's identity, expected time window, and traffic direction. Only one independent evaluation sample is formed at the camera equipment to be calibrated, avoiding the amplification of the statistical base due to continuous video frames or duplicate captures. The number of independent closed-loop personnel obtained after deduplication is used as the evaluation base for the human observation level.
[0140] For each independent closed-loop person, the extraction results are checked sequentially according to the correlation between human body observation events, trajectory observation events, face observation events, and identity observation events. If a human body observation event that meets the detection conditions exists within the expected time window, the closed-loop person is counted as a successful human body detection sample. When a continuous coordinate sequence that crosses the preset passage boundary is formed based on the human body observation event, it is counted as a successful trajectory generation sample. When a face image that meets the clarity and size requirements is obtained in the human body region of the corresponding trajectory, it is counted as a successful face capture sample. When the face image and the identity feature database are effectively matched, it is counted as a successful identity matching sample. Each level uses the closed-loop person as an independent statistical unit. If the same person generates multiple human body detection boxes, multiple local trajectories, or multiple qualified face images within a time window, it is still counted only once at the corresponding level. This ensures that the samples of the next level come from the effective results of the previous level, so that the number of human body, trajectory, face, and identity samples forms a progressive inclusion relationship.
[0141] The stratified observation rate uses a dynamic calculation base, rather than comparing all strata with the total number of closed-loop personnel. The human body stratum uses the total number of independent closed-loop personnel as the calculation base; the trajectory stratum uses the number of successfully detected human body samples as the calculation base; the face stratum uses the number of successfully generated trajectory samples as the calculation base; and the identity stratum uses the number of successfully captured face samples as the calculation base. Taking the evaluation results of a camera at the entrance of a teaching building during the morning rush hour as an example, a total of 100 valid closed-loop personnel were obtained. Among them, 96 formed human body observation events within the expected time window, 92 further formed trajectory observation events, 60 obtained qualified face images, and 54 completed identity matching. In the calculation, the human body stratum uses 100 closed-loop personnel as the base, the trajectory stratum uses 96 successfully detected human body samples as the base, the face stratum uses 92 successfully generated trajectory samples as the base, and the identity stratum uses 60 successfully captured face samples as the base. This statistical method can distinguish between undetected human bodies, failed tracking, insufficient face capture quality, and failed identity matching, thus avoiding repeated deductions of subsequent levels of observation capabilities due to failure of the preceding task.
[0142] Furthermore, based on the physical progression dependency of the task hierarchy, and using the number of samples from previous levels that successfully output results as the dynamic calculation base, the percentage of the current level's sample count relative to the dynamic calculation base is calculated, specifically including:
[0143] The number of samples from which human detection results were extracted is divided by the total number of people in the closed loop to calculate the stratified observation rate at the human level.
[0144] The stratified observation rate at the trajectory level is calculated by dividing the number of samples from the trajectory generation results by the number of samples from the human detection results.
[0145] The hierarchical observation rate at the face level is calculated by dividing the number of samples of the extracted face capture results by the number of samples of the extracted trajectory generation results.
[0146] The hierarchical observation rate at the identity level is calculated by dividing the number of samples from which identity matching results are extracted by the number of samples from which face capture results are extracted.
[0147] Specifically, the human body, trajectory, face, and identity can be numbered sequentially as observation levels 1 to 4, and the number of successful samples at each level can be uniformly represented as... The total number of people in the closed loop is used as the sample size for level 0. The data correspondence between each level is as follows:
[0148] ;
[0149] In the formula, The total number of people effectively involved in the closed loop. To successfully extract the number of independent samples for human detection results, The number of independent samples required to successfully extract the trajectory generation results. To successfully extract the number of independent samples from face capture results, To successfully extract the number of independent samples for identity matching, since each subsequent observation level uses the successful results of the previous observation level as a basis for processing, the number of samples for each level satisfies:
[0150] ;
[0151] No. The stratified observation rate for each observation level is calculated uniformly according to the following formula:
[0152] ;
[0153] In the formula, For the first Stratified observation rate of each observation level This represents the number of independent samples that successfully output results at the current observation level. The number of independent samples that successfully output results from the previous observation level, when At that time, the previous level was the closed-loop personnel sample level, and the results were... For the stratified observation rate at the human body level, when At that time, the result For the stratified observation rate at the trajectory level; when At that time, the result The hierarchical observation rate at the face level; when At that time, the result The stratified observation rate is based on identity level.
[0154] For example, within an evaluation period, 100 valid closed-loop personnel samples were obtained. Of these, 96 samples generated valid human detection results, 92 samples generated trajectory generation results, 60 samples yielded face images meeting quality standards, and 54 samples completed identity matching. These data were then assigned values sequentially. , , , as well as According to the unified formula, the layered observation rate at the human body level is 96%, the layered observation rate at the trajectory level is approximately 95.83%, the layered observation rate at the face level is approximately 65.22%, and the layered observation rate at the identity level is 90%. This shows that the human body detection and trajectory generation processes are functioning normally, while the proportion of trajectory observation converted into effective face capture is significantly reduced. This allows the abnormal observation capability to be located at the face imaging stage, rather than simply assuming that the camera equipment to be calibrated failed to detect the corresponding person.
[0155] When the number of successful samples in any preceding layer is zero, the observation rate of subsequent strata dependent on that layer is not calculated, and the corresponding subsequent layer is marked as unevaluable. This process avoids division by zero and prevents errors in human detection or trajectory generation from being attributed to face capture or identity matching.
[0156] S7. When the observation rate of human body and trajectory meets the normal threshold, and the observation rate of face or identity is lower than the abnormal threshold, retain the trajectory node of the closed-loop personnel in the area of the camera equipment to be calibrated, set its identity attribute to inferred identity, and block the corresponding personnel non-arrival warning.
[0157] Specifically, after obtaining the stratified observation rates for the four levels of human body, trajectory, face, and identity of the camera device to be calibrated, each rate is compared with the corresponding threshold. The normal threshold characterizes the minimum observation level at which human body detection and target tracking can operate stably, while the abnormal threshold characterizes the threshold at which a significant decline in capability occurs in face capture or identity matching. Each threshold can be predetermined based on historical observation results of the camera device under normal lighting, unobstructed field of view, and correct parameter configuration, or it can be configured based on benchmark data from similar cameras. When the observation rates for the human body and trajectory levels both reach their respective normal thresholds, while the observation rates for the face or identity levels are below the corresponding abnormal thresholds, it indicates that the camera device can still observe people and form continuous passage trajectories, but there are anomalies in the face imaging or identity verification stages. Therefore, the lack of face recognition records cannot be directly interpreted as people not passing through the area.
[0158] For closed-loop personnel under the aforementioned observation period, their required credibility, expected time window, upstream and downstream travel directions, and the campus area corresponding to the camera to be calibrated are read. If a trajectory observation event matching the travel direction of the closed-loop personnel has already formed within the expected time window, the trajectory observation event is associated with the closed-loop personnel, and their trajectory node within the area of the camera to be calibrated is retained. If a qualified face image is not obtained or identity matching is not completed in the trajectory observation event, the node is not deleted, and identity matching failure is not used as a trajectory interruption condition. The retained trajectory node records at least the area location, expected traversal time range, travel direction, required credibility, and associated trajectory number, so that the node can continue to participate in the temporal connection of preceding and following trajectory nodes.
[0159] Since the identity of the person at the retained node is not directly identified by the camera device to be calibrated, but rather inferred based on the identification results of the first and second cameras for the same person in the closed loop, the traffic topology, and the reliability of the necessary passage, the identity attribute of this trajectory node is set as inferred identity. Inferred identity and directly identified identity use different data identifiers, and the basis for identity inference is retained, including upstream and downstream identification records, expected time windows, and reliability of the necessary passage. This process neither equates the inferred result with the direct face matching result of the camera device to be calibrated, nor discards the trajectory information of the person actually passing through the area, thus facilitating the differentiation of the method of obtaining node identity during subsequent queries.
[0160] Before generating a personnel arrival warning, check the identity attributes of the corresponding trajectory nodes and the device's hierarchical observation status. If the closed-loop personnel have retained the inferred identity trajectory node within the area of the camera to be calibrated, and the observation rate at the face or identity level is abnormal, then block the personnel arrival warning triggered solely by the camera's failure to generate a direct face recognition record. This blocking only applies to arrival warnings corresponding to failed face capture or identity matching, and does not affect warnings triggered by other trajectory conditions such as boundary crossing, reverse passage, or abnormal stopping. For example, if a camera's human body and trajectory observation rates are 96% and 95% respectively, and the face observation rate is only 60%, and student A has formed a closed loop with upstream and downstream cameras and has a continuous passage trajectory within the device's area, then the node in that area is retained and marked as the inferred identity. No further arrival warnings will be issued due to the lack of student A's face matching record, thereby reducing trajectory breaks and false alarms caused by a decline in local face recognition capabilities.
[0161] Example
[0162] Please see the appendix Figure 3 This embodiment uses the scenario of students traveling from the dormitory area to the teaching area as an example. A first camera A, a camera to be calibrated B, a second camera C, and a bypass camera D are installed on campus. The first camera A is located at the dormitory exit, the camera to be calibrated B is located in the middle of the tree-lined road leading from the dormitory area to the teaching area, the second camera C is located at the teaching building entrance, and the bypass camera D is located on a side road that bypasses the tree-lined road. A directed traffic topology network is established based on the campus roads, building entrances and exits, and the monitoring fields of each camera, forming a first candidate path from A to C via B and a second candidate path from A to C via D. The physical travel distance of the first candidate path is 260 meters, and the physical travel distance of the second candidate path is 310 meters. The travel direction of each road segment is set from the dormitory area to the teaching area.
[0163] During a specific morning traffic period, camera A detected student A leaving the dormitory building at 7:30:10 AM, and camera C detected student A entering the teaching building at 7:33:20 AM. Facial features, global body appearance features, observation time, and direction of travel were extracted from both records. Feature comparison showed that student A's overall similarity across the two cameras was 0.91, exceeding the preset identity verification threshold of 0.85. The time difference between the two detections was 190 seconds, falling within the 160-260 second one-way physical passage time from A to C. Furthermore, the observation direction aligned with the passage from the dormitory area to the teaching area. Therefore, student A was identified as a closed-loop individual.
[0164] When analyzing the travel path of student A, the human detection, trajectory, face capture, and identity matching data generated by the camera device B to be calibrated are masked. The possible paths are determined solely based on the observations from the first camera device A, the second camera device C, and the bypass camera device D. The directional matching degree of the first candidate path is 1, and the directional matching degree of the second candidate path is 0.8. Initial travel probabilities are determined based on path distance and directional matching degree: the initial travel probability of the first candidate path is 0.598, and the initial travel probability of the second candidate path is 0.402.
[0165] Further, the identification records of bypass camera D between 7:30:10 and 7:33:20 were retrieved. Upon verification, bypass camera D was found to be operating normally and its monitoring field of view was not obstructed, but no valid identification record of student A was generated. Therefore, a decay penalty coefficient of 0.25 was applied to the second candidate path. The probability of passage of the second candidate path after decay was 0.1005, and the reduced probability weight was 0.3015. Since only the first candidate path passes through camera B to be calibrated in this embodiment, the reduced probability weight was compensated to the first candidate path, updating its probability to 0.8995. Thus, the certainty of student A passing through the area of camera B to be calibrated is approximately 0.90, higher than the preset threshold of 0.80.
[0166] Based on the first observation time of the first camera device A and the second observation time of the second camera device C, the time for student A to pass through the camera device B to be calibrated is calculated bidirectionally. The first time interval from A to B is 70 to 110 seconds. Starting from 7:30:10, a forward calculation yields the first time interval from 7:31:20 to 7:32:00. The second time interval from B to C is 90 to 150 seconds. Starting from 7:33:20, a reverse calculation yields the second time interval from 7:30:50 to 7:31:50. The overlap between the two time intervals is from 7:31:20 to 7:31:50; therefore, this time segment is determined as the expected time window for student A to pass through the camera device B to be calibrated.
[0167] Within the expected time window, the video stream of camera device B to be calibrated was retrieved, and the observation results were extracted in a progressive order of human body, trajectory, face, and identity. The video processing results showed that a student was detected entering the effective monitoring area at 7:31:34, forming a continuous human body detection box. Through target tracking, the target crossed the preset road boundary at 7:31:36, moving from the dormitory area towards the teaching area, thus forming a valid human body observation event and trajectory observation event. Due to the presence of tree shadows and the target's head turning during this period, the extracted face image did not reach the preset clarity threshold, therefore no face observation event or identity observation event was formed. The human body observation event and trajectory observation event are retained and will not be deleted due to failed face capture.
[0168] Using 7:00 AM to 9:00 AM as the evaluation period, a total of 100 valid closed-loop personnel samples related to the camera device B to be calibrated were obtained. Among them, 96 samples formed valid human detection results, 92 samples further formed valid trajectory generation results, 60 samples obtained face images that met the quality requirements, and 54 samples completed identity matching. Calculated according to the dynamic base of adjacent levels, the stratified observation rate at the human level was 96%, the stratified observation rate at the trajectory level was approximately 95.83%, the stratified observation rate at the face level was approximately 65.22%, and the stratified observation rate at the identity level was 90%. In this embodiment, the normal threshold for both human body and trajectory was set to 90%, and the abnormal threshold for the face level was set to 75%. Therefore, it can be determined that the human detection and trajectory generation status of the camera device B to be calibrated is normal, but the face capture capability is lower than the abnormal threshold.
[0169] For student A, the trajectory node formed within the area of the camera device B to be calibrated is retained, and the regional location, direction of travel, time of boundary crossing, expected time window, and reliability of the required passage are recorded. Since student A's identity is not directly matched by the camera device B to be calibrated, but rather inferred from the closed-loop recognition results of the first camera device A and the second camera device C, as well as the path analysis, the identity attribute of this trajectory node is set to inferred identity, and a connection is established with upstream and downstream direct recognition nodes. When the warning judgment finds that the camera device B to be calibrated has not formed a direct identity matching record for student A, no warning is generated based on this, thus avoiding the misinterpretation of failed face captures due to local lighting, occlusion, or person posture as the person not having passed through. This processing does not affect warnings generated based on other trajectory conditions, such as boundary crossing, reverse passage, and abnormal stopping.
[0170] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for early warning of campus personnel trajectories based on facial recognition, characterized in that, include: S1. Based on the campus personnel access topology network, determine the camera equipment to be calibrated and its corresponding upstream first camera equipment and downstream second camera equipment; S2. Obtain the identification data of the first and second camera devices. If the same target person is identified by the first and second camera devices in succession, then mark the target person as a closed-loop person. S3. Shield the observation data of the camera device to be calibrated, and calculate the reliability of the closed-loop personnel passing through the area of the camera device to be calibrated based on the recognition time and recognition direction of the first and second cameras and the passage topology network; S4. If the required confidence level is greater than the preset threshold, then based on the identification time and road segment passage time efficiency parameters, a forward and reverse bidirectional deduction is used to generate the expected time window for the closed-loop person to pass through the camera device to be calibrated. S5. Within the expected time window, extract the human detection results, trajectory generation results, face capture results and identity matching results of the camera device to be calibrated in sequence; S6. Aggregate the extraction results of multiple closed-loop personnel, and calculate the stratified observation rate of the camera device to be calibrated at the human body, trajectory, face and identity levels according to the sample size ratio of adjacent progressive results; S7. When the observation rate of the human body and trajectory meets the normal threshold, and the observation rate of the face or identity is lower than the abnormal threshold, retain the trajectory node of the closed-loop person in the area of the camera device to be calibrated, set its identity attribute to inferred identity, and block the corresponding personnel non-arrival warning.
2. The campus personnel trajectory early warning method based on face recognition according to claim 1, characterized in that, S1 specifically includes the following steps: The physical areas for personnel passage within the campus are constructed as a directed connected graph. The edges in the graph are defined as passage segments, and the nodes in the graph are defined as the monitoring fields of the camera equipment. Corresponding passage direction and standard passage time parameters are configured for each passage segment. The topological position of the camera device to be calibrated in the directed connected graph is obtained. The directly adjacent monitoring node is identified as the upstream first camera device by traversing the inbound passage segment of the camera device to be calibrated in reverse direction. The directly adjacent monitoring node is identified as the downstream second camera device by traversing the outbound passage segment in forward direction.
3. The campus personnel trajectory early warning method based on face recognition according to claim 1, characterized in that, S2 specifically includes the following steps: The local facial features, global body appearance features, observation time, and direction of departure or entry of the target person are extracted from the video processing data of the first and second camera devices, respectively. Calculate the comprehensive similarity of the features extracted by the first camera device and the second camera device. When the comprehensive similarity reaches the identity confirmation threshold and the difference between the two extracted observation times matches the one-way physical passage time from the first camera device to the second camera device in the passage topology network, they are determined to be the same target person and marked as a closed-loop person.
4. The campus personnel trajectory early warning method based on face recognition according to claim 1, characterized in that, S3 specifically includes the following steps: Under the premise of shielding the observation data of the camera device to be calibrated, all connected branches from the first camera device to the second camera device are traversed in the access topology network to generate a set of candidate access paths for the closed-loop personnel; Based on the physical travel distance of each path in the candidate travel path set and the degree of matching with the actual travel direction of people, an initial travel probability is assigned to each candidate travel path; By combining the observation data of the other bypass cameras in the traffic topology network (excluding the camera to be calibrated), the initial traffic probability of each candidate traffic path is dynamically weighted and updated, and the updated probabilities of all candidate traffic paths passing through the camera to be calibrated are summed to obtain the certainty confidence.
5. A campus personnel trajectory early warning method based on face recognition according to claim 4, characterized in that, The step of dynamically updating the initial travel probability of each candidate travel path by combining the observation data of the other bypass cameras in the travel topology network (excluding the camera to be calibrated) specifically includes: Extract the actual identification records of the closed-loop personnel from the bypass camera devices distributed along each candidate passage path; For alternative candidate paths that do not pass through the camera device to be calibrated, if the bypass camera device included in the alternative candidate path does not generate the identification record of the closed-loop personnel, then an attenuation penalty coefficient is applied to the alternative candidate path to reduce its probability of passage. The probability weights that are reduced due to the applied attenuation penalty coefficient are normalized and compensated and superimposed on the candidate paths passing through the camera device to be calibrated, thus completing the dynamic weight update.
6. The campus personnel trajectory early warning method based on face recognition according to claim 1, characterized in that, S4 specifically includes the following steps: Based on the identification time, the first observation time of the closed-loop person at the first camera device and the second observation time at the second camera device are extracted, and the first time interval from the first camera device to the camera device to be calibrated and the second time interval from the camera device to the second camera device are extracted from the passage timeliness parameters. Add the first observation time to the preceding time interval to deduce the first time interval containing the first time lower bound and the first time upper bound in a forward deduction; By subtracting the latter time interval from the second observation time, a second time interval containing the second time lower bound and the second time upper bound is derived by reverse deduction. Extract the overlapping portion of the first time interval and the second time interval on the time axis, and use it as the final expected time window.
7. A campus personnel trajectory early warning method based on face recognition according to claim 6, characterized in that, The step of extracting the overlapping portion of the first time interval and the second time interval on the time axis and using it as the final expected time window specifically includes: Determine whether the first time interval and the second time interval have an intersection. If there is an intersection, directly extract the intersecting segment as the expected time window. If the first time interval and the second time interval do not intersect, the timing offset of the two time intervals is calculated, and a preset device system clock drift tolerance parameter is introduced to perform bidirectional outward expansion compensation on the boundary of the first time interval and the second time interval until the two time intervals after compensation intersect, and the envelope overlap segment formed after outward expansion compensation is used as the expected time window.
8. A campus personnel trajectory early warning method based on face recognition according to claim 1, characterized in that, S5 specifically includes the following steps: Human morphology detection is performed on the video stream of the camera device to be calibrated within the expected time window. If a target is detected, the detection result is extracted as a human observation event. A tracking algorithm is executed on the extracted human observation events. If the target forms a continuous coordinate sequence that crosses the preset passage boundary, the trajectory information is extracted as a trajectory observation event. Extract the face image of the target human body region in the trajectory observation event. If the image meets the preset face clarity and face size thresholds, then the image is extracted as a face observation event. The extracted face image is compared with the feature vector similarity of the identity feature database. If the similarity is higher than the preset threshold, the matching result is extracted as an identity observation event.
9. A campus personnel trajectory early warning method based on face recognition according to claim 1, characterized in that, S6 specifically includes the following steps: Summarize the extraction results of all closed-loop personnel regarding the camera device to be calibrated within a preset time period, and count the total number of closed-loop personnel as the evaluation base. Among the total number of people in the closed loop, the number of independent samples for which human detection results, trajectory generation results, face capture results, and identity matching results were successfully extracted are counted in sequence. Based on the physical progression dependency of the task hierarchy, the number of samples that successfully output results from the previous level is used as the dynamic calculation base. The percentage of the current level's sample count relative to the dynamic calculation base is calculated, and the hierarchical observation rate of the camera device to be calibrated is output.
10. A campus personnel trajectory early warning method based on face recognition according to claim 9, characterized in that, The step of calculating the percentage of samples at the current level relative to the dynamic calculation base, based on the physical progression dependency of the task hierarchy and using the number of samples that successfully output results at the previous level as the dynamic calculation base, specifically includes: The number of samples from which human body detection results were extracted is divided by the total number of people in the closed loop to calculate the stratified observation rate at the human body level. The hierarchical observation rate of the trajectory level is calculated by dividing the number of samples from the trajectory generation results by the number of samples from the human detection results. The hierarchical observation rate at the face level is calculated by dividing the number of samples of the extracted face capture results by the number of samples of the extracted trajectory generation results. The hierarchical observation rate at the identity level is calculated by dividing the number of samples from which identity matching results are extracted by the number of samples from which face capture results are extracted.
