Pedestrian flow statistical tracking method, device, equipment, medium and product

Through image acquisition equipment and target tracking algorithms, target objects passing through security gates are identified and tracked, and their status is recorded in the database, solving the problem of inaccurate traffic statistics in the prior art, real-time and accurate traffic statistics and tracking are achieved.

CN119672602APending Publication Date: 2025-03-21WONLY SECURITY & PROTECTION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411735674.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The prior art is difficult to accurately count and track the flow of people passing through the security gate, resulting in inaccurate data.

Method used

Continuous video frames are acquired through the image acquisition device, the target object is identified and tracked using the target tracking algorithm, and its status is recorded in the database. When the state of the target object or other unoccupied object changes, the number of people is counted and the database records are updated.

Benefits of technology

Real-time and accurate statistical tracking of the flow of people through the security door is achieved, detailed personnel flow data is provided, and operational optimization of commercial facilities and security management of private families is supported.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672602A_ABST
    Figure CN119672602A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image recognition, and particularly discloses a pedestrian volume statistical tracking method, device and equipment, a medium and a product, and the method comprises the steps: obtaining continuous video frames collected by image collection equipment; performing image processing on a target video frame in the continuous video frames to obtain a target object, and tracking the target object; if the object ID of the target object is in the database, recording the state of the target object in the database according to the position of the target object in the target video frame; judging whether object IDs of other objects exist in a database or not; other objects are objects which do not appear in the target video frame; and if the object IDs of the other objects exist in the database and the termination states of the other objects are inconsistent with the initial states, counting the number of people according to the termination states and the initial states, and deleting the object IDs of the other objects in the database. According to the scheme, the flow of people passing through the safety door can be accurately counted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and specifically discloses a method, device, equipment, medium and product for tracking human flow statistics. Background Art

[0002] Security doors belong to the access control system and are an important part of modern access control. The door wings are driven by the control system and open and close automatically. As long as the entrant is verified to be authorized, the door wings will open automatically. They will close after a delay, and the delay time is adjustable.

[0003] During the operation of the security door, various image data passing through the security door can be collected to track and count the flow of people and obtain detailed data on the flow of people. These data can be used to optimize the layout of commercial facilities, adjust operation strategies, improve service efficiency, etc. It can also be used in private homes to count the number of people indoors and then carry out targeted deployment and disarming, such as shutting down power doors and windows and other security measures. Improve the efficiency of facility use and user experience. There is an urgent need for a method to accurately count and track the flow of people passing through the security door. Summary of the invention

[0004] In view of this, the present application provides a method, device, equipment, medium and product for human flow statistics tracking, which can realize the statistical tracking of human flow passing through the security door. The technical solution is as follows.

[0005] In a first aspect, a method for tracking human traffic statistics is provided, the method comprising:

[0006] Acquire continuous video frames captured by an image acquisition device;

[0007] Performing image processing on a target video frame in the continuous video frames to obtain a target object, and tracking the target object;

[0008] If the object ID of the target object is in the database, recording the state of the target object in the database according to the position of the target object in the target video frame;

[0009] Determine whether there is an object ID of other objects in the database; the other objects are objects that do not appear in the target video frame;

[0010] If the object ID of other objects exists in the database, and the termination state and the start state of the other objects are inconsistent, the number of people is counted according to the termination state and the start state, and the object ID of the other objects is deleted from the database.

[0011] In a possible implementation manner, recording the state of the target object according to the position of the target object in the target video frame includes:

[0012] Obtaining the coordinates of the center point of the detection frame of the target object in the target video frame;

[0013] If the center coordinate of the detection frame of the target object is greater than a first threshold, the state of the target object is recorded as 1;

[0014] If the center coordinates of the detection frame of the target object are less than the first threshold, the state of the target object is recorded as -1.

[0015] In a possible implementation, performing the headcount according to the termination state and the start state and deleting the object IDs of the other objects in the database includes:

