A method, apparatus, storage medium, and electronic device for human body clustering.
By determining the checkpoint associations in human body clustering and performing multiple clustering threshold processing, the problem of low accuracy in human body clustering was solved, achieving higher accuracy and recall, and outlier data was removed, thus improving the overall clustering effect.
Patent Information
- Application Number
- CN202111358888.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-17
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2041-11-17
AI Technical Summary
Existing human clustering technologies struggle to improve accuracy, especially since it is difficult to distinguish between the same person wearing different clothes at different times or people wearing the same clothes, leading to inaccurate clustering results.
By acquiring human body capture data and historical human body archive data in a specified area within a set time period, the correlation between checkpoints is determined, adjacent checkpoint pairs are divided, and human body clustering is performed using multiple clustering thresholds to remove abnormal data and improve clustering accuracy.
It improves the accuracy and recall of human clustering, reduces the amount of computation, and removes abnormal data through in-file inspection, further improving the accuracy of clustering.
Smart Images

Figure CN114155548B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of human image clustering technology, and in particular to a human body clustering method, apparatus, storage medium and electronic device. Background Technology
[0002] With the continuous advancement of facial clustering technology, human body clustering technology has become an important component of facial clustering. Traditional facial clustering technologies are generally based on face recognition, clustering faces based on facial images to form facial trajectories. However, trajectories formed from captured human body images can complete and improve facial trajectories, better reconstructing the true trajectory of individuals, facilitating identification and tracking, and assisting in crime solving. Most existing human body clustering technologies are based on deep learning, extracting human features from captured images and directly clustering them.
[0003] However, human characteristics are mostly related to clothing and pants. The same person can change clothes multiple times a day, and different people will wear similar clothes. Therefore, how to effectively improve the results of human clustering is an urgent problem to be solved. Summary of the Invention
[0004] To address the existing technical problems, embodiments of this application provide a human body clustering method, apparatus, storage medium, and electronic device, which can improve the accuracy of human body clustering.
[0005] To achieve the above objectives, the technical solution of this application embodiment is implemented as follows:
[0006] In a first aspect, embodiments of this application provide a human body clustering method, the method comprising:
[0007] Acquire human body capture data and historical human body profile data within a specified area corresponding to a set time period; the human body capture data and the historical human body profile data are obtained from multiple checkpoints within the specified area.
[0008] The association between the multiple checkpoints is determined based on the historical human body file data, and adjacent checkpoint pairs are determined from the multiple checkpoints based on the association, wherein the association between the checkpoints in the adjacent checkpoint pairs meets the set conditions.
[0009] The set time period is divided into multiple sub-time periods according to a preset time threshold;
[0010] The human body capture data is clustered multiple times based on multiple adjacent checkpoint pairs and multiple sub-time periods to obtain human body profile data within the set time period; the clustering threshold is different for each clustering, and each subsequent clustering is based on the previous clustering.
[0011] The human body clustering method provided in this application can acquire human body capture data and historical human body profile data within a specified area corresponding to a set time period. Both the human body capture data and the historical human body profile data are obtained from multiple checkpoints within the specified area. The correlation between multiple checkpoints is determined based on the historical human body profile data, and neighboring checkpoint pairs are identified from the multiple checkpoints based on the correlation meeting set conditions. The set time period can be divided into multiple sub-time periods according to a preset time threshold. Multiple clustering operations are performed on the human body capture data based on multiple neighboring checkpoint pairs and multiple sub-time periods to obtain human body profile data within the set time period. The clustering threshold is different for each clustering operation, and each subsequent clustering operation is based on the previous one. Since the correlation between checkpoints can be used to determine two checkpoints with strong correlation as neighboring checkpoint pairs, and multi-stage clustering of the human body capture data is performed based on neighboring checkpoint pairs and multiple time periods, the accuracy and recall rate of human body clustering can be improved.
[0012] In one optional embodiment, determining adjacent checkpoint pairs from the plurality of checkpoints based on the association relationship includes:
[0013] If the relationship between two checkpoints among the plurality of checkpoints meets the set conditions, then the two checkpoints are determined to be an adjacent checkpoint pair;
[0014] The set conditions include some or all of the following:
[0015] The straight-line distance between the two checkpoints is less than a set distance threshold.
[0016] The median of the capture time difference sequence of the two checkpoints is less than the first time threshold; wherein the capture time difference sequence includes multiple capture time differences, and the capture time difference is the time difference between the capture times of the same historical human file data captured by the two checkpoints;
[0017] Within a preset time period, the number of times the two checkpoints capture the same historical human profile data exceeds a set capture number threshold.
[0018] After one of the two checkpoints captures historical human profile data, the probability that the other checkpoint captures the same historical human profile data is greater than a set probability threshold.
[0019] In this embodiment, if the correlation between two checkpoints among multiple checkpoints meets some or all of the following preset conditions: 1. The straight-line distance between the two checkpoints is less than a preset distance threshold; 2. The median of the capture time difference sequence of the two checkpoints is less than a first time threshold; wherein, the capture time difference sequence includes multiple capture time differences, which are the time differences between the capture times of the same historical human profile data captured by the two checkpoints; 3. The number of times the two checkpoints capture the same historical human profile data within a preset time is greater than a preset capture number threshold; 4. After one checkpoint captures historical human profile data, the probability that the other checkpoint captures the same historical human profile data is greater than a preset probability threshold, then the two checkpoints can be determined as a pair of adjacent checkpoints. Since two checkpoints with a strong correlation can be found as adjacent checkpoint pairs by setting a distance threshold between checkpoints, a time threshold for consecutive passage through two checkpoints, a number threshold, and a probability threshold, and human body clustering can be performed on the human body capture data captured by the adjacent checkpoint pairs, the recall rate can be improved while ensuring accuracy.
[0020] In one optional embodiment, the step of performing multiple clustering operations on the human body capture data based on multiple adjacent checkpoint pairs and multiple sub-time periods to obtain human body profile data within the set time period includes:
[0021] The human body capture data captured by each neighboring checkpoint pair within each sub-time period are clustered according to the first clustering threshold to obtain the first human body clustering result; the first clustering threshold is determined based on the preset time threshold corresponding to the sub-time period and the correlation between the neighboring checkpoint pairs;
[0022] The first human body clustering results within each sub-time period are clustered according to the second clustering threshold to obtain the second human body clustering results; the second clustering threshold is greater than the first clustering threshold; the second clustering threshold is determined according to the preset time threshold corresponding to the sub-time period;
[0023] The second human body clustering results are clustered according to a third clustering threshold to obtain human body profile data within the set time period; the third clustering threshold is greater than the second clustering threshold; the third clustering threshold is determined based on the set time period.
[0024] In this embodiment, the human body capture data captured by each neighboring checkpoint pair within each sub-time period can first be clustered according to a first clustering threshold to obtain a first human body clustering result. The first clustering threshold is determined based on a preset time threshold corresponding to the sub-time period and the correlation between neighboring checkpoint pairs. Then, the first human body clustering result within each sub-time period is clustered according to a second clustering threshold to obtain a second human body clustering result. The second clustering threshold is greater than the first clustering threshold and is determined based on a preset time threshold corresponding to the sub-time period. Finally, the second human body clustering result is clustered according to a third clustering threshold to obtain human body profile data within a set time period. The third clustering threshold is greater than the second clustering threshold and is determined based on the set time period. Since multi-stage human body clustering can be performed based on neighboring checkpoint pairs and time slices, human body capture data with strong correlations can be included in the clustering as much as possible, thereby reducing computational load while ensuring the recall rate of human body clustering.
[0025] In an optional embodiment, after obtaining the human body profile data within the set time period, the method further includes:
[0026] Remove non-pedestrian human body capture data from the aforementioned human body profile data;
[0027] Based on the removed human profile data, the capture time difference for each adjacent checkpoint is determined; the capture time difference is the time difference between the capture times of the same human profile data captured by the adjacent checkpoints.
[0028] If the capture time difference is less than the abnormal capture time threshold, the human profile data corresponding to the capture time difference is determined to be an abnormal profile, and the abnormal profile is removed from the removed human profile data.
[0029] In this embodiment, after multiple clustering operations on human body capture data within a set time period to obtain human body profile data, non-pedestrian human body capture data can be removed from the human body profile data. Based on the removed human body profile data, the capture time difference corresponding to each adjacent checkpoint pair is determined. The capture time difference is the time difference between the capture times of the same human body profile data captured by adjacent checkpoint pairs. If the capture time difference is less than an abnormal capture time threshold, the human body profile data corresponding to the capture time difference is determined to be an abnormal profile, and the abnormal profile is removed from the removed human body profile data. Since the abnormal human body profile data corresponding to the abnormal capture time difference can be found based on the capture time difference of adjacent checkpoint pairs, and this abnormal human body profile data can be removed from the human body profile data after removing non-pedestrian human body capture data, the accuracy of human body clustering can be further improved.
[0030] In one optional embodiment, the abnormal capture time threshold is determined in the following way:
[0031] Based on the capture time difference, determine the capture time difference sequence for each adjacent checkpoint pair, and determine the median of the capture time difference sequence;
[0032] If the median of the capture time difference sequence is greater than the second set time threshold, then the abnormal capture time threshold is determined based on the upper quartile and the lower quartile of the capture time difference sequence.
[0033] In this embodiment, the capture time difference sequence for each adjacent checkpoint pair can be determined based on the capture time difference, and the median of the capture time difference sequence can be determined. If the median of the capture time difference sequence is greater than a second preset time threshold, an abnormal capture time threshold is determined based on the upper quartile and lower quartile of the capture time difference sequence. Since the abnormal capture time threshold can be determined by utilizing the capture time difference sequence of adjacent checkpoint pairs and based on the upper and lower quartiles of the capture time difference sequence, abnormal capture time differences of adjacent checkpoint pairs can be found based on the abnormal capture time threshold, and the abnormal human profile data corresponding to the abnormal capture time differences can be determined, effectively improving the accuracy of human clustering.
[0034] Secondly, embodiments of this application also provide a human body clustering device, comprising:
[0035] The data acquisition unit is used to acquire human body capture data and historical human body file data within a specified area corresponding to a set time period; the human body capture data and the historical human body file data are obtained by capturing images from multiple checkpoints within the specified area;
[0036] The checkpoint pair determination unit is used to determine the association relationship between the multiple checkpoints based on the historical human body file data, and to determine the adjacent checkpoint pairs from the multiple checkpoints based on the association relationship, wherein the association relationship between the checkpoints in the adjacent checkpoint pairs satisfies the set conditions.
[0037] The time period segmentation unit is used to segment the set time period according to a preset time threshold to obtain multiple sub-time periods;
[0038] The data clustering unit is used to perform multiple clusterings on the human body capture data based on multiple adjacent checkpoint pairs and multiple sub-time periods to obtain human body profile data within the set time period; the clustering threshold is different for each clustering in the multiple clusterings, and the subsequent clustering is based on the previous clustering.
[0039] In one optional embodiment, the checkpoint pair determination unit is specifically used for:
[0040] If the relationship between two checkpoints among the plurality of checkpoints meets the set conditions, then the two checkpoints are determined to be an adjacent checkpoint pair;
[0041] The set conditions include some or all of the following:
[0042] The straight-line distance between the two checkpoints is less than a set distance threshold.
[0043] The median of the capture time difference sequence of the two checkpoints is less than the first time threshold; wherein the capture time difference sequence includes multiple capture time differences, and the capture time difference is the time difference between the capture times of the same historical human file data captured by the two checkpoints;
[0044] Within a preset time period, the number of times the two checkpoints capture the same historical human profile data exceeds a set capture number threshold.
[0045] After one of the two checkpoints captures historical human profile data, the probability that the other checkpoint captures the same historical human profile data is greater than a set probability threshold.
[0046] In one optional embodiment, the data clustering unit is specifically used for:
[0047] The human body capture data captured by each neighboring checkpoint pair within each sub-time period are clustered according to the first clustering threshold to obtain the first human body clustering result; the first clustering threshold is determined based on the preset time threshold corresponding to the sub-time period and the correlation between the neighboring checkpoint pairs;
[0048] The first human body clustering results within each sub-time period are clustered according to the second clustering threshold to obtain the second human body clustering results; the second clustering threshold is greater than the first clustering threshold; the second clustering threshold is determined according to the preset time threshold corresponding to the sub-time period;
[0049] The second human body clustering results are clustered according to a third clustering threshold to obtain human body profile data within the set time period; the third clustering threshold is greater than the second clustering threshold; the third clustering threshold is determined based on the set time period.
[0050] In an optional embodiment, the apparatus further includes a file removal unit for:
[0051] Remove non-pedestrian human body capture data from the aforementioned human body profile data;
[0052] Based on the removed human profile data, the capture time difference for each adjacent checkpoint is determined; the capture time difference is the time difference between the capture times of the same human profile data captured by the adjacent checkpoints.
[0053] If the capture time difference is less than the abnormal capture time threshold, the human profile data corresponding to the capture time difference is determined to be an abnormal profile, and the abnormal profile is removed from the removed human profile data.
[0054] In an optional embodiment, the file removal unit is further configured to:
[0055] Based on the capture time difference, determine the capture time difference sequence for each adjacent checkpoint pair, and determine the median of the capture time difference sequence;
[0056] If the median of the capture time difference sequence is greater than the second set time threshold, then the abnormal capture time threshold is determined based on the upper quartile and the lower quartile of the capture time difference sequence.
[0057] Thirdly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the human clustering method of the first aspect.
[0058] Fourthly, embodiments of this application also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, the processor enables the processor to implement the human clustering method of the first aspect.
[0059] The technical effects of any of the implementation methods in the second to fourth aspects can be found in the technical effects of the corresponding implementation methods in the first aspect, and will not be repeated here. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1 A flowchart of a human body clustering method provided in an embodiment of this application;
[0062] Figure 2 This is a schematic diagram of the structure of a human body clustering device provided in an embodiment of this application;
[0063] Figure 3 This is a schematic diagram of another human body clustering device provided in an embodiment of this application;
[0064] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0066] It should be noted that the terms "comprising" and "having" and their variations used in this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.
[0067] The technical solutions provided in the embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0068] This application provides a method for human body clustering, such as... Figure 1 As shown, it includes the following steps:
[0069] Step S101: Obtain human body capture data and historical human body file data within a specified area corresponding to a set time period.
[0070] The human body capture data and historical human body file data are obtained by capturing images from multiple checkpoints within a designated area.
[0071] The acquired human body capture data can be all human body capture data within a specified area corresponding to a set time period. For example, the human body capture data can be all human body capture data within a specified area on a given day. The acquired historical human body profile data can be historical human body profile data within a specified area. For example, the historical human body profile data can be human body profile data within a specified area for the previous N days. Furthermore, the historical human body profile data can be obtained by performing traditional clustering on all human body capture data from the previous N days within the specified area.
[0072] Step S102: Determine the relationship between multiple checkpoints based on historical human body data, and determine adjacent checkpoint pairs from the multiple checkpoints based on the relationship.
[0073] Based on historical anatomy data, the relationships between multiple checkpoints can be determined. When the relationship between two checkpoints meets certain predefined conditions, these two checkpoints are identified as a pair of adjacent checkpoints. These predefined conditions may include some or all of the following:
[0074] Condition 1: The straight-line distance between the two checkpoints is less than a set distance threshold;
[0075] Condition 2: The median of the capture time difference sequence of the two checkpoints is less than the first time threshold; where the capture time difference sequence includes multiple capture time differences, and the capture time difference is the time difference between the capture time of the same historical human file data captured by the two checkpoints.
[0076] Condition 3: The number of times two checkpoints capture the same historical human profile data within a preset time period exceeds the set capture number threshold.
[0077] Condition 4: After one of the two checkpoints captures historical human profile data, the probability that the other checkpoint captures the same historical human profile data is greater than a set probability threshold.
[0078] Specifically, after obtaining historical human profile data for the past N days within a specified area, the human capture data in each historical human profile can be sorted according to the capture time to obtain the human capture trajectory corresponding to each historical human profile. For example, the human capture trajectory corresponding to historical human profile data D can be expressed as follows:
[0079]
[0080] Where n represents the total number of times historical human profile data D was captured within the specified area over the past N days, and C i For the historical human body archive data D, the checkpoint where the i-th image was captured, T i Let GX be the capture time of the i-th snapshot in the historical human body archive data D. i and GY i For checkpoint C i The latitude and longitude information, i = 1, 2, ..., n.
[0081] Based on the human body capture trajectory corresponding to each historical human body file, all checkpoint capture sequence pairs can be found. For example, the checkpoint capture sequence pairs in historical human body file data D can be (C1, C2), (C2, C3), ..., (C n-1 C n When the two checkpoints in the checkpoint capture relationship are different, that is, when C i-1 ! = C i At that time, you can remember these two checkpoints (C) i-1C i ) is a human body capture checkpoint relationship pair for historical human body archive data D, and all human body capture checkpoint relationship pairs for historical human body archive data are recorded in sequence.
[0082] Based on the latitude and longitude information of the checkpoints, the straight-line distance between the two checkpoints in each human body capture checkpoint pair can be determined. For example, in a human body capture checkpoint pair (C1, C2) of historical human body file data D, the straight-line distance between checkpoints C1 and C2 is d. 12 If d 12 If the distance is less than or equal to d, then the association between checkpoint C1 and checkpoint C2 satisfies the first condition. Here, d is a set distance threshold; in this embodiment, d is typically set to 500 meters.
[0083] The capture time difference for each human body capture checkpoint pair in each historical human body file is determined. For example, in a human body capture checkpoint pair (C1, C2) of historical human body file data D, the capture time difference between checkpoints C1 and C2 is T2 - T1. Simultaneously, the capture time differences for the same human body capture checkpoint pairs (C1, C2) in all historical human body file data are recorded, forming a sequence of capture time differences for each human body capture checkpoint pair. The median of the sequence of capture time differences for each human body capture checkpoint pair in all historical human body file data is then determined. For example, the median of the sequence of capture time differences for human body capture checkpoint pairs (C1, C2) is t. 12 If t 12 If the time threshold is ≤ t, then the association between checkpoint C1 and checkpoint C2 satisfies the second condition. Here, t is the first time threshold; in this embodiment, t can generally be set to 5 minutes.
[0084] The capture count for each human body capture checkpoint relationship pair in all historical human body file data is determined. For example, the capture count s1 of checkpoint C1 and checkpoint C2 in a human body capture checkpoint relationship pair (C1, C2) of historical human body file data D is determined. Simultaneously, the capture count of the same human body capture checkpoint relationship pair (C1, C2) in all historical human body file data is recorded. For example, if the capture count of the human body capture checkpoint relationship pair (C1, C2) is s2, and s2 ≥ s, then the association relationship between checkpoint C1 and checkpoint C2 satisfies the set condition three. Here, s is a set capture count threshold; in this embodiment, s can generally be set to 25 times.
[0085] Calculate the probability that all historical human profile data, after being captured at each checkpoint, will be captured at the next checkpoint. For example, if a historical human profile is captured at checkpoint C1, the next checkpoint to be captured can only be C1. j Ck C l Among them, there are s j Second checkpoint C j Candid shot, s k Second checkpoint C k Candid shot, s l Second checkpoint C l If a snapshot is taken, all historical human profile data will be captured by checkpoint C1 and then transferred to checkpoint C. j Capture, specifically the relationship between human body capture camera positions (C1, C...) j The probability of ) is P(C) j / C1)=s j / (s j +s k +s l If P(C) j If / C1)>p, then the relationship between checkpoint C1 and checkpoint C can be determined. j The correlation between them satisfies condition four. Here, p is a set probability threshold; in this embodiment, p can generally be set to 0.1.
[0086] Step S103: Divide the set time period into multiple sub-time periods according to a preset time threshold.
[0087] After identifying all adjacent checkpoint pairs within a designated area based on historical human data, the set time period can be divided into multiple sub-time periods according to a preset time threshold. For example, if the set time period is 24 hours and the preset time threshold is 1 hour, then after dividing the set time period, 24 sub-time periods can be obtained, each sub-time period being 1 hour.
[0088] Step S104: Perform multiple clustering operations on the human body capture data based on multiple adjacent checkpoint pairs and multiple sub-time periods to obtain human body profile data within the set time period.
[0089] In this case, the clustering threshold is different for each clustering in multiple clustering, and each subsequent clustering is based on the previous clustering.
[0090] First, the captured human images from each neighboring checkpoint pair within each sub-time period can be clustered according to a first clustering threshold to obtain the first human body clustering result. Then, the first human body clustering result within each sub-time period is clustered according to a second clustering threshold to obtain the second human body clustering result. Finally, the second human body clustering result is clustered according to a third clustering threshold to obtain the human body profile data within the set time period. The first clustering threshold is less than the second clustering threshold, which is less than the third clustering threshold. The first clustering threshold can be determined based on a preset time threshold corresponding to the sub-time period and the correlation between neighboring checkpoint pairs; the second clustering threshold can be determined based on a preset time threshold corresponding to the sub-time period; and the third clustering threshold can be determined based on the set time period.
[0091] In one embodiment, after acquiring human body capture data within a designated area corresponding to a set time period, clustered face profile data and face-body association information can be obtained based on this data. Human body data associated with face profiles is used as the base data, while human body data not associated with face profiles is used as the data to be merged. When clustering the human body capture data within the designated area corresponding to the set time period, the data to be merged and the base data can be clustered together to obtain clustered human body profile data. Furthermore, during human body clustering, the human body data in the base data are not clustered together.
[0092] Optionally, after performing human clustering on the human body capture data within a specified area corresponding to a set time period to obtain human body profile data, an in-file inspection can also be performed on the human body profile data.
[0093] Specifically, non-pedestrian human capture data can be removed from the human profile data first. This non-pedestrian human capture data could be, for example, human capture data of people riding bicycles. Then, based on the removed human profile data, the capture time difference sequence for each pair of adjacent checkpoints can be determined, and the median of the capture time difference sequence for each pair of adjacent checkpoints can be determined. If the median of the capture time difference sequence for an adjacent checkpoint pair is less than a second preset time threshold, it can be considered that the straight-line distance between the two checkpoints in the adjacent checkpoint pair is less than the capture distance between each checkpoint and the captured human data, indicating that simultaneous capture is possible, and the human profile data captured by the adjacent checkpoint pair can be retained. In this embodiment, the second preset time threshold can generally be set to 10 seconds.
[0094] If the median of the capture time difference sequence of adjacent checkpoint pairs is greater than the second preset time threshold, then the upper quartile Q1 and lower quartile Q3 of the capture time difference sequence of the adjacent checkpoint pairs are determined. Specifically, determining the upper quartile Q1 and lower quartile Q3 of the capture time difference sequence of the adjacent checkpoint pairs means arranging the capture time difference sequence of the adjacent checkpoint pairs in ascending order and dividing it into four equal parts. Each of the four parts contains 25% of the capture time difference. The middle quartile is the median of the capture time difference sequence, the quartile at the 25% position is the lower quartile Q3, and the quartile at the 75% position is the upper quartile Q1.
[0095] After determining the upper quartile Q1 and lower quartile Q3 of the capture time difference sequence of adjacent checkpoint pairs, an abnormal capture time threshold can be determined based on these upper quartile Q1 and lower quartile Q3. When the capture time difference of adjacent checkpoint pairs is less than the abnormal capture time threshold, the human profile data corresponding to that capture time difference can be determined as an abnormal profile, and the abnormal profile can be removed from the excluded human profile data. The abnormal capture time threshold can be obtained based on the principle of the box method, and the abnormal capture time threshold is 2.5*Q1 - 1.5*Q3.
[0096] When the time difference between the capture images of adjacent checkpoints is t i Satisfy t i When the value is less than 2.5*Q1-1.5*Q3, the capture time difference t between the adjacent checkpoints can be determined. i The two human images in the corresponding human profile data are human images with incorrect clustering, and the corresponding human profile data is an abnormal file. The abnormal file is removed from the human profile data after it has been removed.
[0097] For example, assuming the capture time difference sequence of a pair of adjacent checkpoints is 5s, 6s, 10s, 11s, 15s, 18s, 20s, 20s, 22s, 25s, then the median of this capture time difference sequence is (15s + 18s) / 2 = 16.5s. Assuming the second set time threshold is 10s, the median of this capture time difference sequence is greater than the second set time threshold. Therefore, the upper quartile Q1 of this capture time difference sequence can be determined to be 21s, and the lower quartile Q3 to be 8s. Based on the upper quartile Q1 and the lower quartile Q3, the abnormal capture time threshold can be determined to be 2.5 * Q1 - 1.5 * Q3 = 40.5s. Assuming the capture time difference t of a pair of adjacent checkpoints... i The time difference t is 22 seconds, which is less than the abnormal capture time threshold. Therefore, the capture time difference t can be determined. iThe corresponding human profile data is considered abnormal, and this abnormal data is removed from the human profile data after the previous data has been removed.
[0098] The human body clustering method provided in this application can determine the correlation between multiple checkpoints by utilizing the spatiotemporal relationships in historical human body record data. Two checkpoints with strong correlations (i.e., those satisfying set conditions) are designated as neighboring checkpoint pairs, and the human body capture data from these neighboring checkpoint pairs is pre-clustered. This improves the recall rate of human body clustering while maintaining accuracy. Furthermore, after obtaining human body record data through human body clustering, a method for in-file inspection of the human body record data is provided. This method uses the capture time difference sequence passing through neighboring checkpoint pairs and employs box-line analysis to find abnormal capture time differences, thereby identifying incorrectly clustered human body record data (i.e., abnormal records) and removing them from the human body record data, further improving the accuracy of human body clustering.
[0099] and Figure 1 The human body clustering method shown is based on the same inventive concept. This application also provides a human body clustering device. Since this device corresponds to the applicant's human body clustering method, and the principle by which this device solves the problem is similar to that of the method, the implementation of this device can refer to the implementation of the above method; repeated details will not be elaborated further.
[0100] Figure 2 This application provides a schematic diagram of the structure of a human body clustering device according to an embodiment of the present application. Figure 2 As shown, the human body clustering device includes a data acquisition unit 201, a checkpoint pair determination unit 202, a time period segmentation unit 203, and a data clustering unit 204.
[0101] The data acquisition unit 201 is used to acquire human body capture data and historical human body file data within a specified area corresponding to a set time period; the human body capture data and historical human body file data are obtained by capturing images from multiple checkpoints within the specified area.
[0102] The checkpoint pair determination unit 202 is used to determine the relationship between multiple checkpoints based on historical human body file data, and to determine adjacent checkpoint pairs from multiple checkpoints based on the relationship, wherein the relationship between checkpoints in adjacent checkpoint pairs meets the set conditions.
[0103] The time period segmentation unit 203 is used to segment a set time period according to a preset time threshold to obtain multiple sub-time periods;
[0104] Data clustering unit 204 is used to perform multiple clusterings on human body capture data based on multiple adjacent checkpoint pairs and multiple sub-time periods to obtain human body profile data within a set time period; the clustering threshold is different for each clustering in the multiple clusterings, and the subsequent clustering is based on the previous clustering.
[0105] In an optional embodiment, the checkpoint pair determination unit 202 is specifically used for:
[0106] If the association between two checkpoints among multiple checkpoints meets the set conditions, then the two checkpoints are determined to be an adjacent checkpoint pair;
[0107] The conditions set include some or all of the following:
[0108] The straight-line distance between the two checkpoints is less than a set distance threshold;
[0109] The median of the capture time difference sequence of the two checkpoints is less than the first time threshold; the capture time difference sequence includes multiple capture time differences, which are the time differences between the capture times of the same historical human file data captured by the two checkpoints;
[0110] The number of times two checkpoints capture the same historical human profile data within a preset time exceeds the set capture number threshold.
[0111] If one of the two checkpoints captures historical human profile data, the probability that the other checkpoint will capture the same historical human profile data is greater than a set probability threshold.
[0112] In an optional embodiment, the data clustering unit 204 is specifically used for:
[0113] The human body capture data captured by each neighboring checkpoint pair within each sub-time period are clustered according to the first clustering threshold to obtain the first human body clustering result; the first clustering threshold is determined based on the preset time threshold corresponding to the sub-time period and the correlation between neighboring checkpoint pairs;
[0114] The first human body clustering results within each sub-time period are clustered separately according to the second clustering threshold to obtain the second human body clustering results; the second clustering threshold is greater than the first clustering threshold; the second clustering threshold is determined according to the preset time threshold corresponding to the sub-time period;
[0115] The second human body clustering results are clustered based on the third clustering threshold to obtain human body profile data within a set time period; the third clustering threshold is greater than the second clustering threshold; the third clustering threshold is determined based on the set time period.
[0116] In one alternative embodiment, such as Figure 3 As shown, the above-mentioned device may further include a file rejection unit 301, used for:
[0117] Remove non-pedestrian human body capture data from the human body profile data;
[0118] Based on the removed human profile data, the capture time difference for each adjacent checkpoint is determined; the capture time difference is the time difference between the capture times of adjacent checkpoints capturing the same human profile data.
[0119] If the capture time difference is less than the abnormal capture time threshold, the human profile data corresponding to the capture time difference is determined to be an abnormal profile, and the abnormal profile is removed from the human profile data after the removal process.
[0120] In an optional embodiment, the file removal unit 301 is further configured to:
[0121] Based on the capture time difference, determine the capture time difference sequence for each adjacent checkpoint pair, and determine the median of the capture time difference sequence;
[0122] If the median of the capture time difference sequence is greater than the second set time threshold, then the abnormal capture time threshold is determined based on the upper quartile and the lower quartile of the capture time difference sequence.
[0123] Based on the same inventive concept as the above-described method embodiments, this application also provides an electronic device. This electronic device can be used to perform human clustering on acquired human body capture data. In one embodiment, the electronic device can be a server, a terminal device, or other electronic equipment. In this embodiment, the structure of the electronic device can be as follows... Figure 4 As shown, it includes a memory 401, a communication module 403, and one or more processors 402.
[0124] The memory 401 is used to store computer programs executed by the processor 402. The memory 401 may mainly include a program storage area and a data storage area. The program storage area may store the operating system and programs required to run instant messaging functions, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0125] Memory 401 may be volatile memory, such as random-access memory (RAM); memory 401 may also be non-volatile memory, such as read-only memory, flash memory, hard disk drive (HDD), or solid-state drive (SSD); or memory 401 may be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. Memory 401 may be a combination of the above-described memories.
[0126] Processor 402 may include one or more central processing units (CPUs) or digital processing units, etc. Processor 402 is used to implement the above-mentioned human clustering method when calling the computer program stored in memory 401.
[0127] The communication module 403 is used to communicate with terminal devices and other servers.
[0128] This application does not limit the specific connection medium between the memory 401, communication module 403, and processor 402 described above. This disclosure embodiment... Figure 4 The memory 401 and the processor 402 are connected via a bus 404, and the bus 404 is in Figure 4 The connections between other components are shown in thick lines only and are not intended to be limiting. The 404 bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0129] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the human clustering method described in the above embodiments.
[0130] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0131] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A human body clustering method, characterized in that, include: Acquire human body capture data and historical human body profile data within a specified area corresponding to a set time period; The human body capture data and the historical human body file data are obtained by capturing images from multiple checkpoints within the designated area; The association between the multiple checkpoints is determined based on the historical human body file data, and adjacent checkpoint pairs are determined from the multiple checkpoints based on the association, wherein the association between the checkpoints in the adjacent checkpoint pairs meets the set conditions. The set time period is divided into multiple sub-time periods according to a preset time threshold; The human body capture data captured by each neighboring checkpoint pair within each sub-time period are clustered according to the first clustering threshold to obtain the first human body clustering result; the first clustering threshold is determined based on the preset time threshold corresponding to the sub-time period and the correlation between the neighboring checkpoint pairs; The first human body clustering results within each sub-time period are clustered according to the second clustering threshold to obtain the second human body clustering results; the second clustering threshold is greater than the first clustering threshold; The second clustering threshold is determined based on a preset time threshold corresponding to the sub-time period; The second human body clustering results are clustered according to a third clustering threshold to obtain human body profile data within the set time period; the third clustering threshold is greater than the second clustering threshold; the third clustering threshold is determined based on the set time period.
2. The method as described in claim 1, characterized in that, The step of determining adjacent checkpoint pairs from the plurality of checkpoints based on the association relationship includes: If the relationship between two checkpoints among the plurality of checkpoints meets the set conditions, then the two checkpoints are determined to be an adjacent checkpoint pair; The set conditions include some or all of the following: The straight-line distance between the two checkpoints is less than a set distance threshold. The median of the capture time difference sequence of the two checkpoints is less than the first time threshold; wherein the capture time difference sequence includes multiple capture time differences, and the capture time difference is the time difference between the capture times of the same historical human file data captured by the two checkpoints; Within a preset time period, the number of times the two checkpoints capture the same historical human profile data exceeds a set capture number threshold. After one of the two checkpoints captures historical human profile data, the probability that the other checkpoint captures the same historical human profile data is greater than a set probability threshold.
3. The method as described in any one of claims 1 to 2, characterized in that, After obtaining the human body profile data within the specified time period, the method further includes: Remove non-pedestrian human body capture data from the aforementioned human body profile data; Based on the removed human profile data, the capture time difference for each adjacent checkpoint is determined; the capture time difference is the time difference between the capture times of the same human profile data captured by the adjacent checkpoints. If the capture time difference is less than the abnormal capture time threshold, the human profile data corresponding to the capture time difference is determined to be an abnormal profile, and the abnormal profile is removed from the removed human profile data.
4. The method as described in claim 3, characterized in that, The abnormal capture time threshold is determined in the following way: Based on the capture time difference, determine the capture time difference sequence for each adjacent checkpoint pair, and determine the median of the capture time difference sequence; If the median of the capture time difference sequence is greater than the second set time threshold, then the abnormal capture time threshold is determined based on the upper quartile and the lower quartile of the capture time difference sequence.
5. A human body clustering device, characterized in that, include: The data acquisition unit is used to acquire human body capture data and historical human body file data within a specified area corresponding to a set time period; The human body capture data and the historical human body file data are obtained by capturing images from multiple checkpoints within the designated area; The checkpoint pair determination unit is used to determine the association relationship between the multiple checkpoints based on the historical human body file data, and to determine the adjacent checkpoint pairs from the multiple checkpoints based on the association relationship, wherein the association relationship between the checkpoints in the adjacent checkpoint pairs satisfies the set conditions. The time period segmentation unit is used to segment the set time period according to a preset time threshold to obtain multiple sub-time periods; The data clustering unit is used to cluster the human body capture data captured by each adjacent checkpoint pair within each sub-time period according to a first clustering threshold, to obtain a first human body clustering result; the first clustering threshold is determined based on a preset time threshold corresponding to the sub-time period and the correlation between the adjacent checkpoint pairs; the first human body clustering result within each sub-time period is clustered according to a second clustering threshold, to obtain a second human body clustering result; the second clustering threshold is greater than the first clustering threshold; The second clustering threshold is determined based on a preset time threshold corresponding to the sub-time period; the second human body clustering result is clustered according to the third clustering threshold to obtain human body file data within the set time period; the third clustering threshold is greater than the second clustering threshold; the third clustering threshold is determined based on the set time period.
6. The apparatus as claimed in claim 5, characterized in that, The checkpoint pair determination unit is specifically used for: If the relationship between two checkpoints among the plurality of checkpoints meets the set conditions, then the two checkpoints are determined to be an adjacent checkpoint pair; The set conditions include some or all of the following: The straight-line distance between the two checkpoints is less than a set distance threshold. The median of the capture time difference sequence of the two checkpoints is less than the first time threshold; wherein the capture time difference sequence includes multiple capture time differences, and the capture time difference is the time difference between the capture times of the same historical human file data captured by the two checkpoints; Within a preset time period, the number of times the two checkpoints capture the same historical human profile data exceeds a set capture number threshold. After one of the two checkpoints captures historical human profile data, the probability that the other checkpoint captures the same historical human profile data is greater than a set probability threshold.
7. The apparatus as described in any one of claims 5 to 6, characterized in that, The device also includes a file removal unit for: Remove non-pedestrian human body capture data from the aforementioned human body profile data; Based on the removed human profile data, the capture time difference for each adjacent checkpoint is determined; the capture time difference is the time difference between the capture times of the same human profile data captured by the adjacent checkpoints. If the capture time difference is less than the abnormal capture time threshold, the human profile data corresponding to the capture time difference is determined to be an abnormal profile, and the abnormal profile is removed from the removed human profile data.
8. The apparatus as claimed in claim 7, characterized in that, The file removal unit is also used for: Based on the capture time difference, determine the capture time difference sequence for each adjacent checkpoint pair, and determine the median of the capture time difference sequence; If the median of the capture time difference sequence is greater than the second set time threshold, then the abnormal capture time threshold is determined based on the upper quartile and the lower quartile of the capture time difference sequence.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the method according to any one of claims 1 to 4.
10. An electronic device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, it implements the method of any one of claims 1 to 4.
Citation Information
Patent Citations
Vehicle driving path prediction method and storage medium
CN117308984A