Passenger flow data statistics method, computer device and computer readable storage medium
By obtaining the trajectory and time correlation of target objects in the associated area, the passenger flow batch data is determined, which solves the problem of low accuracy of existing passenger flow statistics methods and achieves more efficient passenger flow data statistics and management.
Patent Information
- Application Number
- CN202311216586.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-19
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-09-19
AI Technical Summary
Existing passenger flow counting methods rely on manual or camera video analysis, resulting in low accuracy of passenger flow data and making it difficult to effectively manage the flow of people.
By obtaining the trajectory information and time correlation of target objects in the associated area of the target area, the trajectory information and time correlation are used to determine the passenger flow batch data in the target area, thereby improving the accuracy and efficiency of passenger flow data statistics.
It improves the accuracy and efficiency of passenger flow data statistics, can more accurately understand the changing trends of passenger flow in places, and provides more effective personnel management data information.
Smart Images

Figure CN117523472B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of passenger flow data statistics, and in particular to a passenger flow data statistics method, a computer device, and a computer-readable storage medium. Background Art
[0002] With the rapid economic development, the improvement of people's living standards, and the continuous expansion and prosperity of cities, more and more people are moving in public places, such as subways, airports, railway stations, museums, shopping malls, chain stores, etc. In order to effectively manage the data on human flow, it is generally necessary to count or record a large amount of personnel flow.
[0003] Passenger flow data statistics can also divide passenger flow personnel into batches. Through more detailed division and analysis of passenger flow personnel, it can help understand the changing trend of passenger flow in the venue and provide effective personnel management data information in a timely manner.
[0004] At present, passenger flow statistics are mainly calculated manually or by camera video analysis. The camera collects facial information and calculates passenger flow statistics by comparing facial information. Since this passenger flow statistics method relies on facial information, the accuracy of the passenger flow statistics is low. Summary of the invention
[0005] The main technical problem solved by the present application is to provide a passenger flow data statistics method, a computer device and a computer-readable storage medium, which can improve the accuracy of passenger flow data statistics.
[0006] In order to solve the above problems, the first aspect of the present application provides a passenger flow data statistics method, which includes: obtaining trajectory information of target objects in an associated area of the target area; wherein the associated area has an associated relationship with the target area, and the target object enters or leaves the target area through the associated area; and obtaining the time correlation of multiple target objects in the associated area; and determining the target passenger flow batch data of the target area by using the trajectory information and time correlation of each target object.
[0007] In order to solve the above-mentioned problem, the second aspect of the present application provides a computer device, which includes a memory and a processor coupled to each other, wherein program data is stored in the memory, and the processor is used to execute the program data to implement any step of the above-mentioned passenger flow data statistics method.
[0008] In order to solve the above-mentioned problem, the third aspect of the present application provides a computer-readable storage medium, which stores program data that can be executed by a processor, and the program data is used to implement any step of the above-mentioned passenger flow data statistics method.
[0009] The above scheme obtains the trajectory information of the target object in the associated area of the target area, wherein the associated area has an associated relationship with the target area, the target object enters or leaves the target area through the associated area, and the time correlation of multiple target objects in the associated area is obtained. By utilizing the trajectory information and time correlation of each target object, the target passenger flow batch data of the target area is determined, and the passenger flow batch data is determined by comprehensively considering the trajectory and time correlation of each target object, thereby improving the accuracy of passenger flow data statistics. In addition, this method only needs to count the trajectory information of the target object in the associated area entering or leaving the target area, thereby improving the efficiency of passenger flow batch data statistics. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in this application, the following briefly introduces the drawings required in the description of the embodiments. Obviously, the drawings described below are only some embodiments of this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0011] Figure 1 It is a flowchart of the first embodiment of the passenger flow data statistics method of the present application;
[0012] Figure 2 This application Figure 1 A schematic diagram of a flow chart of an embodiment of step S12;
[0013] Figure 3 This is a distribution diagram of an embodiment of the associated area and the target area of the present application;
[0014] Figure 4 This is an example schematic diagram of an embodiment of the trajectory information of the associated area of the present application;
[0015] Figure 5 This application Figure 1 A schematic diagram of a flow chart of an embodiment of step S13;
[0016] Figure 6 It is a flow chart of the second embodiment of the passenger flow data statistics method of the present application;
[0017] Figure 7 This is an example schematic diagram of an embodiment of the trajectory information of the target area of the present application;
[0018] Figure 8 This application Figure 6 A schematic diagram of a flow chart of an embodiment of step S22;
[0019] Fig. 9 It is a structural schematic diagram of an embodiment of a statistical device for passenger flow data of the present application;
[0020] Fig.10 It is a structural schematic diagram of an embodiment of a computer device of the present application;
[0021] Fig.11 It is a structural diagram of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] The terms "first" and "second" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0024] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0025] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0026] The present application provides the following embodiments, and each embodiment is described in detail below.
[0027] See also Figure 1 , Figure 1 This is a flow chart of the first embodiment of the passenger flow data statistics method of the present application. The method may include the following steps:
[0028] S11: Acquire trajectory information of a target object in an associated area of the target area; wherein the associated area has an associated relationship with the target area, and the target object enters or leaves the target area through the associated area.
[0029] The target area may be an area where passenger flow statistics are performed, for example, the target area may include areas such as buses, subways, airports, railway stations, museums, large shopping malls, shopping centers, chain stores, scenic spots, etc. This application does not limit the target area.
[0030] The associated area is associated with the target area, and the target object enters or leaves the target area through the associated area. For example, the associated area is the entrance / exit area of the target area, and the associated area and the target area have overlapping areas, etc., which are not limited in this application.
[0031] Among them, the target object can be a person, an animal, an object, etc., and can be set according to the specific application scenario. This application does not impose any restrictions on this.
[0032] In some embodiments, multiple cameras can be set in the target area and the associated area so that the shooting field of view of the camera equipment covers the target area and the associated area. In some application scenarios, the camera can be installed in a top-mounted or oblique manner, and different installation methods can be used according to the actual scene. For example, if the installation height is greater than H (for example, 2.5) meters, an oblique installation method can be used, and if it is less than H (for example, 2.5) meters, a top installation method can be used. Multiple cameras can be installed to cover the range of the passenger flow statistics area of a large scene.
[0033] In some embodiments, the installed cameras can be distinguished according to the collection area, and can be divided into target area cameras and associated area cameras. The target area camera can be used to collect data from the target area, and the associated area camera can be used to collect data from the associated area. Taking the customer flow statistics of chain stores as an example, it can be divided into entrance / exit cameras and in-store cameras. In addition, the data collected by the camera can be plotted through the web interface.
[0034] In some implementations, a camera is used to collect image data of a target object that appears in the target area / associated area, so that trajectory information of the target object in the associated area of the target area is obtained based on the collected image data.
[0035] In some embodiments, a target detection model may be used to perform target detection on each frame of image data of the video data collected by the camera to obtain a target detection frame for each frame of image data. In addition, a multi-target tracking model may be used to track the target object of each frame of the video data, and tracking may be performed based on the association of multiple parts of the target object, and an identifier may be created for each target object, thereby saving a sequence of target detection frames for each target object according to the identifier of the target object, and the trajectory position of each target detection frame of each target object may be recorded in real time to form trajectory information.
[0036] Among them, the target detection model may include Yolo, BiFPN and other models, which are used to detect the face, head and shoulders, and overall part of the target object. Taking the target object as a person as an example, the face, head and shoulders, human body, etc. can be detected, and this application does not limit this. A multi-target tracking model can be used to track continuous multi-frame image data, and tracking can be performed based on the association of multiple parts of the target object. Among them, the multi-target tracking model can include one of SORT, DeepSORT, ByteTrack, BoT-SORT, etc. It can be selected according to the specific application scenario. This application does not limit the target detection model and the multi-target tracking model.
[0037] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0038] In some embodiments, the above-mentioned target object may be a target object excluding a preset identity, wherein the preset identity includes at least one of a staff member, a delivery member, a passenger flow member, and other personnel. The staff member may be a person working in the target area, and the delivery member may be, for example, a takeaway delivery member, a courier delivery member, etc. In order to make the passenger flow statistics more effective, passenger flow statistics may not be performed on the staff member, the delivery member, etc. Other personnel may be other personnel in the target area who do not need to perform passenger flow statistics, or personnel in a certain area, etc., and this application does not limit this. Passenger flow personnel may be personnel who need to perform passenger flow statistics, and when performing passenger flow statistics, passenger flow statistics may be performed on passenger flow personnel in the target area.
[0039] S12: Obtaining the temporal correlation of multiple target objects in the associated area.
[0040] After acquiring the trajectory information of each target object, by analyzing the trajectory information of each target object, the time correlation of each trajectory information in the time information within the correlation area can be obtained.
[0041] The trajectory information may include the trajectory position of the target object in each frame of image data, or the trajectory information may include the trajectory position of the target object in image data at intervals of a preset number of frames, and may also record time information of each trajectory position.
[0042] In some implementations, the correlation between the time information of each target object at each trajectory position may be obtained as the time correlation.
[0043] In some embodiments, the correlation between the time information of the preset positions of each target object in the associated area can be obtained as the time correlation. The preset position can include at least one of the following: a preset sub-area in the associated area, a preset boundary, at least one preset track position among multiple track positions, etc.
[0044] When obtaining the correlation between time information of multiple or multiple preset positions, an average value or a sum of the multiple correlations may be obtained as the time correlation.
[0045] In some embodiments, an image of each target object located in an associated area can be obtained, and the time information of each target object in the associated area can be obtained by using the time information of the image of the target object in the associated area (such as the time information of the image acquisition, the stay information in the associated area, etc.), thereby obtaining the time correlation between the target objects in the associated area using the time information.
[0046] In some embodiments, see Figure 2, step S12 of the above embodiment can be further expanded. To obtain the time correlation of multiple target objects in the correlation area, this embodiment may include the following steps:
[0047] S121: Using the trajectory information of each target object in the associated area, obtain the time information of each target object passing through a preset boundary in the associated area.
[0048] See also Figure 3 , the target area and the associated area have an associated relationship. The associated relationship takes the case where the target area is adjacent to the associated area as an example. The target object can enter or leave the target area through the associated area. The associated area includes a first area and a second area divided by a preset boundary. The preset boundary can be a straight line, a curve, a polygon, etc., which can be selected according to the specific application scenario, and the present application does not limit this. This embodiment is illustrated by taking the preset boundary as a straight line as an example. The direction of travel of the target object may include at least one of an inward direction and an outward direction. Entering the second area from the first area is the inward direction, and entering the first area from the second area is the outward direction. Using the trajectory information of the target object in the associated area, the time information of the target object passing the preset boundary can be obtained.
[0049] See also Figure 4 For each target object, the trajectory information of the target object in the associated area can be used to determine the intersection of the target object's walking trajectory and the preset boundary, and obtain the time information and travel direction of the target object at the intersection, where the travel direction includes at least one of entering the second area from the first area and entering the first area from the second area. Taking target objects A and B as examples, the associated area, preset boundary, trajectory information, etc. can be drawn in the video screen, and the trajectory information can be used to obtain the time information of the target objects A and B at the intersection corresponding to the entry direction and exit direction.
[0050] In some implementations, if the trajectory information of the target object has no intersection with the preset boundary, it can be indicated that the target object may not have entered the target area, and the target object can be regarded as a target object that does not require passenger flow statistics, and passenger flow statistics are not performed on the target object.
[0051] Thus, the time information and the traveling direction of the intersection position are used as the time information when the target object passes through the preset boundary in the traveling direction.
[0052] In some embodiments, the target area, associated area, preset boundaries, etc. mentioned above in the present application can be drawn based on the video screen of the video data to more clearly display the trajectory information and time correlation of each target object.
[0053] S122: Obtaining preset statistical values between time information of each target object to obtain time correlation between multiple target objects.
[0054] The preset statistical value may be an average value, a difference value, etc. The preset statistical value may describe the similarity or time interval of the time information of each target object at the intersection position. Taking the difference value as an example, the difference value between the time information of each target object and the time correlation between each target object are obtained.
[0055] S13: Determine target passenger flow batch data of the target area by using the trajectory information and time correlation of each target object.
[0056] The trajectory similarity and time correlation of the trajectory information of each target object can be obtained. Therefore, the trajectory similarity and time correlation are comprehensively considered to determine whether the target object belongs to the same batch of passenger flow, and passenger flow statistics are performed based on the divided batch passenger flow to determine the target passenger flow batch data of the target area.
[0057] In some embodiments, see Figure 5 , step S13 of the above embodiment can be further expanded. By using the trajectory information and time correlation of each target object to determine the target passenger flow batch data of the target area, this embodiment may include the following steps:
[0058] S131: Using the time correlation of each target object in the correlation area, select the target objects that meet the time correlation condition as the objects to be counted in each batch.
[0059] It can be determined whether the time correlation of each target object in the correlation area meets the time correlation condition; wherein the time correlation condition includes: the time correlation is less than a preset time threshold. The preset time threshold can be set by the user or based on a statistical application scenario, and this application does not limit this.
[0060] If the time correlation satisfies the time correlation condition, then in response to the time correlation of the trajectory information satisfying the time correlation condition, each target object satisfying the time correlation condition is taken as the object to be counted in the same batch. Thus, based on each target object satisfying the time correlation condition, objects to be counted in each batch are obtained.
[0061] If the time correlation does not satisfy the time correlation condition, in response to the time correlation of the trajectory information not satisfying the time correlation condition, it is determined that each target object that does not satisfy the time correlation condition belongs to a different batch of target objects.
[0062] In some implementations, in order to more accurately determine whether the objects to be counted belong to the same batch, the following step S132 may be performed on the objects to be counted in response to the time correlation of the trajectory information satisfying the time correlation condition.
[0063] As an example, when target object A and target object B enter the second area from the first area and intersect with the preset boundary, the time information t of the target object A and target object B passing the intersection of the preset boundary is recorded. a and t b .
[0064] Get the time information t of target object A and target object B a and t b If the preset time threshold is 2s (seconds), if the time correlation is less than 2s, then target object A and target object B are determined as objects to be counted, and the following step S132 is executed; otherwise, target objects of different batches are determined. Alternatively, a reference time t is set, and the preset time threshold is set to 2s. If the time information t a and t b If the time nodes are all within the time interval of t+2, they are determined to be objects to be counted and the following step S132 is executed; otherwise, target objects of different batches are determined, that is, the objects entering the store are determined to be different batches.
[0065] In some embodiments, for multiple target objects, the above method can also be used for determination. If the time correlation between target objects A, B, and C is less than the preset time threshold of 2 seconds, target objects A, B, and C are taken as objects to be counted in the same batch. Alternatively, if the time correlation between target object A and target objects B and C is less than the preset time threshold of 2 seconds, target objects A, B, and C are taken as objects to be counted in the same batch.
[0066] In some embodiments, for multiple target objects, if the time correlation between target objects A and B is less than the preset time threshold of 2 seconds, and if the time correlation between target objects B and C is less than the preset time threshold of 2 seconds, target objects A, B, and C are taken as objects to be counted in the same batch. This application does not limit the method for determining objects to be counted in the same batch.
[0067] S132: For each batch of objects to be counted, obtain the first trajectory similarity between the trajectory information of the objects to be counted in the batch, select the objects to be counted whose first trajectory similarity meets the first trajectory association condition, and determine them as the initial objects in the same batch.
[0068] For each batch of objects to be counted, the first trajectory similarity between the trajectory information of each object to be counted is obtained, wherein the calculation method of the first trajectory similarity includes Euclidean distance, edit distance or Hausdorff distance, etc., which is not limited in this application.
[0069] Thus, objects to be counted whose first trajectory similarity satisfies the first trajectory association condition are selected and determined as initial objects in the same batch, wherein the first trajectory association condition includes that the first trajectory similarity is greater than a first preset similarity threshold.
[0070] Specifically, it can be determined whether the first trajectory similarity between the objects to be counted is greater than a first preset similarity threshold. If the first trajectory similarity is greater than the first preset similarity threshold, it is determined that the objects to be counted are from the same batch. Otherwise, it is determined that they are from different batches.
[0071] As an example, according to the trajectory information l of the target objects A and B a and l b , determine the similarity of the first trajectories of target objects A and B. Set the first preset similarity threshold to a value between 0 and 1, for example, the first preset similarity threshold is 0.8. If the first trajectory similarity is greater than the first preset similarity threshold, it is determined that the status of target objects A and B when entering the target area (such as a store) is the same batch, otherwise it is determined to be different batches. For multiple target objects, it can be determined whether they belong to the same batch based on the similarity of the first trajectories between each target object. If the similarity of the first trajectories of target object A and multiple target objects is greater than the first preset similarity threshold, it can be determined that target object A and multiple target objects belong to the same batch. In addition, in some cases, if it is determined that target objects A and B are from the same batch, and target objects B and C are from the same batch, target objects A, B and C can be determined to be from the same batch.
[0072] S133: Perform passenger flow statistics based on the initial same batch objects to obtain target passenger flow batch data in the target area.
[0073] For the obtained initial batch objects of each batch, passenger flow statistics can be performed on each batch to obtain initial passenger flow batch data of each batch. Passenger flow statistics are performed on the initial passenger flow batch data of each batch based on each travel direction to obtain target passenger flow batch data in the target area.
[0074] The passenger flow statistics can be performed on the initial batch objects of each direction of travel respectively to obtain the initial passenger flow batch data corresponding to each direction of travel in the associated area, that is, the initial passenger flow batch data of the inbound / outbound direction can be obtained. The passenger flow statistics are performed by integrating the initial passenger flow batch data corresponding to each direction of travel to determine the target passenger flow batch data in the target area.
[0075] Specifically, the initial passenger flow batch data corresponding to each direction of travel is integrated to obtain the same batch information of each target object. For example, the same batch information of each direction of travel can be obtained, for example, the same batch information of the incoming direction is that the target objects A, B and C belong to the same batch, and the same batch information of the outgoing direction is that the target objects B, C and F belong to the same batch.
[0076] Determine whether the same batch information of each target object meets the first same batch condition. The first same batch condition includes that the target objects in the same batch information of each travel direction belong to the same batch. For example, if target objects B and C belong to the same batch in both the incoming and outgoing directions, it is determined that target objects B and C meet the first same batch condition. For example, if target objects A and F do not belong to the same batch in both the incoming and outgoing directions, it is determined that target objects A and F do not meet the first same batch condition.
[0077] In response to meeting the first same-batch condition, each target object that meets the first same-batch condition in the initial passenger flow batch data is determined as a target same-batch object.
[0078] As an example, if the target object's inbound direction and outbound direction are both determined as the same batch in the initial passenger flow batch data, they can be determined as the same batch. If the target object's inbound direction and outbound direction are determined as different batches in the initial passenger flow batch data, they can be determined as different batches. Each batch can include at least one target object.
[0079] Thus, based on the target batch objects, passenger flow statistics are performed to obtain target passenger flow batch data in the target area. Passenger flow statistics are performed on each batch of target batch objects, and the obtained target passenger flow batch data may include at least one of the batch data, the number of target objects included in each batch, and the total passenger flow (i.e., the total number of target objects).
[0080] In the above method, the target objects can be judged whether they enter and leave the target area in the same batch through the entry and exit time and the trajectory information of the target objects, so as to perform passenger flow statistics on the target objects.
[0081] The above scheme obtains the trajectory information of the target object in the associated area of the target area, wherein the associated area has an associated relationship with the target area, and the target object enters or leaves the target area through the associated area, and uses the trajectory information of each target object to obtain the time correlation of each target object in the associated area. Since the trajectory information and time correlation of each target object are used to determine the target passenger flow batch data of the target area, the passenger flow batch data is determined by comprehensively considering the correlation between the trajectory and time of each target object, which can improve the accuracy of passenger flow data statistics. In addition, this method only needs to count the trajectory information of the target object in the associated area entering or leaving the target area, which can improve the efficiency of passenger flow batch data statistics.
[0082] In some embodiments, if the same batch information of the target object does not meet the first same batch condition, that is, the batches judged in the initial passenger flow batch data for the target object's inbound direction and outbound direction are different, for example, the target objects A and B corresponding to the inbound direction belong to the same batch, and the target objects A and B corresponding to the outbound direction belong to different batches, then it can be determined that the target objects A and B do not meet the first same batch condition. In this case, the trajectory information of the target object in the target area can also be obtained to comprehensively determine the batch situation. For details, please refer to the following embodiments.
[0083] See also Figure 6 , Figure 6 1 is a flow chart of the second embodiment of the passenger flow data statistics method of the present application. The method may include the following steps:
[0084] S21: Utilizing the trajectory information and time correlation of each target object, the initial passenger flow batch data of the associated area is obtained.
[0085] Among them, the trajectory information of the target object in the associated area of the target area can be obtained; wherein the associated area has an associated relationship with the target area, and the target object enters or leaves the target area through the associated area; using the trajectory information of each target object, the time correlation of each target object in the associated area is obtained; thus, using the trajectory information and time correlation of each target object, the initial passenger flow batch data of the associated area is obtained.
[0086] The specific implementation process of step S21 can refer to the specific implementation process of the above embodiment, and this application will not elaborate on it here.
[0087] S22: Obtain initial passenger flow batch data of the target area.
[0088] See also Figure 7 , the trajectory information of each target object in the target area can be obtained, for example, the trajectory information of target objects A and B can be obtained, so as to determine whether they belong to the same batch by using the trajectory similarity of the trajectory information, so as to obtain the initial passenger flow batch data of the target area. The trajectory information of the target area and each target object can be drawn in the video screen to more clearly display the trajectory information of each target object.
[0089] In some implementations, the posture information of each target object may be acquired, so as to determine the initial passenger flow batch data of each target object in the target area using the posture information.
[0090] In some implementations, the trajectory information and posture information of each target object in the target area may be integrated to obtain the initial passenger flow batch data of the target area.
[0091] In some embodiments, see Figure 8, the step S22 of the above embodiment can be further expanded. This embodiment may include the following steps:
[0092] S221: Acquire the posture information of each target object in the target area.
[0093] According to the identifier of the target object and the target detection frame sequence detected in step S11, each target detection frame in the sequence is a detection frame of the same target in different frame images, which can refer to a small image of the detection frame area. This embodiment can use the overall detection frame of the target object, such as the body frame, as the image to be detected.
[0094] The trained posture detection model is used to perform posture detection on the image to be detected to obtain the posture information of the target object.
[0095] Optionally, the target objects within the target area referred to in this step may be all target objects within the target area.
[0096] Optionally, the target object in the target area referred to in this step may be a target object whose same batch information of the target object in the associated area does not meet the first same batch condition, that is, an object belonging to different batches in the associated area.
[0097] S222: Determine whether the posture information of each target object meets the interactive association condition.
[0098] The trained serialized gesture recognition model can be used to determine whether the gesture information of each target object meets the interactive association condition. The interactive association condition can be the existence of action interaction, such as conversation, hugging, holding hands, etc., which is not limited in this application.
[0099] For example, taking the target area as a store, after obtaining the human posture information of the target object A and the target object B, it is determined whether there is action interaction between the target objects A and B. If there is action interaction between the target objects A and B, it is determined that the target objects A and B are from the same batch when they are in the store.
[0100] If it is determined that the posture information satisfies the interactive association condition, then in response to the posture information satisfying the interactive association condition, the following step S223 is executed.
[0101] If it is determined that the posture information does not satisfy the interactive association condition, then in response to the posture information not satisfying the interactive association condition, the following step S224 is executed.
[0102] S223: Determine the target objects that meet the interactive association condition as the initial same batch objects.
[0103] The target objects satisfying the interactive association condition are regarded as belonging to the same batch of target objects in the target area, and are determined as the initial same batch of objects.
[0104] If the interactive association condition is not met, the second trajectory similarity of the trajectory information of each target object can also be used to determine whether they belong to the same batch. The process may include the following steps S224 to S227:
[0105] S224: Obtain a second trajectory similarity between trajectory information of each target object in the target area.
[0106] Optionally, the target object in the target area referred to in this step may be the target object that does not satisfy the above-mentioned interactive association condition.
[0107] Optionally, the target objects within the target area referred to in this step may be all target objects within the target area.
[0108] The second trajectory similarity between the trajectory information of each target object in the target area may be obtained, wherein the second trajectory similarity may be calculated by a method including Euclidean distance, edit distance, or Hausdorff distance, etc., which is not limited in the present application.
[0109] S225: Determine whether the similarities of the second trajectories satisfy the second trajectory association condition.
[0110] The second trajectory association condition includes that the second trajectory similarity is greater than a second preset similarity threshold. The second preset similarity threshold may be the same as the first preset similarity threshold, or the second preset similarity threshold may be different from the first preset similarity threshold.
[0111] It can be determined whether the second trajectory similarity between the target objects is greater than the second preset similarity threshold. If the second trajectory similarity is greater than the second preset similarity threshold, it is determined that the target objects are from the same batch and meet the second trajectory association condition. Otherwise, it is determined that they are from different batches.
[0112] In some implementations, a trained interaction behavior discrimination model may be used to determine whether the similarities of the second trajectories satisfy the second trajectory association condition.
[0113] The specific implementation process of steps S224 to S225 in this embodiment can refer to the specific implementation process of step S132 in the above embodiment, and this application will not elaborate on it here.
[0114] In some implementations, in response to the posture information not satisfying the interactive association condition, a step of determining whether the similarities of the second trajectories satisfy the second trajectory association condition may be performed.
[0115] In response to the second trajectory similarity satisfying the second trajectory association condition, the following step S226 is performed.
[0116] S226: Determine the target objects that meet the second trajectory association condition as the initial same batch objects.
[0117] In response to the second trajectory similarity satisfying the second trajectory association condition, the target objects satisfying the second trajectory association condition, that is, belonging to the same batch, are determined as initial same-batch objects.
[0118] In some implementations, in response to the second trajectory similarity not satisfying the second trajectory association condition, the target objects that do not satisfy the second trajectory association condition may be determined as belonging to different batches.
[0119] S227: Perform passenger flow statistics based on the initial same batch objects to obtain initial passenger flow batch data in the target area.
[0120] Based on the initial batch objects in the target area, passenger flow statistics can be performed on each batch of initial batch objects to obtain initial passenger flow batch data representing the target area. The initial passenger flow batch data may include at least one of batch data, the number of target objects included in each batch, and the total number of target objects.
[0121] S23: Determine the target passenger flow batch data of the target area by combining the initial passenger flow batch data of the associated area and the initial passenger flow batch data of the target area.
[0122] The initial passenger flow batch data in the associated area and the initial passenger flow batch data in the target area can be comprehensively determined to determine whether they belong to the same batch, so as to improve the accuracy of batch passenger flow data statistics.
[0123] Determine whether the same batch information of each target object in the associated area meets the first same batch condition. The first same batch condition includes that the target objects in the same batch information of each travel direction belong to the same batch. In response to meeting the first same batch condition, each target object that meets the first same batch condition in the initial passenger flow batch data is determined as a target same batch object.
[0124] In some embodiments, in response to the target object's same batch information in the associated area not meeting the first same batch condition, that is, belonging to different batches in the initial passenger flow batch data of each direction of travel, it is determined whether the target object meets the second same batch condition in the initial passenger flow batch data of the target area. The second same batch condition includes that the same batch information of at least one direction of travel in the associated area is the same as the same batch information in the target area. Alternatively, the second same batch condition includes that the target object belongs to the same batch in the same batch information in the target area.
[0125] In response to meeting the second same batch condition, each target object meeting the second same batch condition in the initial passenger flow batch data is determined as a target same batch object. That is, if the target objects in the target area belong to the same batch, they can be determined to belong to the same batch and the target objects are determined as target same batch objects.
[0126] In some embodiments, the same batch information of the target objects in each traveling direction and the target area in the associated area is obtained. It is determined whether the same batch information satisfies the third same batch condition. The traveling direction includes an inward direction and an outward direction. The third same batch condition includes that the target objects in at least two of the inward direction, the outward direction, and the same batch information in the target area belong to the same batch. In response to meeting the third same batch condition, each target object meeting the third same batch condition is determined as a target same batch object.
[0127] As an example, take the target area as a store and the associated area as the store's entrance and exit. The initial customer flow batch data of the store and the entrance and exit are combined to determine the batch discrimination results of the personnel when entering, in the store, and leaving, and determine the final batch result. If the personnel entering and leaving are both judged as the same batch, regardless of whether the personnel are judged as the same batch in the store, the final discrimination result is the same batch. If the personnel entering and leaving are both judged as different batches, regardless of whether the personnel are judged as the same batch in the store, the final discrimination result is different batches. If the personnel entering and leaving are judged as different results, it is necessary to refer to the discrimination results of the personnel in the store. If the discrimination result in the store is the same batch, the final result is the same batch. If the discrimination result in the store is different batches, the final result is different batches. Thus, the personnel belonging to the same batch can be determined as the target same batch objects.
[0128] Then, passenger flow statistics can be performed based on the above-mentioned target batch objects to obtain target passenger flow batch data in the target area.
[0129] In this embodiment, when performing the same batch discrimination of the target area, the same batch discrimination result can be comprehensively determined using the posture information and trajectory information of the target object, thereby improving the accuracy of passenger flow batch data statistics in the target area. In addition, the same batch discrimination results of the target objects in the associated area and the target area can be comprehensively determined to finally determine the target same batch object, which can further improve the accuracy of passenger flow batch data statistics.
[0130] In some embodiments, the above-mentioned target detection model, multi-target tracking model, posture detection model, interactive behavior discrimination model, etc. may be trained in advance. The following is described as an example, and the present application is not limited thereto.
[0131] Training images can be collected to mark rectangular frames of faces, heads, shoulders, and bodies, and a target detection model (such as YOLO or other target detection models) is used to detect the head, shoulders, and body, obtain the head and shoulders detection frame, the body detection frame, and train the target detection model to obtain a trained target detection model. The training method of the multi-target tracking model can refer to the training process of the target detection model, which is not described in detail in this application.
[0132] The collected human body detection frames can be marked with human body interaction behavior postures, and posture detection models (Openpose or other posture detection deep learning models) can be used to detect postures of human body detection frames, and training can be performed to obtain a trained posture detection model. In addition, the marked posture sequences can be modeled, and semantic behavior descriptions (such as conversations, hugs, holding hands, etc.) can be generated between every two people. The data can be trained through an interactive behavior discrimination model to obtain a trained interactive behavior discrimination model. Among them, the interactive behavior discrimination model can be, for example, a serialization model such as LSTM (Long short-term memory).
[0133] For the above-mentioned embodiments, the present application also provides a passenger flow data statistics device, which is used to implement the steps of any embodiment of the above-mentioned passenger flow data statistics method.
[0134] See also Fig. 9 , Fig. 9 1 is a schematic diagram of a structure of an embodiment of a passenger flow data statistics device of the present application. The passenger flow data statistics device 30 includes a trajectory acquisition module 31, a time association module 32 and a passenger flow statistics module 33. The trajectory acquisition module 31, the time association module 32 and the passenger flow statistics module 33 are interconnected.
[0135] The trajectory acquisition module 31 is used to acquire trajectory information of a target object in an associated area of the target area; wherein the associated area has an associated relationship with the target area, and the target object enters or leaves the target area through the associated area.
[0136] The time association module 32 is used to obtain the time association of multiple target objects in the association area.
[0137] The passenger flow statistics module 33 is used to determine the target passenger flow batch data of the target area by using the trajectory information and time correlation of each target object.
[0138] The specific implementation of this embodiment can refer to the implementation process of the above embodiment, which will not be repeated here.
[0139] For the above embodiment, the present application provides a computer device, see Fig.10 , Fig.101 is a schematic diagram of the structure of an embodiment of a computer device of the present application. The computer device 40 includes a memory 41 and a processor 42, wherein the memory 41 and the processor 42 are coupled to each other, the memory 41 stores program data, and the processor 42 is used to execute the program data to implement the steps in any embodiment of the above passenger flow data statistics method.
[0140] In this embodiment, the processor 42 may also be referred to as a CPU (Central Processing Unit). The processor 42 may be an integrated circuit chip having signal processing capabilities. The processor 42 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 42 may also be any conventional processor, etc.
[0141] The method of the above embodiment can be implemented in the form of a computer program, so the present application proposes a computer readable storage medium, see Fig.11 , Fig.11 The computer-readable storage medium 50 stores program data 51 that can be run by a processor, and the program data 51 can be executed by the processor to implement the steps of any embodiment of the above passenger flow data statistics method.
[0142] The computer-readable storage medium 50 of this embodiment can be a medium that can store program data 51, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or it can also be a server that stores the program data 51. The server can send the stored program data 51 to other devices for execution, or it can also execute the stored program data 51 by itself.
[0143] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0144] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0145] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0146] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium, which is a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for an electronic device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of each implementation method of the present application.
[0147] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a computer-readable storage medium and executed by a computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.
[0148] The above descriptions are merely embodiments of the present application and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A passenger flow data statistics method, characterized in that: The method comprises: Acquire trajectory information of a target object in an associated area of the target area; wherein the associated area has an associated relationship with the target area, and the target object enters or leaves the target area through the associated area; and Acquire the temporal correlation of multiple target objects in the correlation area; Utilizing the time correlation of each target object in the correlation region, selecting the target objects satisfying the time correlation condition as the objects to be counted in each batch; For each batch of objects to be counted, obtaining a first trajectory similarity between trajectory information of the objects to be counted in the batch, selecting objects to be counted whose first trajectory similarity satisfies a first trajectory association condition, and determining them as initial objects in the same batch; Performing passenger flow statistics on the initial same batch objects in each travel direction of the associated area respectively, and obtaining initial passenger flow batch data corresponding to each travel direction of the associated area as the initial passenger flow batch data of the associated area; Acquire initial passenger flow batch data of the target area; wherein the initial passenger flow batch data of the target area is determined by using trajectory information and / or posture information of each target object in the target area; The target passenger flow batch data of the target area is determined by combining the initial passenger flow batch data of the associated area and the initial passenger flow batch data of the target area.
2. The method according to claim 1, characterized in that The acquiring of the temporal correlation of the plurality of target objects in the correlation area comprises: Using the trajectory information of each target object in the associated area, obtaining the time information of each target object passing through a preset boundary in the associated area; The preset statistical value between the time information of the multiple target objects is obtained to obtain the time correlation between the multiple target objects.
3. The method according to claim 2, characterized in that The associated area includes a first area and a second area divided by the preset boundary; and using the trajectory information of each target object in the associated area to obtain the time information of each target object passing through the preset boundary in the associated area includes: For each target object, using the trajectory information of the target object in the associated area, determine the intersection position of the walking trajectory of the target object and the preset boundary, and obtain the time information and the moving direction of the target object at the intersection position; the moving direction includes at least one of entering the second area from the first area and entering the first area from the second area; The time information and the travel direction of the intersection position are used as the time information of the target object passing through the preset boundary in the travel direction.
4. The method according to claim 1, characterized in that: The step of utilizing the time correlation of the target objects in the correlation region to select target objects that meet the time correlation condition as the objects to be counted in each batch includes: Determine whether the time correlation of each target object in the correlation area meets a time correlation condition; wherein the time correlation condition includes: the time correlation is less than a preset time threshold; In response to the time correlation of the trajectory information satisfying the time correlation condition, the objects to be counted in each batch are obtained based on each target object satisfying the time correlation condition.
5. The method according to claim 1, characterized in that After performing passenger flow statistics on the initial same batch objects in each traveling direction of the associated area respectively to obtain the initial passenger flow batch data corresponding to each traveling direction of the associated area, the method includes: The initial passenger flow batch data corresponding to each travel direction in the associated area are comprehensively analyzed to perform passenger flow statistics, and the target passenger flow batch data in the target area is determined.
6. The method according to claim 5, characterized in that The comprehensive initial passenger flow batch data corresponding to each travel direction of the associated area is used to perform passenger flow statistics to determine the target passenger flow batch data in the target area, including: The initial passenger flow batch data corresponding to each travel direction of the associated area are integrated to obtain the same batch information of each target object; Determine whether the same batch information of each target object meets the first same batch condition; In response to meeting the first same-batch condition, determining each target object that meets the first same-batch condition in the initial passenger flow batch data as a target same-batch object; Passenger flow statistics are performed based on the target objects in the same batch to obtain target passenger flow batch data in the target area.
7. The method according to claim 1, characterized in that The step of integrating the initial passenger flow batch data of the associated area and the initial passenger flow batch data of the target area to determine the target passenger flow batch data of the target area includes: In response to the same batch information of the target object in the associated area not meeting the first same batch condition, determining whether the target object meets the second same batch condition in the initial passenger flow batch data of the target area; In response to meeting the second same batch condition, determining each target object meeting the second same batch condition in the initial passenger flow batch data as a target same batch object; Passenger flow statistics are performed based on the target objects in the same batch to obtain target passenger flow batch data in the target area.
8. The method according to claim 1, characterized in that The obtaining of the initial passenger flow batch data of the target area includes: Acquire a second trajectory similarity between trajectory information of each target object in the target area; Determining whether the similarities of each of the second trajectories satisfy a second trajectory association condition; In response to the second trajectory similarity satisfying a second trajectory association condition, determining the target object satisfying the second trajectory association condition as an initial same batch object; Passenger flow statistics are performed based on the initial objects in the same batch to obtain initial passenger flow batch data in the target area.
9. The method according to claim 8, characterized in that Before determining whether the similarities of the second trajectories satisfy the second trajectory association condition, the method includes: Acquire posture information of each target object in the target area; Determine whether the posture information of each target object meets the interactive association condition: In response to the posture information satisfying the interactive association condition, determining the target object satisfying the interactive association condition as the initial same batch object; or, In response to the posture information not satisfying the interactive association condition, the step of determining whether the similarities of each of the second trajectories satisfy the second trajectory association condition is performed.
10. A computer device, characterized in that: The invention comprises a memory and a processor coupled to each other, wherein the memory stores program data, and the processor is used to execute the program data to implement the steps of the method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: Program data that can be executed by a processor are stored, and the program data is used to implement the steps of the method according to any one of claims 1 to 9.