[0016] If the ending state of the other object is 1 and the starting state is -1, the number of people walking out of the other object is increased by 1, and the object ID of the other object is deleted from the database;

[0017] Alternatively, if the end state of the other object is -1 and the start state is 1, the statistical value of the number of people entering the target area is increased by 1, and the object ID of the other object is deleted from the database.

[0018] In a possible implementation, the method further includes:

[0019] If the target object does not appear in the target video frame after the target video frame in the continuous video frames is processed by the target tracking algorithm, it is directly determined whether there is an object ID of another object in the database.

[0020] In a possible implementation, the image acquisition device is disposed above the target security door to acquire images of objects passing through the target security door from above;

[0021] The method further comprises:

[0022] When the target object in the target video frame is obtained, feedback information is sent to the safety door to control the safety door to be in an open state.

[0023] In a possible implementation, the processing of the target video frame in the continuous video frames by using a target tracking algorithm to obtain the target object in the target video frame includes:

[0024] Performing target detection on the target video frame to obtain each object detection frame in the target video frame;

[0025] Obtaining each prediction box corresponding to the target video frame;

[0026] Matching is performed based on the similarity between each prediction box and the detection box of each object in the target video frame to obtain the target object.

[0027] In a second aspect, a human flow statistics tracking device is provided, the device comprising:

[0028] A frame acquisition module, used to acquire continuous video frames acquired by an image acquisition device;

[0029] A detection and tracking module performs image processing on a target video frame in the continuous video frames to obtain a target object and tracks the target object;

[0030] a recording module, configured to record the state of the target object in the database according to the position of the target object in the target video frame if the object ID of the target object is in the database;

[0031] A determination module, used to determine whether there is an object ID of other objects in the database; the other objects are objects that do not appear in the target video frame;

[0032] The statistical module is used to perform headcount statistics according to the termination state and the start state, and delete the object ID of the other object from the database if the object ID of the other object exists in the database and the termination state and the start state of the other object are inconsistent.

[0033] In a third aspect, a computer device is provided, the computer device comprising a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the above-mentioned human flow statistics and tracking method.

[0034] In a fourth aspect, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the above-mentioned human flow statistics and tracking method.

[0035] In a fifth aspect, a computer program product or a computer program is provided, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the above-mentioned human flow statistics tracking method.

[0036] The technical solution provided by this application may have the following beneficial effects:

[0037] When the image acquisition device on the security door collects continuous video frames, the computer device can process each video frame in the continuous video frames through the target tracking algorithm. Taking the target video frame as an example, the target object in the target video frame can be obtained; when the object ID of the target object is in the database, it means that the target object has appeared in the previous video frame and is still moving. At this time, the state of the target object can be recorded in the database. If there are other objects in the database that have not appeared in the target video frame, then it is necessary to determine the starting state or ending state of the object in the database, so as to determine whether the object walks in or out of the security door, thereby realizing real-time tracking of the entry and exit state of each object. In the above scheme, when each video frame is collected, the object that has appeared in the video frame is continuously observed, and when the object does not appear in the continuous video frame, the starting state and ending state in the database are used to determine whether the object walks in or out, so that the flow of people passing through the security door can be accurately counted. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0039] Figure 1 The figure is a schematic structural diagram of a safety door control system according to an exemplary embodiment.

[0040] Figure 2 The present invention is a method flow chart showing a method for counting and tracking human traffic according to an exemplary embodiment.

[0041] Figure 3 The present invention is a method flow chart showing a method for counting and tracking human traffic according to an exemplary embodiment.

[0042] Figure 4 A logic block diagram of a detection and tracking algorithm involved in an embodiment of the present application is shown.

[0043] Figure 5 A logic block diagram of a pedestrian flow statistics algorithm involved in an embodiment of the present application is shown.

[0044] Figure 6 An algorithm logic diagram for anti-pinch security door and human flow detection, tracking and statistics according to an embodiment of the present application is shown.

