A Pedestrian Re-identification Clustering Method and Device Based on Spatiotemporal Information

By combining feature extraction and spatiotemporal clustering algorithms based on neural networks with graph attention networks to update feature representations, the problem of insufficient utilization of spatiotemporal information in pedestrian re-identification is solved, achieving higher matching accuracy and robustness.

CN114677705BActive Publication Date: 2025-10-28WINNERYUN (SHANGHAI DATA SERVICE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210187046.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-28
Publication Date
2025-10-28
Estimated Expiration
2042-02-28

AI Technical Summary

Technical Problem

Existing technologies fail to effectively utilize spatiotemporal information in pedestrian re-identification, resulting in inaccurate feature clustering, especially when pedestrian trajectories are highly uncertain, leading to a large number of mismatched points.

Method used

We employ a neural network-based approach for feature extraction, combining Euclidean distance and density-based spatiotemporal clustering algorithms. We then utilize graph attention networks to update feature representations and perform feature clustering based on similarity judgment.

Benefits of technology

It improves the matching accuracy of pedestrian re-identification, reduces false matching points that do not conform to spatiotemporal logic, enhances node robustness, and achieves higher matching accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114677705B_ABST
    Figure CN114677705B_ABST
Patent Text Reader

Abstract

This invention provides a pedestrian re-identification clustering method and apparatus based on spatiotemporal information. The pedestrian re-identification clustering method includes: based on a set of pedestrian images to be identified, applying a neural network model to extract features and determine the feature representation of each pedestrian image; based on the feature representation of each pedestrian image, applying Euclidean distance calculation to perform similarity matching to determine a first feature cluster; based on the feature representation in the first feature cluster, applying a density-based spatiotemporal clustering algorithm to determine the core points that conform to the spatiotemporal clustering algorithm and the connecting edges between the core points; based on the core points and the connecting edges, applying a graph attention network to update the feature representation of the first feature cluster; and based on the updated feature representation of the first feature cluster and a preset feature threshold, performing similarity judgment to determine a second feature cluster. The pedestrian re-identification clustering method based on spatiotemporal information of this invention can improve matching accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of neural networks, and in particular to a pedestrian re-identification clustering method and apparatus based on spatiotemporal information. Background Technology

[0002] Currently, pedestrian re-identification technology mainly focuses on image matching, neglecting the spatial and temporal relationships generated by pedestrian movement within a region. To address this, some researchers use the spatiotemporal information of captured pedestrian images to model and statistically analyze the spatiotemporal distribution of all pedestrian trajectories in the training set. This yields a histogram of the time difference between two captured images of the same pedestrian between two cameras, serving as prior information. This histogram, along with feature similarity, is used to identify pedestrians. However, due to the significant uncertainty of pedestrian trajectories, directly defining pedestrian actions based on the spatiotemporal relationships of recreated pedestrians leads to an increasingly random spatiotemporal distribution, especially with a large number of locations. Furthermore, it excludes a minority of individuals whose behavior patterns do not conform to the probability of matching.

[0003] Therefore, how to consider spatiotemporal information and obtain more accurate feature clustering in pedestrian re-identification processing is an urgent problem to be solved. Summary of the Invention

[0004] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a pedestrian re-identification clustering method and apparatus based on spatiotemporal information, which solves the problem that the prior art fails to consider spatiotemporal information in pedestrian re-identification processing and obtain more accurate feature clustering.

[0005] To achieve the above and other related objectives, this invention provides a pedestrian re-identification clustering method based on spatiotemporal information, comprising the following steps: Based on a set of pedestrian images to be identified, a neural network model is applied to extract features and determine the feature representation of each pedestrian image; based on the feature representation of each pedestrian image, Euclidean distance is applied to perform similarity matching to determine a first feature cluster; based on the feature representation in the first feature cluster, a density-based spatiotemporal clustering algorithm is applied to determine the core points conforming to the spatiotemporal clustering algorithm and the connecting edges between the core points; based on the core points and the connecting edges, a graph attention network is applied to update the feature representation of the first feature cluster; based on the updated feature representation of the first feature cluster and a preset feature threshold, a similarity judgment is performed to determine a second feature cluster, wherein the second feature cluster represents the features of the same pedestrian.

[0006] In one embodiment of the present invention, the loss function of the neural network model includes a cross-entropy loss function and a triplet loss function.

[0007] In one embodiment of the present invention, the step of applying Euclidean distance calculation to perform similarity matching based on the feature representation of each pedestrian image to determine a first feature cluster includes: applying the Euclidean distance calculation formula to determine the similarity between every two feature representations based on the feature representation of each pedestrian image; when the similarity is greater than a first similarity threshold, determining that the two feature representations corresponding to the similarity belong to one category of the first feature cluster.

[0008] In one embodiment of the present invention, the step of applying a density-based spatiotemporal clustering algorithm based on the feature representation in the first feature cluster to determine the core points conforming to the spatiotemporal clustering algorithm and the connecting edges between the core points includes: applying the density-based spatiotemporal clustering algorithm based on the feature representation in the first feature cluster to determine the temporal distance matrix and spatial distance matrix corresponding to the feature representation; traversing each data point in the temporal distance matrix and each data point in the spatial distance matrix; when a first data point is within a preset temporal distance threshold range, a second data point is within a preset spatial distance threshold range, and the first data point and the second data point correspond to the same feature representation, recording the same feature representation and counting it; when the result of the counting is greater than a preset node threshold, determining the same feature representation corresponding to the count as a core point conforming to the spatiotemporal clustering algorithm; and connecting every two core points to form connecting edges between the core points.

[0009] In one embodiment of the present invention, the step of updating the feature representation of the first feature cluster based on the core point and the connecting edge using a graph attention network includes: constructing a clustering graph based on the core point and the connecting edge; determining the attention coefficient corresponding to the core point by applying the expression of the attention coefficient of the graph attention network based on the clustering graph; determining the attention weight corresponding to the connecting edge by performing nonlinear activation and exponential normalization processing of the linear correction unit with leakage based on the attention coefficient; multiplying the attention weight corresponding to the connecting edge by the weight of the graph attention network, and then performing exponential normalization on the connecting edge to update the feature representation corresponding to the core point; and updating the feature representation of the first feature cluster based on the feature representation corresponding to the core point.

[0010] In one embodiment of the present invention, the expression for the attention coefficient is:

[0011] e ij =concat(h i W,h j W)a,j∈N i

[0012] e ijHere, h represents the attention coefficient; i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; i h is the feature vector of the core point i, with dimensions [1, F]; j Let be the feature vector of core point j, with dimension [1, F]; W is the learnable parameter, with dimension [F, F′]; a is the learnable parameter, with dimension [2F′, 1]; F is an integer greater than 1, F′ is an integer greater than 1, and N is the total number of core points;

[0013] The expression for the attention weight is:

[0014]

[0015] a ij For attention weights; i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; LeakyReLU(e ij ) indicates the use of a linear correction unit with leakage for e ij Perform nonlinear activation processing; LeakyReLU(e ik ) indicates the use of a linear correction unit with leakage for e ik Perform nonlinear activation processing; exp(LeakyReLU(e ij )) represents the expression for LeakyReLU(e ij ) calculate the exponent; exp(LeakyReLU(e ik )) represents the expression for LeakyReLU(e ik The exponent is calculated; k represents the kth core point adjacent to the i-th core point; N is the total number of core points.

[0016] The expression for the feature representation is:

[0017]

[0018] h′ i For feature representation, i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; a ij For attention weights; W is a learnable parameter; h j σ represents the eigenvector of the core point j; σ denotes the exponential normalization operation.

[0019] In one embodiment of the present invention, after updating the first feature cluster, the method further includes: calculating the feature mean of the feature expressions in the updated first feature cluster; calculating the Euclidean distance between each feature mean and the feature expressions that do not conform to the spatiotemporal clustering algorithm to obtain a similarity set; obtaining the maximum similarity in the similarity set; and when the maximum similarity is greater than a second similarity threshold, adding the feature expression that does not conform to the spatiotemporal clustering algorithm corresponding to the maximum similarity to the second feature cluster.

[0020] Correspondingly, the present invention provides a pedestrian re-identification clustering device based on spatiotemporal information, comprising: a first processing module, configured to perform feature extraction using a neural network model based on a set of pedestrian images to be identified, and determine the feature representation of each pedestrian image; and to perform similarity matching using Euclidean distance calculation based on the feature representation of each pedestrian image to determine a first feature cluster; a second processing module, configured to determine core points conforming to the spatiotemporal clustering algorithm and the connecting edges between core points based on the feature representation in the first feature cluster; a first determining module, configured to update the feature representation of the first feature cluster using a graph attention network based on the core points and the connecting edges; and a second determining module, configured to perform similarity judgment based on the updated first feature cluster and a preset feature threshold to determine a second feature cluster, wherein the second feature cluster represents the features of the same pedestrian.

[0021] The present invention provides a storage medium on which a computer program is stored, which, when executed by a processor, implements the above-described pedestrian re-identification clustering method based on spatiotemporal information.

[0022] The present invention provides a pedestrian re-identification clustering system, including a memory for storing a computer program; and a processor for running the computer program to implement the above-described pedestrian re-identification clustering method based on spatiotemporal information.

[0023] As described above, the pedestrian re-identification clustering method and apparatus based on spatiotemporal information of the present invention have the following beneficial effects:

[0024] (1) By utilizing the spatiotemporal information corresponding to pedestrian images, the impact of mismatched points that do not conform to spatiotemporal logic is greatly reduced, thereby improving the accuracy of matching.

[0025] (2) The application of graph attention network can provide different morphological features of the same pedestrian during the capture to the original node, which greatly enriches the robustness of the node and achieves higher matching accuracy. Attached Figure Description

[0026] Figure 1The flowchart shown is an embodiment of the pedestrian re-identification clustering method based on spatiotemporal information of the present invention.

[0027] Figure 2 The diagram shown is a neural network model diagram of a pedestrian re-identification clustering method based on spatiotemporal information according to an embodiment of the present invention.

[0028] Figure 3 The diagram shows a stage diagram of a pedestrian re-identification clustering method based on spatiotemporal information according to an embodiment of the present invention.

[0029] Figure 4 The flowchart shown is a second feature clustering determination flowchart of the pedestrian re-identification clustering method based on spatiotemporal information of the present invention in one embodiment.

[0030] Figure 5 The diagram shown is a structural schematic of a pedestrian re-identification and clustering device based on spatiotemporal information according to an embodiment of the present invention.

[0031] Figure 6 The diagram shown is a pedestrian re-identification clustering system diagram in one embodiment of the spatiotemporal information-based pedestrian re-identification clustering device of the present invention.

[0032] Component designation explanation

[0033] 51 First Processing Module

[0034] 52 Second Processing Module

[0035] 53 First Determined Module

[0036] 54 Second Determination Module

[0037] 61 processor

[0038] 62 Memory Detailed Implementation

[0039] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that, unless otherwise specified, the following embodiments and features described therein can be combined with each other.

[0040] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the drawings only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.

[0041] The pedestrian re-identification clustering method and apparatus based on spatiotemporal information of the present invention can utilize the spatiotemporal information corresponding to pedestrian images, greatly reducing the impact of mismatched points that do not conform to spatiotemporal logic and improving matching accuracy. At the same time, the application of graph attention network can provide different morphological features of the same pedestrian at the time of capture to the original node, greatly enriching the robustness of the node and achieving higher matching accuracy.

[0042] like Figure 1 As shown, in this embodiment, the pedestrian re-identification clustering method based on spatiotemporal information of the present invention includes the following steps:

[0043] Step S1: Based on the set of pedestrian images to be identified, a neural network model is applied to extract features and determine the feature representation of each pedestrian image; based on the feature representation of each pedestrian image, Euclidean distance is applied to perform similarity matching to determine the first feature cluster.

[0044] Specifically, the loss function of the neural network model includes the cross-entropy loss function and the triplet loss function.

[0045] For example, such as Figure 2 As shown in this embodiment, the neural network model of the present invention is illustrated. The backbone network of the neural network model is a residual network, and the input is a three-channel color pedestrian image with a width of 128 and a height of 384. Further, the max-pooling stride of the last layer of the original residual network is set from 2 to 1 to ensure that the feature map and the feature map output by the previous layer have the same resolution, thereby preserving more detailed information of the pedestrian image. During model training, in addition to the general classification loss, i.e., cross-entropy loss, a triplet loss is added to the output of the hidden layer to narrow the intra-class distance and widen the inter-class distance. For example, if the input pedestrian image set contains multiple images of the same person and different people, images of the same person as the pedestrian image to be identified are used as positive samples, and images of different people are used as negative samples. The neural network model is trained, and the hidden layer features are output as the feature representations corresponding to the pedestrian images.

[0046] More specifically, based on the feature representation of each pedestrian image, the Euclidean distance calculation formula is applied to determine the similarity between every two feature representations; when the similarity is greater than a first similarity threshold, the two feature representations corresponding to the similarity are determined to belong to one class of the first feature cluster.

[0047] For example, if the first similarity threshold is 80, when the Euclidean distance calculation formula determines that the similarity between two feature expressions is greater than 80, it is considered that the two feature expressions correspond to the same pedestrian, and these two feature expressions are assigned to one of the first feature clusters, thus generating a preliminary cluster.

[0048] Step S2: Based on the feature representation in the first feature cluster, apply a density-based spatiotemporal clustering algorithm to determine the core points that conform to the spatiotemporal clustering algorithm and the connecting edges between the core points.

[0049] Specifically, based on the feature representations in the first feature cluster, the density-based spatiotemporal clustering algorithm is applied to determine the temporal distance matrix and spatial distance matrix corresponding to the feature representations; each data point in the temporal distance matrix and each data point in the spatial distance matrix are traversed; when the first data point is within a preset temporal distance threshold range, the second data point is within a preset spatial distance threshold range, and the first data point and the second data point correspond to the same feature representation, the same feature representation is recorded and counted; when the count result is greater than a preset node threshold, the same feature representation corresponding to the count is determined as a core point conforming to the spatiotemporal clustering algorithm; every two core points are connected to form a connection edge between the core points.

[0050] For example, the feature representations in the first feature cluster all correspond to records of the time when pedestrian images were captured and the location of the camera. Based on these records, the temporal distance matrix and spatial distance matrix corresponding to the feature representations are calculated. The temporal distance is the difference between the capture times of the two pedestrian images corresponding to the feature representation, in seconds. The spatial distance matrix is ​​the distance between the camera and the pedestrian when the pedestrian was captured. For example, the preset temporal distance threshold range is 5 meters, the spatial distance threshold range is 20 minutes, and the node threshold is 6. When the first data point in the temporal distance matrix is ​​within 5 meters, the second data point in the spatial distance matrix is ​​within 20 minutes, and the first and second data points correspond to the same feature representation, the same feature representation is recorded and counted. When the count result is greater than 6, all the same feature representations corresponding to the count are determined as core points that conform to the spatiotemporal clustering algorithm. Connecting every two core points forms a connection edge between the core points.

[0051] Step S3: Based on the core points and the connecting edges, apply a graph attention network to update the feature representation of the first feature cluster.

[0052] Specifically, a clustering graph is constructed based on the core points and the connecting edges; based on the clustering graph, the attention coefficients corresponding to the core points are determined by applying the expression of the attention coefficients of the graph attention network; based on the attention coefficients, nonlinear activation and exponential normalization of the linear correction unit with leakage are performed to determine the attention weights corresponding to the connecting edges; the attention weights corresponding to the connecting edges are multiplied by the weights of the graph attention network, and then the connecting edges are exponentially normalized to update the feature representation corresponding to the core points; based on the feature representation corresponding to the core points, the feature representation of the first feature cluster is updated.

[0053] The expression for the attention coefficient is as follows:

[0054] e ij =concat(h i W,h j W)a,j∈N i

[0055] e ij Here, h represents the attention coefficient; i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; i h is the feature vector of the core point i, with dimensions [1, F]; j Let be the feature vector of core point j, with dimension [1, F]; W is the learnable parameter, with dimension [F, F′]; a is the learnable parameter, with dimension [2F′, 1]; F is an integer greater than 1, F′ is an integer greater than 1, and N is the total number of core points;

[0056] The expression for the attention weight is:

[0057]

[0058] a ij For attention weights; i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; LeakyReLU(e ij ) indicates the use of a linear correction unit with leakage for e ij Perform nonlinear activation processing; LeakyReLU(e ik ) indicates the use of a linear correction unit with leakage for e ik Perform nonlinear activation processing; exp(LeakyReLU(e ij )) represents the expression for LeakyReLU(e ij ) calculate the exponent; exp(LeakyReLU(e ik )) represents the expression for LeakyReLU(e ikThe exponent is calculated; k represents the kth core point adjacent to the i-th core point; N is the total number of core points.

[0059] The expression for the feature representation is:

[0060]

[0061] h′ i For feature representation, i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; a ij For attention weights; W is a learnable parameter; h j σ represents the eigenvector of the core point j; σ denotes the exponential normalization operation.

[0062] By applying graph attention networks to process core points and connecting edges, more detailed information between core points can be conveyed in a graph structure, enabling core points to integrate information from other adjacent core points, thereby generating new and richer feature representations.

[0063] More specifically, to enhance the feature representation of the updated first feature cluster, multi-head attention can be introduced for feature representation, as shown in the expression:

[0064]

[0065] Where, h′ i For feature representation, i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; a ij For attention weights; W is a learnable parameter; h j Let be the feature vector of the core point j; σ represents the exponential normalization operation; K = 3 represents multi-head attention.

[0066] Step S4: Based on the updated feature representation of the first feature cluster and the preset feature threshold, perform similarity judgment to determine the second feature cluster, which represents the features of the same pedestrian.

[0067] Specifically, based on the updated feature representation of the first feature cluster, the Euclidean distance calculation formula is applied to determine the similarity between every two feature representations; when the similarity is greater than the feature threshold, the two feature representations corresponding to the similarity are determined to belong to the second feature cluster.

[0068] More specifically, after determining the feature representations corresponding to the core points in the above steps, the method further includes: calculating the feature mean of the feature representations in the updated first feature cluster; calculating the Euclidean distance between each feature mean and the feature representations that do not conform to the spatiotemporal clustering algorithm to obtain a similarity set; obtaining the maximum similarity in the similarity set; and when the maximum similarity is greater than a second similarity threshold, adding the feature representation that does not conform to the spatiotemporal clustering algorithm corresponding to the maximum similarity to the second feature cluster. For example, after determining the core points that conform to the spatiotemporal clustering algorithm in the above steps, the feature representations that do not conform to the spatiotemporal clustering algorithm are retained; after determining the feature representations corresponding to the core points based on the core points that conform to the spatiotemporal clustering algorithm, the feature mean of these feature representations is first calculated; the feature mean is calculated between each feature mean and the feature representations that do not conform to the spatiotemporal clustering algorithm to obtain a similarity set; the maximum similarity in the similarity set is obtained; and when the maximum similarity is greater than a second similarity threshold, adding the feature representation that does not conform to the spatiotemporal clustering algorithm corresponding to the maximum similarity to the second feature cluster.

[0069] like Figure 3 As shown in the diagram, in this embodiment, the phase diagram of the present invention shows that phase 1 corresponds to step S1 above, where a neural network model is used to extract features from the captured pedestrian images, and then the similarity of the features is calculated to generate a preliminary first feature cluster; phase 2 corresponds to steps S2-S4 above, where an attention network is applied to the core points in the first feature cluster to determine the corresponding feature representation, and then a similarity judgment is performed to determine a second feature cluster representing the same pedestrian features, such as... Figure 4 As shown in this embodiment, the flowchart for determining the second feature clustering of the present invention is as follows.

[0070] like Figure 5 As shown, in this embodiment, the pedestrian re-identification clustering device based on spatiotemporal information of the present invention includes:

[0071] The first processing module 51 is used to perform feature extraction based on the set of pedestrian images to be identified by applying a neural network model to determine the feature representation of each pedestrian image; and to perform similarity matching by applying Euclidean distance calculation based on the feature representation of each pedestrian image to determine the first feature cluster.

[0072] The second processing module 52 is used to determine the core points that conform to the spatiotemporal clustering algorithm and the connecting edges between the core points based on the feature expression in the first feature clustering and applying the density-based spatiotemporal clustering algorithm.

[0073] The first determining module 53 is used to update the feature representation of the first feature cluster based on the core point and the connecting edge by applying a graph attention network.

[0074] The second determining module 54 is used to perform similarity judgment based on the updated first feature cluster and the preset feature threshold, and determine the second feature cluster, which represents the features of the same pedestrian.

[0075] The technical features of the pedestrian re-identification clustering device based on spatiotemporal information in this embodiment are basically the same as the principles of each step in the pedestrian re-identification clustering method based on spatiotemporal information in Embodiment 1. The technical contents that can be used between the method and the device will not be repeated.

[0076] The storage medium of the present invention stores a computer program, which, when executed by a processor, implements the above-described pedestrian re-identification clustering method based on spatiotemporal information.

[0077] like Figure 6 As shown, in this embodiment, the pedestrian re-identification clustering system of the present invention includes a processor 61 and a memory 62.

[0078] The memory 62 is used to store computer programs.

[0079] The memory 62 includes various media capable of storing program code, such as ROM, RAM, magnetic disk, USB flash drive, memory card, or optical disk.

[0080] The processor 61 is connected to the memory 62 and is used to execute the computer program stored in the memory 62 so that the electronic device performs the above-described pedestrian re-identification clustering method based on spatiotemporal information.

[0081] Preferably, the processor 61 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be 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, or discrete hardware components.

[0082] In summary, the pedestrian re-identification clustering method and apparatus based on spatiotemporal information of the present invention can utilize the spatiotemporal information corresponding to pedestrian images, greatly reducing the impact of mismatched points that do not conform to spatiotemporal logic and improving matching accuracy. Simultaneously, the application of graph attention networks can provide different morphological features of the same pedestrian at the time of capture to the original nodes, greatly enriching the robustness of the nodes to achieve higher matching accuracy. Therefore, the present invention effectively overcomes the various shortcomings of the prior art and has high industrial application value.

[0083] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.

Claims

1. A pedestrian re-identification clustering method based on spatiotemporal information, characterized in that, The pedestrian re-identification clustering method includes the following steps: Based on the set of pedestrian images to be identified, a neural network model is applied to extract features and determine the feature representation of each pedestrian image; based on the feature representation of each pedestrian image, Euclidean distance is applied to perform similarity matching to determine the first feature cluster; Based on the feature representations in the first feature cluster, a density-based spatiotemporal clustering algorithm is applied to determine the core points that conform to the spatiotemporal clustering algorithm and the connecting edges between the core points; this includes: based on the feature representations in the first feature cluster, applying the density-based spatiotemporal clustering algorithm to determine the temporal distance matrix and spatial distance matrix corresponding to the feature representations; each feature representation in the first feature cluster corresponds to a record of the time when pedestrian images were captured and the camera location, and the temporal distance matrix and spatial distance matrix corresponding to the feature representation are calculated based on these records; the temporal distance matrix is ​​the difference between the capture times of two pedestrian images corresponding to the feature representation; the spatial distance matrix is ​​the sum of the capture times of the two pedestrian images corresponding to the feature representation; The distance between the camera and the pedestrian when the pedestrian is captured is determined; each data point in the temporal distance matrix and each data point in the spatial distance matrix are traversed; when the first data point in the temporal distance matrix is ​​within a preset temporal distance threshold range, the second data point in the spatial distance matrix is ​​within a preset spatial distance threshold range, and the first data point and the second data point correspond to the same feature expression, the same feature expression is recorded and counted; when the count result is greater than a preset node threshold, the same feature expression corresponding to the count is determined as a core point that conforms to the spatiotemporal clustering algorithm; every two core points are connected to form a connection edge between the core points; Based on the core points and the connecting edges, a graph attention network is applied to update the feature representation of the first feature cluster; this includes: constructing a clustering graph based on the core points and the connecting edges; determining the attention coefficients corresponding to the core points by applying the expression of the attention coefficients of the graph attention network based on the clustering graph; determining the attention weights corresponding to the connecting edges by performing nonlinear activation and exponential normalization processing of the linear correction unit with leakage based on the attention coefficients; multiplying the attention weights corresponding to the connecting edges by the weights of the graph attention network, and then performing exponential normalization on the connecting edges to update the feature representation of the core points; and updating the feature representation of the first feature cluster based on the feature representation of the core points. Based on the updated feature representation of the first feature cluster and the preset feature threshold, a similarity judgment is made to determine the second feature cluster, which represents the features of the same pedestrian.

2. The method according to claim 1, characterized in that, The loss functions of the neural network model include the cross-entropy loss function and the triplet loss function.

3. The method according to claim 1, characterized in that, The step of applying Euclidean distance calculation to perform similarity matching based on the feature representation of each pedestrian image to determine the first feature cluster includes: Based on the feature representation of each pedestrian image, the similarity between every two feature representations is determined by applying the Euclidean distance calculation formula. When the similarity is greater than the first similarity threshold, the two feature expressions corresponding to the similarity are determined to belong to one class of the first feature cluster.

4. The method according to claim 1, characterized in that, The expression for the attention coefficient is: e ij =concat(h i W,h j W)a,j∈N i e ij Here, h represents the attention coefficient; i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; i h is the feature vector of the core point i, with dimensions [1, F]; j Let be the feature vector of core point j, with dimension [1, F]; W is the learnable parameter, with dimension [F, F′]; a is the learnable parameter, with dimension [2F′, 1]; F is an integer greater than 1, F′ is an integer greater than 1, and N is the total number of core points; The expression for the attention weight is: a ij Attention weights; i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; LeakyReLU(e ij ) indicates the use of a linear correction unit with leakage for e ij Perform nonlinear activation processing; LeakyReLU(e ik ) indicates the use of a linear correction unit with leakage for e ik Perform nonlinear activation processing; exp(LeakyReLU(e ij )) indicates that LeakyRelU(e ij ) calculate the exponent; exp(LeakyReLU(e ik )) represents the expression for LeakyReLU(e ik The exponent is calculated; k represents the kth core point adjacent to the i-th core point; N is the total number of core points. The expression for the feature representation is: h′ i For feature representation, i represents the i-th core point; j represents the j-th core point adjacent to the i-th core point; a ij For attention weights; W is a learnable parameter; h j σ represents the eigenvector of the core point j; σ denotes the exponential normalization operation.

5. The method according to claim 1, characterized in that, After updating the first feature cluster, the method further includes: Calculate the feature mean of the feature representation in the updated first feature cluster; The Euclidean distance is calculated between the mean of each feature and the feature representation that does not conform to the spatiotemporal clustering algorithm to obtain a similarity set. Obtain the maximum similarity in the similarity set; When the maximum similarity is greater than the second similarity threshold, the feature representations corresponding to the maximum similarity that do not conform to the spatiotemporal clustering algorithm are added to the second feature cluster.

6. A pedestrian re-identification clustering device based on spatiotemporal information, characterized in that, include: The first processing module is used to extract features based on the set of pedestrian images to be identified by applying a neural network model to determine the feature representation of each pedestrian image. Based on the feature representation of each pedestrian image, Euclidean distance calculation is applied to perform similarity matching to determine the first feature cluster; The second processing module is used to determine the core points and connecting edges between the core points by applying a density-based spatiotemporal clustering algorithm based on the feature expressions in the first feature cluster; including: applying the density-based spatiotemporal clustering algorithm to determine the temporal distance matrix and spatial distance matrix corresponding to the feature expressions based on the feature expressions in the first feature cluster; each feature expression in the first feature cluster corresponds to a record of the time when pedestrian images were captured and the camera location, and the temporal distance matrix and spatial distance matrix corresponding to the feature expressions are calculated based on these records; the temporal distance matrix is ​​the difference between the capture times of two pedestrian images corresponding to the feature expressions; the spatial distance matrix... The system represents the distance between the camera and the pedestrian when the pedestrian is captured, corresponding to a feature expression. It iterates through each data point in the temporal distance matrix and each data point in the spatial distance matrix. When a first data point in the temporal distance matrix is ​​within a preset temporal distance threshold, a second data point in the spatial distance matrix is ​​within a preset spatial distance threshold, and the first and second data points correspond to the same feature expression, the same feature expression is recorded and counted. When the count result is greater than a preset node threshold, the same feature expression corresponding to the count is determined as a core point conforming to the spatiotemporal clustering algorithm. Every two core points are connected to form a connection edge between them. A first determining module is used to update the feature representation of the first feature cluster based on the core points and the connecting edges, using a graph attention network; including: constructing a clustering graph based on the core points and the connecting edges; determining the attention coefficients corresponding to the core points by applying the expression of the attention coefficients of the graph attention network based on the clustering graph; determining the attention weights corresponding to the connecting edges by performing nonlinear activation and exponential normalization processing of the linear correction unit with leakage based on the attention coefficients; multiplying the attention weights corresponding to the connecting edges by the weights of the graph attention network, and then performing exponential normalization on the connecting edges to update the feature representation of the core points; and updating the feature representation of the first feature cluster based on the feature representation of the core points. The second determining module is used to perform similarity judgment based on the updated first feature cluster and the preset feature threshold, and determine the second feature cluster, which represents the features of the same pedestrian.

7. A storage medium storing program instructions, wherein, When the program instructions are executed, they implement the steps of the pedestrian re-identification clustering method based on spatiotemporal information as described in any one of claims 1 to 5.

8. A pedestrian re-identification clustering system, characterized in that: It includes a memory for storing a computer program; and a processor for running the computer program to implement the steps of the pedestrian re-identification clustering method based on spatiotemporal information as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Multi-dimensional space-time density clustering method based on Gower coefficient

    CN110990494A

  • Unsupervised pedestrian re-identification method based on graph convolution network

    CN111950372A

  • Training data cleaning method and device

    CN112446361A

  • Associated user recognition method and device based on multilayer graph attention network

    CN113628059A