[0045] Figure 7 It is a structural schematic diagram of a pedestrian flow statistics and tracking device provided in an embodiment of the present application.

[0046] Figure 8 It is a structural schematic diagram of a computer device provided by an optional embodiment of the present invention. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0048] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between two items, or an association relationship between the two items, or a relationship between indication and being indicated, configuration and being configured, and the like.

[0049] Figure 1 FIG. 1 is a schematic diagram showing a structure of a safety door control system according to an exemplary embodiment. Figure 1 As shown, the safety door control system includes a safety door 110 , an image acquisition device 120 and a controller 130 .

[0050] Optional, such as Figure 1 As shown, the image acquisition device is arranged directly above the safety door 110 to detect and track objects passing through the safety door. The image acquisition device can transmit the acquired image data to the controller 130 for processing via a wired or wireless network.

[0051] Optionally, the image acquisition device may be a computer device with high data processing capabilities, such as a server.

[0052] Optionally, the controller 130 may perform image processing on the images captured by the image acquisition device 120, such as target recognition and target tracking.

[0053] The controller 130 can also control the switch state of the safety door 110 according to the recognition result of the image captured by the image acquisition device 120, so as to realize the anti-pinch function when people pass through the safety door.

[0054] Optionally, the above-mentioned server can be a server cluster or a distributed system composed of multiple physical servers, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms and other technical computing services.

[0055] Optionally, the system may further include a management device, which is used to manage the system (such as managing the connection status between each module and the server, etc.), and the management device is connected to the server via a communication network. Optionally, the communication network is a wired network or a wireless network.

[0056] Optionally, the above-mentioned wireless network or wired network uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any other network, including but not limited to any combination of local area network, metropolitan area network, wide area network, mobile, limited or wireless network, private network or virtual private network. In some embodiments, the technology and / or format including hypertext markup language, extensible markup language, etc. are used to represent the data exchanged through the network. In addition, conventional encryption technologies such as secure socket layer, transport layer security, virtual private network, Internet protocol security, etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technology can also be used to replace or supplement the above-mentioned data communication technology.

[0057] The development of anti-pinch and crowd flow tracking statistical algorithms based on security doors is mainly to improve the safety of security doors, optimize crowd flow management, and enhance user experience.

[0058] If there is no effective anti-pinch mechanism during the opening and closing process of the safety door, pedestrians or objects may be pinched. The anti-pinch algorithm based on the safety door can provide a smooth and safe door operation experience, prevent the door from suddenly pinching users or objects, detect the risk of pinching in real time, and take timely measures to avoid accidents; during the operation of the door, if pinching occurs, the system can immediately provide feedback and take measures to prevent further damage, thereby improving user safety, comfort and satisfaction.

[0059] By tracking and counting the flow of people, detailed data on personnel flow can be obtained. This data can be used to optimize the layout of commercial facilities, adjust operational strategies, and improve service efficiency. It can also be used in private homes to count the number of people indoors and then conduct targeted deployment and disarming, such as shutting down power doors and windows and other security measures. Improve the efficiency of facility use and user experience.

[0060] Therefore, the development of anti-pinch and human flow tracking statistical algorithms based on security doors can improve safety, optimize human flow management, enhance user experience, meet business needs, and promote technology and innovation. These goals work together to promote the development of anti-pinch and human flow tracking statistical algorithms based on security doors. Figure 2 is a method flow chart of a method for tracking human traffic statistics according to an exemplary embodiment. The method is executed by a computer device, which may be a computer device such as Figure 1 The controller 130 in the safety door control system shown in FIG. Figure 2 As shown, the method flow chart of the human flow statistics tracking method may include the following steps:

[0061] Step 201, obtaining continuous video frames captured by an image capture device.

[0062] Optionally, in the embodiment of the present application, a camera or other image acquisition device at the security door is used to continuously capture real-time video frames passing through the door area to form an input video stream. Specifically, the image acquisition device can be set directly above the security door to capture the image at the security door in real time.

[0063] Step 202: perform image processing on a target video frame in the continuous video frames to obtain a target object, and then track the target object.

[0064] After the image acquisition device acquires continuous video frames, it can output the continuous video frames to the controller for data processing, analyze each captured frame, identify and track each pedestrian (object), and obtain its position information and motion trajectory.

[0065] Specifically, in order to accurately identify and lock the position and status of each pedestrian, a corresponding object ID is set for each identified pedestrian in the embodiment of the present application to ensure that the system can continuously track the target and avoid missed detection or false detection.

[0066] Step 203: If the object ID of the target object is in the database, the state of the target object is recorded in the database according to the position of the target object in the target video frame.

[0067] Each target object is assigned a unique ID after being detected and stored in the database.

[0068] If the target object exists in the target video frame and its ID already exists in the database, then data such as the state (eg, position information) may be updated according to the motion state of the target object in the target video frame.

[0069] Step 204 , determining whether there are object IDs of other objects in the database; other objects are objects that do not appear in the target video frame.

[0070] Furthermore, the controller checks whether there are any object IDs that have not been identified or have not appeared again in the current video frame. In other words, the controller also needs to determine whether there are any pedestrians that were previously in the database but have not appeared in the latest video frame, which means that the pedestrian has left the monitoring range, that is, entered or exited the security door.

[0071] Step 205: If the object ID of other objects exists in the database, and the ending state and the starting state of other objects are inconsistent, the number of people is counted according to the ending state and the starting state, and the object ID of other objects is deleted from the database.

[0072] If it is found that the state corresponding to some other object ID in the database has changed (such as from entering state to exiting state), the system will adjust the current entry / exit headcount according to the state change and delete the object ID to avoid redundancy.

[0073] In summary, when the image acquisition device on the security door acquires continuous video frames, the computer device can process each video frame in the continuous video frames through the target tracking algorithm. Taking the target video frame as an example, the target object in the target video frame can be obtained; when the object ID of the target object is in the database, it means that the target object has appeared in the previous video frame and is still moving. At this time, the state of the target object can be recorded in the database. If there are other objects in the database that have not appeared in the target video frame, then it is necessary to determine the starting state or the ending state of the object in the database, so as to determine whether the object walks in or out of the security door, thereby realizing the real-time tracking of the entry and exit state of each object. In the above scheme, when each video frame is acquired, the object that has appeared in the video frame is continuously observed, and when the object does not appear in the continuous video frame, the starting state and the ending state in the database are used to determine whether the object walks in or out, so that the flow of people passing through the security door can be accurately counted.

[0074] Figure 3 is a method flow chart of a method for tracking human traffic statistics according to an exemplary embodiment. The method is executed by a computer device, which may be a computer device such as Figure 1 The controller 130 in the safety door control system shown in FIG. Figure 3 As shown, the method flow chart of the human flow statistics tracking method may include the following steps:

[0075] Step 301: Acquire continuous video frames captured by an image capture device.

[0076] In the embodiment of the present application, the image acquisition device can perform image acquisition of data of a specified position in real time. For example, in the embodiment of the present application, the image acquisition device can be arranged directly above the security door to acquire image data at the security door from top to bottom.

[0077] Optionally, in order to reduce the resource consumption of the security gate control system, an infrared sensing device may be provided in the security gate control system. When the infrared sensing device senses that an object is approaching the security gate area, the image acquisition device is awakened to perform image acquisition to obtain continuous video frames. Only then will the controller perform image processing on the continuous video frames, thereby reducing the resource consumption of the security gate system while ensuring the statistical tracking of human flow.

[0078] Step 302: perform image processing on a target video frame in the continuous video frames to obtain a target object, and then track the target object.

[0079] Specifically, in an embodiment of the present application, the controller first performs target detection on the target video frame to obtain each object detection frame in the target video frame; obtains each prediction frame corresponding to the target video frame; and matches each prediction frame with the detection frame of each object in the target video frame based on the similarity to obtain the target object.

[0080] That is, the system performs target detection on each video frame and generates a bounding box for each detected object, that is, it frames the position of each person. At the same time, the system matches the prediction box (the area where the object may appear predicted by the target tracking algorithm) with the detection box and calculates the similarity between the two (such as IOU, Intersection over Union) to confirm whether the object is the previously detected target. By matching the detection box and the prediction box, the target object in the current frame can be determined and its position change can be tracked.

[0081] For details, please refer to Figure 4 , which shows a logic block diagram of a detection and tracking algorithm involved in an embodiment of the present application. Figure 4 As shown, it shows a target tracking algorithm execution process based on ByteTrack. The following is a specific explanation of this flowchart: First, obtain the input image, that is, the continuous video frame in the embodiment of the present application, as the initial data for target detection and tracking. The system uses YOLOv5 for target detection, and after the input image is processed by the model, a series of detection frames are output. Specifically, the detection frames are divided into high-score frames and low-score frames. The high-score frame indicates a detection result that the model is very confident in, and the IoU (intersection over union) matrix is ​​usually used for matching. The low-score frame indicates a detection result that the model is not sure about, but it may still be a target.

[0082] At this point, the system can perform the first match using the IoU cost matrix. Specifically, the system can use the IoU matrix to match the high-score frame with the existing activity track. If the match is successful, it means that the target detection corresponds to the previous track, and the target continues to be tracked. If the match fails (the frame and track are not matched), the next matching process is entered.

[0083] For unmatched frames, the high-scoring frames that were not matched for the first time can be matched with the lost tracks to try to find the lost target again. If the match is successful, the track can continue to be updated; if it fails, the track will enter the third matching process. The third match is the last matching opportunity, and the system will match the unmatched frame with the lost track again. If the match is still unsuccessful, the track will be marked as lost and deleted. Specifically, the system will determine whether the number of times the target is lost exceeds 30 times. If so, the track of the target will be deleted, indicating that the target may have left the monitoring range.

[0084] As for the unmatched trajectories, they include the activated trajectories and the lost target trajectories. The activated trajectories are the existing target trajectories, but they are not currently matched to any detection frame. The lost target trajectories are the previously detected targets that cannot be detected in the current frame. For the activated trajectories, they can be matched with the low-resolution frames for the second time to determine the matched trajectories and the lost target trajectories.

[0085] The above matched frames will activate the trajectory through Kalman update and perform Kalman filtering for processing. The historical data of the trajectory will be used to predict the next position of the target, which will help match and correct subsequent frames. After a successful match, the system will update the activated trajectory with new detection results, including its position, status and other information. If a high-scoring frame has not been matched to an existing trajectory in three matches and its score exceeds the threshold, the system considers it a new target, activates the new trajectory, and starts tracking the target.

[0086] Specifically, the Kalman filter algorithm used in the traditional Bytetrack algorithm mainly uses the center point coordinates (x, y) of the detection frame, the height h of the detection frame, the aspect ratio a, and the corresponding speed values ​​x', y', h', a', a total of eight-dimensional vector values; in the embodiment of the present application, the eight-dimensional vector x, y, w, h, x', y', w', h' can be used in the Kalman filter algorithm, that is, the aspect ratio a is replaced with the width w of the detection frame. Because the target shape of the traditional bytetrack algorithm is relatively fixed, and our algorithm is applied to the top of the door, the width and height of the detection frame change greatly with the movement of the person, and our algorithm is more accurate in this case.

[0087] Step 303: If the object ID of the target object is in the database, the coordinates of the center point of the detection box of the target object in the target video frame are obtained.

[0088] Step 304: if the center coordinates of the detection frame of the target object are greater than the first threshold, the state of the target object is recorded as 1.

[0089] The system compares the center point coordinates with a preset first threshold value. If the center point coordinates exceed the threshold value (usually meaning that the target object is close to a certain edge or area of ​​the door), the state of the target object is updated to 1, indicating that it is close to the door.

[0090] Step 305: If the center coordinates of the detection frame of the target object are less than the first threshold, the state of the target object is recorded as -1.

[0091] If the coordinate of the center point of the detection frame is less than the first threshold (usually meaning that the target object is far away from a certain edge or area of ​​the door), the state of the target object is updated to -1, indicating that it is in a state of leaving the door or being far away.

[0092] Step 306 , determining whether there are object IDs of other objects in the database; other objects are objects that do not appear in the target video frame.

[0093] The system checks the target object ID in the database to determine whether there are objects that do not appear in the current video frame. If an object ID does not appear in the current video frame, it means that the object may have left the detection area.

[0094] Step 307: If the object ID of other objects exists in the database and the ending state and the starting state of other objects are inconsistent, the number of people is counted according to the ending state and the starting state, and the object ID of other objects is deleted from the database.

[0095] For objects that no longer appear in the current frame, the system checks whether their ending state is consistent with their starting state.

[0096] In one possible implementation, if the ending state of other objects is 1 and the starting state is -1, the counting value of the number of people walking out of other objects is increased by 1, and the object ID of other objects is deleted from the database; or, if the ending state of other objects is -1 and the starting state is 1, the counting value of the number of people walking into the target area is increased by 1, and the object ID of other objects is deleted from the database.

[0097] For example, if the state of a target object changes between 1 and -1, it means that the object has completed the action of entering or leaving the door. Based on these state changes, the system will update the entry / exit count and delete the object ID to avoid data redundancy.

[0098] In a possible implementation, if the target object does not appear in the target video frame after the target video frame in the continuous video frames is processed by the target tracking algorithm, it is directly determined whether the object ID of other objects exists in the database.

[0099] That is, if the target tracking algorithm processes the target video frame in the continuous video frames and finds that the target object does not appear in the target video frame, that is, no pedestrian is detected in the target video frame, then the object IDs of other objects in the database can be directly processed.

[0100] In a possible implementation, when the target object in the target video frame is obtained, feedback information is sent to the safety door to control the safety door to be in an open state.

[0101] Since the pedestrian flow statistics and tracking method in the embodiment of the present application is applied in a safety gate control system, when a target object is detected in the target video frame (that is, it can be considered that a pedestrian is about to pass through the safety gate), the safety gate is controlled to be in an open state to implement an anti-pinch operation.

[0102] Please refer to Figure 5 , which shows a logic block diagram of a human flow statistics algorithm involved in an embodiment of the present application. Figure 5 As shown in the figure, the execution logic in the figure describes a processing flow of a crowd tracking and statistical algorithm based on video analysis, especially in terms of target detection, ID matching, crowd counting, etc. The main function is to achieve safety door anti-pinch and crowd flow statistics. The following is the execution logic and explanation of the specific process:

[0103] 1. Continuous reading of video frames:

[0104] The system first continuously acquires video frames through image acquisition devices for target detection and tracking.

[0105] 2. Object Detection:

[0106] Perform target detection on each frame of video image, that is, identify whether there is a person or other object that needs to be tracked in the frame. This step is usually achieved through target detection algorithms (such as YOLO).

[0107] 3. Target tracking:

[0108] Track the target and determine its trajectory to prevent it from being lost in consecutive video frames, for example, using algorithms such as Kalman filter or ByteTrack.

[0109] 4. Detecting a person:

[0110] Determine whether the target (person) is detected in the current frame. If no person is detected, continue to process the next frame; if detected, proceed to the next step.

[0111] 5. Target ID (i.e. object ID) in the database:

[0112] Target ID check: Determine whether the currently detected target is in the database.

[0113] If the target ID already exists in the database, it means that the target has been identified before, and the status of the target is updated at this time;

[0114] If the target ID does not exist, the target ID information is recorded in the database, indicating that it is a new target.

[0115] 6. Update target status:

[0116] When the target ID already exists in the database, the system will determine its status based on the coordinates of the center point of the target's detection box.

[0117] Greater than threshold: If the coordinate of the center of the detection box is greater than the set threshold, the target state is updated to "1".

[0118] Less than threshold: If the coordinate of the center of the detection box is less than the set threshold, the target state is updated to "-1".

[0119] 7. Other object ID checks:

[0120] The system determines whether there are other object IDs in the database. These object IDs represent targets that do not appear in the current frame (i.e., targets that were detected before but are not detected now).

[0121] The end state is inconsistent with the start state: If the end state of an object is different from the start state, it means that the target has left the monitoring range.

[0122] 8. Crowd statistics:

[0123] The system will count the flow of people based on the changes in the end and start states of the objects:

[0124] When an object leaves, the system increases the number of people leaving by 1.

[0125] When an object enters, the system adds 1 to the number of people entering.

[0126] 9. Delete ID:

[0127] When the system counts the entry or exit of an object, the object's ID will be deleted from the database to avoid duplicate counting.

[0128] 10. Loop processing:

[0129] The entire process will continuously process each frame of video in a loop, track and detect targets in real time, and update crowd statistics.

[0130] Furthermore, the above-mentioned traffic flow tracking and statistical algorithm can also be combined with the safety door anti-pinch function, please refer to Figure 6 , which shows an algorithm logic diagram of a safety door anti-pinch and human flow detection, tracking and statistics involved in an embodiment of the present application. Figure 6 As shown, in the algorithm process, the target in the video frame is detected directly. If an object or pedestrian is detected, feedback is given to the safety door to perform anti-pinch intervention, and the pedestrians are further tracked and the number of people is counted.

[0131] Specifically, in an embodiment of the present application, if an object or pedestrian is detected in the video frame, and the safety door is in an open state at this time, the system can control the safety door to remain in an open state; if the safety door is in a closed state at this time, the system can control the safety door to switch from a closed state to an open state, and gradually open the safety door; if the safety door is in the process of closing at this time, the system can control the safety door to stop the closing operation, and instead perform an opening operation, switching the safety door to an open state, thereby realizing the anti-pinch function of the safety door. Furthermore, a pressure sensor can also be provided on the safety door to detect the pressure during the closing process of the safety door. If no object or pedestrian is detected in the video frame, and the safety door detects that the value of the pressure sensor is greater than a threshold value during the closing process, the safety door can be controlled to stop the closing operation, and instead perform an opening operation, switching the safety door to an open state, thereby realizing the anti-pinch function of the safety door.

[0132] In summary, when the image acquisition device on the security door acquires continuous video frames, the computer device can process each video frame in the continuous video frames through the target tracking algorithm. Taking the target video frame as an example, the target object in the target video frame can be obtained; when the object ID of the target object is in the database, it means that the target object has appeared in the previous video frame and is still moving. At this time, the state of the target object can be recorded in the database. If there are other objects in the database that have not appeared in the target video frame, then it is necessary to determine the starting state or the ending state of the object in the database, so as to determine whether the object walks in or out of the security door, thereby realizing the real-time tracking of the entry and exit state of each object. In the above scheme, when each video frame is acquired, the object that has appeared in the video frame is continuously observed, and when the object does not appear in the continuous video frame, the starting state and the ending state in the database are used to determine whether the object walks in or out, so that the flow of people passing through the security door can be accurately counted.

[0133] In the embodiments of the present application, a people flow statistics tracking device is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0134] The present application embodiment provides a human flow statistics tracking device, Figure 7 : is a schematic diagram of a human flow statistics tracking device provided in an embodiment of the present application, the device comprising:

[0135] The frame acquisition module 701 is used to acquire continuous video frames acquired by the image acquisition device;

[0136] A detection and tracking module 702 is used to perform image processing on a target video frame in the continuous video frames, obtain a target object, and track the target object;

[0137] A recording module 703 is configured to record the state of the target object in the database according to the position of the target object in the target video frame if the object ID of the target object is in the database;

[0138] A determination module 704 is used to determine whether there is an object ID of other objects in the database; the other objects are objects that do not appear in the target video frame;

[0139] The statistical module 705 is used to perform headcount statistics according to the termination state and the start state, and delete the object ID of the other object from the database if the object ID of the other object exists in the database and the termination state and the start state of the other object are inconsistent.

[0140] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0141] The pedestrian flow statistics and tracking device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0142] The embodiment of the present invention also provides a computer device having the above Figure 7 People counting tracking shown.

[0143] See also Figure 8 , Figure 8is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display graphic information in a graphical user interface on an external input / output device (such as a display device coupled to an interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.

[0144] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0145] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0146] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0147] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0148] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0149] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0150] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0151] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the present invention.

Claims

1. A method for tracking human traffic statistics, characterized in that: The method comprises: Acquire continuous video frames captured by an image acquisition device; Performing image processing on a target video frame in the continuous video frames to obtain a target object, and tracking the target object; If the object ID of the target object is in the database, recording the state of the target object in the database according to the position of the target object in the target video frame; Determine whether there is an object ID of other objects in the database; the other objects are objects that do not appear in the target video frame; If the object ID of other objects exists in the database, and the termination state and the start state of the other objects are inconsistent, the number of people is counted according to the termination state and the start state, and the object ID of the other objects is deleted from the database.

2. The method according to claim 1, characterized in that The step of recording the state of the target object according to the position of the target object in the target video frame includes: Obtaining the coordinates of the center point of the detection frame of the target object in the target video frame; If the center coordinate of the detection frame of the target object is greater than a first threshold, the state of the target object is recorded as 1; If the center coordinates of the detection frame of the target object are less than the first threshold, the state of the target object is recorded as -1.

3. The method according to claim 2, characterized in that The counting of people according to the termination state and the start state and deleting the object IDs of other objects in the database includes: If the ending state of the other object is 1 and the starting state is -1, the number of people walking out of the other object is increased by 1, and the object ID of the other object is deleted from the database; Alternatively, if the end state of the other object is -1 and the start state is 1, the statistical value of the number of people entering the target area is increased by 1, and the object ID of the other object is deleted from the database.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: If the target object does not appear in the target video frame after the target video frame in the continuous video frames is processed by the target tracking algorithm, it is directly determined whether there is an object ID of another object in the database.

5. The method according to any one of claims 1 to 3, characterized in that: The image acquisition device is arranged above the target security door to acquire images of objects passing through the target security door from above; The method further comprises: When the target object in the target video frame is obtained, feedback information is sent to the safety door to control the safety door to be in an open state.

6. The method according to any one of claims 1 to 3, characterized in that: Performing image processing on a target video frame in the continuous video frames to obtain a target object includes: Performing target detection on the target video frame to obtain each object detection frame in the target video frame; Obtaining each prediction box corresponding to the target video frame; Matching is performed based on the similarity between each prediction box and the detection box of each object in the target video frame to obtain the target object.

7. A human flow statistics tracking device, characterized in that: The device comprises: A frame acquisition module, used to acquire continuous video frames acquired by an image acquisition device; A detection and tracking module, used for processing a target video frame in the continuous video frames by using a target tracking algorithm to obtain a target object in the target video frame; a recording module, configured to record the state of the target object in the database according to the position of the target object in the target video frame if the object ID of the target object is in the database; A determination module, used to determine whether there is an object ID of other objects in the database; the other objects are objects that do not appear in the target video frame; The statistical module is used to perform headcount statistics according to the termination state and the start state, and delete the object ID of the other object from the database if the object ID of the other object exists in the database and the termination state and the start state of the other object are inconsistent.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the human flow statistics and tracking method according to any one of claims 1 to 6 by executing the computer instructions.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute any one of the human flow statistics and tracking methods in claims 1 to 6.

10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the human flow counting and tracking method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Systems and methods for vision system tracking in an environment based on detected movements and dwell time

    US12482261B2