A cross-modal pedestrian re-identification system and method for intelligent security
Through the combination of multi-branch convolution generation module and graph convolution network, the problems of large modal differences and low recognition accuracy in cross-modal pedestrian re-identification are solved, achieving more efficient pedestrian feature extraction and recognition effects, and reducing noise. Improved recognition accuracy and robustness.
Patent Information
- Application Number
- CN202311418003.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-30
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2043-10-30
AI Technical Summary
Existing pedestrian re-identification methods fail at night or under insufficient lighting conditions. The recognition accuracy of black and white images captured by infrared cameras is low, and pedestrian images vary greatly across modes, making it difficult to project directly into a common feature space, resulting in poor recognition results. .
Using multi-branch convolution generation module and graph convolution network, through diversified embedding of local features and global features, combined with graph convolution and adaptive neighbor learning matrix, a richer feature expression is generated, and the mining loss is improved through center guidance and orthogonal losses optimize the network to reduce modal differences and noise.
It effectively avoids network overfitting, weakens the difference between visible light and infrared modes, generates more effective information, improves recognition accuracy, reduces noise, and achieves robustness in cross-modal pedestrian re-identification.
Smart Images

Figure CN117475474B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a cross-modal pedestrian re-identification system and method for intelligent security, belonging to the technical field of pedestrian re-identification. Background Art
[0002] Person re-identification is an artificial intelligence technology that uses computer vision technology to retrieve whether a specific pedestrian exists in an image or video sequence. It has important application significance and prospects in monitoring scenarios such as smart cities. Existing pedestrian re-identification methods are mainly used to solve the problem of matching the same pedestrian between single-modal images taken by RGB cameras. Single-modal pedestrian re-identification can use rich color information for feature extraction, so the recognition accuracy is very good. However, at night or in low light conditions, RGB cameras lose their function, and the RGB single-modal pedestrian re-identification method will fail. Infrared cameras can take pictures at night, but the images they take are mostly black and white, and the recognition accuracy is poor.
[0003] In response to the above problems, cross-modal pedestrian re-identification came into being. The purpose of infrared-visible light cross-modal pedestrian re-identification is to achieve matching of the same pedestrian appearing in RGB camera and infrared camera. However, due to the huge difference between pedestrian images in RGB mode and infrared mode, researchers have proposed the following two methods to solve the problems caused by this difference: First, project the infrared image (IR) features and visible light image (VIS) features into a common embedding space, such as using a two-stream network structure to extract pedestrian features of different modalities, and then use loss constraints and other methods to share feature embedding and extract modality-invariant features, so as to narrow the difference between the two modal data, and add similarity measurement and other methods. However, such methods often only focus on the learning of shared features and ignore the role of specific features. In addition, due to the large modal differences, it is often difficult to directly project cross-modal images into the common feature space. Second, they focus on cross-modal generation, such as using visible light images to generate corresponding infrared images, generating two-level difference reduction learning based on bidirectional cycles, using shared and specific feature transformation algorithms and converting them into each other, directly adding the GAN generator, and using GAN to generate corresponding modal images. For such methods, training the generator and discriminator will make the network more complex, and it is difficult to balance the generator and discriminator. There is a lack of VIS-IR image pairs, and the generated cross-modal images are often accompanied by some noise. Summary of the invention
[0004] The purpose of the present invention is to provide a cross-modal pedestrian re-identification system and method for intelligent security. The system and method can provide a simpler network structure, effectively avoid overfitting of the network structure, reduce the differences between pedestrian images in visible light mode and infrared mode, generate more effective information, and reduce noise generation.
[0005] In order to achieve the above-mentioned object, the present invention provides a cross-modal pedestrian re-identification system for intelligent security, comprising an image preprocessing module, an image acquisition module, a network construction module, a network training module and an index evaluation module; the output end of the image preprocessing module is connected to the input end of the image acquisition module, the output end of the image acquisition module is connected to the input end of the network construction module, the output end of the network construction module is connected to the input end of the network training module, and the output end of the network training module is connected to the index evaluation module;
[0006] The image preprocessing module is used to resize, mark and randomly block the image of the dataset used;
[0007] The image acquisition module is used to load the image of the dataset to be used;
[0008] The network construction module is used to extract local features and global features of the input image, and perform multi-branch convolution generation and direct splicing of feature vectors;
[0009] The network training module is used to calculate the distance between samples of the feature vectors obtained by feature extraction and splicing, obtain the clustering radius according to the distance, and update the network parameters by calculating the loss function;
[0010] The index evaluation module is used to input the test data set into the network for evaluation after the network training is completed.
[0011] A cross-modal pedestrian re-identification method for intelligent security includes the following steps:
[0012] Step 1: Feature extraction:
[0013] (1) For each input image, it is input into the backbone network, and Resnet50 is used as the extraction network to extract feature map information, that is, global information extraction;
[0014] (2) For each image extracted in step (1), the information is respectively passed through the posture estimation module to extract the heat map of 13 key points of the human body, and the key points are learned using the human key point estimation model. The key points include the head, shoulders, elbows, wrists, hips, knees and ankles, and the semantic information of the corresponding key points is extracted;
[0015] (3) Multiply the heat map of the 13 key points with the feature map global feature map of the corresponding image to obtain the local features of the corresponding key points, and then obtain the global features by pooling the feature map of each image;
[0016] (4) Feeding the global feature information and local feature information to the improved multi-branch convolutional generation module to obtain more global and local feature information to generate more embeddings;
[0017] (5) Use graph convolution to splice and fuse the extracted key point information, that is, splice the local feature maps of 13 key points and 1 global feature map in the depth dimension to obtain richer feature expression; the specific steps of fusion are:
[0018] a. Let the pedestrian image input be x, and the feature map obtained be m cnn , that is, the extracted feature map information featuremap, the key point map is m kp , the two are calculated through outer product and global average pooling to obtain local semantic features and global features:
[0019]
[0020]
[0021] In the formula, To perform outer product calculation, g represents the process of processing the input x to obtain m cnn processing, K represents the number of input feature information; Indicates that the feature map information is solved to obtain the global feature, K+1 means starting from the k+1th feature information, and S means ending at the Sth information;
[0022] b. For the input feature information, a two-stream Resnet50 network is used to input the VIS-IR features into the proposed multi-branch convolutional generation module to generate more embeddings;
[0023] Step 2: Construct graph convolutional neural network for feature fusion:
[0024] (1) Through the graph convolutional neural network, the local feature information extracted in the previous part is fused to obtain the correlation information between different local features. The specific steps are as follows:
[0025] a. The local feature V l Subtract the global feature Vg to get the difference between the local feature and the global feature. The larger the difference value, the less important the feature information is and the outlier information is. The smaller the difference value, the more similar the local feature is to the global feature, the more important the local feature is and the greater its role is.
[0026] b. Multiply the obtained difference feature matrix with the predefined graph adjacency matrix to obtain a new adjacency matrix, which is used to represent the relationship between feature points and then added to V l Do matrix multiplication;
[0027] c. Local feature V l Use the concat method to fuse relational features and obtain the topological graph structure information features with relations, so that it has local features of 13 new key points, which not only have their own feature information, but also carry the feature information of related nodes;
[0028] (2) The weight is evaluated based on the difference between the local features and the global features obtained from the input information. The joint points that deviate from the global features are occluded information or noise. Thus, an edge weight matrix is obtained to control the transmission of information and obtain local features with small differences. The graph convolution calculation formula is as follows:
[0029]
[0030] In the formula, f1 and f2 are two non-shared fully connected layers, A adp represents the adaptive neighbor learning matrix, Represents the input image information. Represents adaptive directed graph convolution input;
[0031] (3) Cascade from step (2) to form a high-order relation module f R The specific cascade process is to use adaptive graph convolution to cascade. The high-order relationship module is based on the above high-order relationship module. A cross-graph embedding alignment layer is proposed. The alignment layer calculates the similarity based on the cosine similarity and the coefficients of the first-order aligned neighbors of the two nodes. That is, if two nodes in different networks have similar corresponding vertices, it takes two graphs as input, uses the graph matching strategy to learn the corresponding relationship between their nodes, and then regards the learned corresponding relationship as an adjacency matrix to transmit information.
[0032] (4) Using a two-stream Resnet50 network and a graph convolutional neural network, the VIS-IR features are input into a multi-level feature aggregation mechanism to generate more embeddings;
[0033] Step 3: Multi-level feature aggregation mechanism:
[0034] In order to aggregate features from different stages to mine different channel and spatial feature representations, the channel-space multi-stage feature aggregation block is combined to aggregate multi-stage features. At the same time, two types of source features from the channel-space aggregation blocks of each stage of the backbone network are considered, namely, the low-level features before each stage and the high-level feature maps extracted by the backbone network after the stage, and the multi-level feature aggregation mechanism is used for aggregation. The specific steps are as follows:
[0035] (1) Use three 1×1 convolutional layers Convert f into three compact embeddings and First, channel aggregation is performed, and the channel similarity matrix is calculated as follows, using the self-attention mechanism:
[0036]
[0037] In the formula, F softmax It is a classification function that maps the output value range of multiple categories to [0, 1];
[0038] pass and M c Matrix multiplication is performed to restore the channel dimension, thereby realizing multi-level feature aggregation of the channel. The formula is as follows:
[0039]
[0040] In the formula, w s Represents the aggregation operation of high-level features, f h Represents low-level features;
[0041] (2) Using the above calculation, we get And the underlying feature map f l Perform spatial feature aggregation operation, the formula is as follows:
[0042]
[0043] In the formula, w s and There are two 1×1 convolutional layers, M s is the spatial similarity matrix;
[0044] Step 4: Loss function optimization:
[0045] By finding the sum of the loss functions used and minimizing their total value; the specific loss functions used are as follows:
[0046] (1) Center-guided mining loss function
[0047] In order to obtain more feature input information and process it, after step 3, the multi-level feature aggregation mechanism generates more embeddings, and then the center-guided mining loss is used to obtain diversified embeddings. The generated embeddings are mainly constrained by the following properties to make them as diverse as possible and effectively reduce the modal differences between VIS images and IR images:
[0048] Property a: The generated embeddings should be as diverse as possible to effectively learn informative feature representations, thus pushing the distance between the generated embeddings of the same modality and the original embeddings to learn different features and tap into different cross-modal cues;
[0049] Property b: The generated embeddings should help reduce the modality difference between VIS and IR images, thus bringing the embeddings generated from the VIS modality closer to the original IR embeddings; and similarly, bringing the embeddings generated from the IR modality closer to the original VIS embeddings;
[0050] Attribute c: The intra-class distance should be smaller than the inter-class distance. Therefore, when shortening the distance, the intra-class distance should be kept smaller than the inter-class distance.
[0051] The formula is as follows:
[0052]
[0053] denotes the Euclidean distance between two embeddings, f v and f n are the raw embeddings from the VIS and IR modalities, is the embedding generated by the i-th branch from the VIS modality; “+” means that if the result in the bracket is positive, then the positive value is taken, and if it is negative, then the opposite value is taken;
[0054] The above formulas for attribute a, attribute b and attribute c can be expressed as follows: Its purpose is to pull the generated embedding towards the embedding of the original IR to reduce the modality difference between the two; Push the generated embedding away from the VIS embedding so that Ability to learn informative feature representations; Make the intra-class distance smaller than the inter-class distance;
[0055] Each class is represented by a center point, and the corresponding point position is represented by its center point position, that is, using C n and C v Indicates that the corresponding generated embedding center is more discriminative, and the marginal term α is used to balance the previous three terms. The formula becomes:
[0056]
[0057] Similarly, for the class center loss of the embedding generated by IR, it is expressed as:
[0058]
[0059] Finally, the center-guided mining loss function is organized as:
[0060]
[0061] (2) Orthogonal loss function
[0062] To ensure that the embeddings generated by different branches can capture different information feature representations, different embeddings generated by different branches are forced to be orthogonal to minimize overlapping elements. That is, after the embedding is generated, an embedding orthogonalization is performed to ensure the effectiveness of subsequent operations. The formula is as follows:
[0063]
[0064] Where m and n are the mth and nth embeddings generated from the original embedding, respectively. The transpose of the mth embedding is multiplied by the nth embedding. The orthogonal loss can force the generated embedding to learn more informative feature representations.
[0065] (3) Cross Entropy Loss Function
[0066] Cross entropy loss is also called L ce , if each category in the multi-classification task is analyzed separately, the true distribution P is a binomial distribution with possible values of 0 or 1, and the distribution Q predicted by the network can be understood as the probability that the label is 1. In addition, since each category in the multi-label classification task is independent of each other, the sum of the probability values output by the last layer of neurons in the network is not equal to 1. For one type of task in the multi-label classification task, the cross entropy loss function is:
[0067]
[0068] In the formula, m represents the number of categories, y ic represents the sign function, if the true category of sample i is equal to c, it takes 1, otherwise it takes 0, p ic Represents the predicted probability that the observed sample belongs to the category;
[0069] (4) Triple Entropy Loss Function
[0070] The triple entropy loss is also called L tri A triplet is a triplet. A sample is randomly selected from the training data set, which is called Anchor. Then a sample belonging to the same class as Anchor and a sample of a different class are randomly selected. These two samples are called Positive and Negative respectively. By minimizing these four losses L total The sum of , jointly optimizes the network in an end-to-end manner, and the total loss formula is as follows:
[0071] L total =L cpm +L ort +λ1L ce +λ2L tri ;
[0072] In the formula, λ1 and λ2 represent sparseness. In the model design, they are taken as 0.8 and 0.01 respectively. During the training process, the value of the loss function is continuously converged.
[0073] Furthermore, in step 1, the VIS-IR features are input into the proposed multi-branch convolutional generation module to generate more embedding steps:
[0074] (1) For each branch of the multi-branch convolutional generation module, three 3×3 expansion convolutional layers are used, which have different expansion ratios, 1, 2, and 3 from top to bottom, to reduce the number of feature maps f to 1 / 4 of its own size. The various small feature maps obtained are combined into a new large feature map F, and the ReLU activation layer is used to improve the nonlinear representation ability of the diversified embedding expansion module, and finally fed to the convolutional layer θ 1×1 , the kernel size is 1×1, and the embedding feature with the same dimension as f is obtained. The embedding function is as follows:
[0075]
[0076] In the formula, To perform convolution on the function, 3×3 represents the convolution kernel size of 3, and the upper right subscripts 1, 2, and 3 represent the first 3×3 convolution, the second 3×3 convolution, and the third 3×3 convolution respectively;
[0077] (2) All outputs are output together through the function cat as the input of the next stage of the backbone network.
[0078] The present invention proposes a diversified embedding expansion module, generates more embeddings through a multi-branch convolutional generation structure to alleviate the problem of insufficient training data; based on the method of local heterogeneous aggregation graph convolutional network, a method of information fusion of extracted local key point features using graph structural relationships is used, a key point extraction network is used to extract local key point features of the image, and a novel graph convolutional network is constructed to model the structural relationship between various parts of the human body, thereby extracting more high-level feature information; the loss function is further optimized, and a center-guided pair mining loss and orthogonal loss are proposed, which can achieve the effect of removing redundancy and optimizing the network in an end-to-end manner. The present invention provides a simpler network structure, effectively avoids overfitting of the network structure, reduces the difference between pedestrian images in visible light mode and infrared mode, generates more effective information, and reduces the generation of noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 It is a schematic diagram of the structure of the identification system of the present invention;
[0080] Figure 2 It is a flowchart of the identification method of the present invention;
[0081] Figure 3 It is a schematic diagram of feature extraction of the present invention;
[0082] Figure 4 Schematic diagram of a multi-branch convolution generation module of the present invention;
[0083] Figure 5 It is a schematic diagram of the learning process of the graph convolutional neural network of the present invention;
[0084] Figure 6 It is a schematic diagram of the multi-stage characteristics of the polymerization of the present invention;
[0085] Figure 7 It is a schematic diagram of the center-guided diversified embedding of mining losses of the present invention;
[0086] Figure 8 It is a training schematic diagram of triple entropy loss of the present invention. DETAILED DESCRIPTION
[0087] The present invention will be further described below in conjunction with the accompanying drawings.
[0088] like Figure 1 As shown, a cross-modal pedestrian re-identification system for intelligent security includes an image preprocessing module, an image acquisition module, a network construction module, a network training module and an index evaluation module; the output end of the image preprocessing module is connected to the input end of the image acquisition module, the output end of the image acquisition module is connected to the input end of the network construction module, the output end of the network construction module is connected to the input end of the network training module, and the output end of the network training module is connected to the index evaluation module;
[0089] The image preprocessing module is used to resize, mark and randomly block the image of the dataset used;
[0090] The image acquisition module is used to load the image of the dataset to be used;
[0091] The network construction module is used to extract local features and global features of the input image, and perform multi-branch convolution generation and direct splicing of feature vectors;
[0092] The network training module is used to calculate the distance between samples of the feature vectors obtained by feature extraction and splicing, obtain the clustering radius according to the distance, and update the network parameters by calculating the loss function;
[0093] The index evaluation module is used to input the test data set into the network for evaluation after the network training is completed.
[0094] like Figure 2As shown, a cross-modal pedestrian re-identification method for intelligent security includes the following steps:
[0095] Step 1: Feature extraction:
[0096] (1) For each input image, it is input into the backbone network, and Resnet50 is used as the extraction network to extract feature map information, that is, global information extraction;
[0097] (2) The information of each image extracted in step (1) is then passed through the posture estimation module to extract the heat map of 13 key points of the human body, such as Figure 3 As shown, a human key point estimation model is used to learn key points, including head, shoulders, elbows, wrists, hips, knees and ankles, and the semantic information of the corresponding key points is extracted;
[0098] (3) Multiply the heat map of the 13 key points with the feature map global feature map of the corresponding image to obtain the local features of the corresponding key points, and then obtain the global features by pooling the feature map of each image;
[0099] (4) Feeding the global feature information and local feature information to the improved multi-branch convolutional generation module to obtain more global and local feature information to generate more embeddings;
[0100] (5) Use graph convolution to splice and fuse the extracted key point information, that is, splice the local feature maps of 13 key points and 1 global feature map in the depth dimension to obtain richer feature expression; the specific steps of fusion are:
[0101] a. Let the pedestrian image input be x, and the feature map obtained be m cnn , that is, the extracted feature map information featuremap, the key point map is m kp , the two are calculated through outer product and global average pooling to obtain local semantic features and global features:
[0102]
[0103]
[0104] In the formula, To perform outer product calculation, g represents the process of processing the input x to obtain m cnn processing, K represents the number of input feature information; Indicates that the feature map information is solved to obtain the global feature, K+1 means starting from the k+1th feature information, and S means ending at the Sth information;
[0105] b. For the input feature information, a two-stream Resnet50 network is used to input the VIS-IR features into the proposed multi-branch convolutional generation module to generate more embeddings;
[0106] Step 2: Construct graph convolutional neural network for feature fusion:
[0107] (1) Through the graph convolutional neural network, the local feature information extracted in the previous part is fused to obtain the correlation information between different local features, such as Figure 5 As shown, the specific steps are:
[0108] a. The local feature V l Subtract the global feature Vg to get the difference between the local feature and the global feature. The larger the difference value, the less important the feature information is and the outlier information is. The smaller the difference value, the more similar the local feature is to the global feature, the more important the local feature is and the greater its role is.
[0109] b. Multiply the obtained difference feature matrix with the predefined graph adjacency matrix to obtain a new adjacency matrix, which is used to represent the relationship between feature points and then added to V l Do matrix multiplication;
[0110] c. Local feature V l Use the concat method to fuse relational features and obtain the topological graph structure information features with relations, so that it has local features of 13 new key points, which not only have their own feature information, but also carry the feature information of related nodes;
[0111] (2) The weight is evaluated based on the difference between the local features and the global features obtained from the input information. The joint points that deviate from the global features are occluded information or noise. Thus, an edge weight matrix is obtained to control the transmission of information and obtain local features with small differences. The graph convolution calculation formula is as follows:
[0112]
[0113] In the formula, f1 and f2 are two non-shared fully connected layers, A adp represents the adaptive neighbor learning matrix, Represents the input image information. Represents adaptive directed graph convolution input;
[0114] (3) Cascade from step (2) to form a high-order relation module f RThe specific cascade process is to use adaptive graph convolution to cascade. The high-order relationship module is based on the above high-order relationship module. A cross-graph embedding alignment layer is proposed. The alignment layer calculates the similarity based on the cosine similarity and the coefficients of the first-order aligned neighbors of the two nodes. That is, if two nodes in different networks have similar corresponding vertices, it takes two graphs as input, uses the graph matching strategy to learn the corresponding relationship between their nodes, and then regards the learned corresponding relationship as an adjacency matrix to transmit information.
[0115] (4) Using a two-stream Resnet50 network and a graph convolutional neural network, the VIS-IR features are input into a multi-level feature aggregation mechanism to generate more embeddings;
[0116] Step 3: Multi-level feature aggregation mechanism:
[0117] In order to aggregate features from different stages to mine different channel and spatial feature representations, the channel-space multi-stage feature aggregation block is combined to aggregate multi-stage features. At the same time, two types of source features from the channel-space aggregation blocks of each stage of the backbone network are considered, namely, the low-level features before each stage and the high-level feature maps extracted by the backbone network after each stage, and the multi-level feature aggregation mechanism is used for aggregation, such as Figure 6 As shown, the specific steps are as follows:
[0118] (1) Use three 1×1 convolutional layers Convert f into three compact embeddings and First, channel aggregation is performed, and the channel similarity matrix is calculated as follows, using the self-attention mechanism:
[0119]
[0120] In the formula, F softmax It is a classification function that maps the output value range of multiple categories to [0, 1];
[0121] pass and M c Matrix multiplication is performed to restore the channel dimension, thereby realizing multi-level feature aggregation of the channel. The formula is as follows:
[0122]
[0123] In the formula, w s Represents the aggregation operation of high-level features, f h Represents low-level features;
[0124] (2) Using the above calculation, we get And the underlying feature map f l Perform spatial feature aggregation operation, the formula is as follows:
[0125]
[0126] In the formula, w s and There are two 1×1 convolutional layers, M s is the spatial similarity matrix;
[0127] Step 4: Loss function optimization:
[0128] By finding the sum of the loss functions used and minimizing their total value; the specific loss functions used are as follows:
[0129] (1) Center-guided mining loss function
[0130] In order to obtain more feature input information and process the information, after step 3, the multi-level feature aggregation mechanism generates more embeddings, and then the center-guided mining loss is used to obtain diversified embeddings, such as Figure 7 As shown in Figure 2, the following properties are mainly used to constrain the generated embeddings to make them as diverse as possible and effectively reduce the modality difference between VIS images and IR images:
[0131] Property a: The generated embeddings should be as diverse as possible to effectively learn informative feature representations, thus pushing the distance between the generated embeddings of the same modality and the original embeddings to learn different features and tap into different cross-modal cues;
[0132] Property b: The generated embeddings should help reduce the modality difference between VIS and IR images, thus bringing the embeddings generated from the VIS modality closer to the original IR embeddings; and similarly, bringing the embeddings generated from the IR modality closer to the original VIS embeddings;
[0133] Attribute c: The intra-class distance should be smaller than the inter-class distance. Therefore, when shortening the distance, the intra-class distance should be kept smaller than the inter-class distance.
[0134] The formula is as follows:
[0135]
[0136] denotes the Euclidean distance between two embeddings, f v and f n are the raw embeddings from the VIS and IR modalities, is the embedding generated by the i-th branch from the VIS modality; “+” means that if the result in the bracket is positive, then the positive value is taken, and if it is negative, then the opposite value is taken;
[0137] The above formulas for attribute a, attribute b and attribute c can be expressed as follows: Its purpose is to pull the generated embedding towards the embedding of the original IR to reduce the modality difference between the two; Push the generated embedding away from the VIS embedding so that Ability to learn informative feature representations; Make the intra-class distance smaller than the inter-class distance;
[0138] Each class is represented by a center point, and the corresponding point position is represented by its center point position, that is, using C n and C v Indicates that the corresponding generated embedding center is more discriminative, and the marginal term α is used to balance the previous three terms. The formula becomes:
[0139]
[0140] Similarly, for the class center loss of the embedding generated by IR, it is expressed as:
[0141]
[0142] Finally, the center-guided mining loss function is organized as:
[0143]
[0144] (2) Orthogonal loss function
[0145] To ensure that the embeddings generated by different branches can capture different information feature representations, different embeddings generated by different branches are forced to be orthogonal to minimize overlapping elements. That is, after the embedding is generated, an embedding orthogonalization is performed to ensure the effectiveness of subsequent operations. The formula is as follows:
[0146]
[0147] Where m and n are the mth and nth embeddings generated from the original embedding, respectively. The transpose of the mth embedding is multiplied by the nth embedding. The orthogonal loss can force the generated embedding to learn more informative feature representations.
[0148] (3) Cross Entropy Loss Function
[0149] Cross entropy loss is also called L ce , if each category in the multi-classification task is analyzed separately, the true distribution P is a binomial distribution with possible values of 0 or 1, and the distribution Q predicted by the network can be understood as the probability that the label is 1. In addition, since each category in the multi-label classification task is independent of each other, the sum of the probability values output by the last layer of neurons in the network is not equal to 1. For one type of task in the multi-label classification task, the cross entropy loss function is:
[0150]
[0151] In the formula, m represents the number of categories, y ic represents the sign function, if the true category of sample i is equal to c, it takes 1, otherwise it takes 0, p ic Represents the predicted probability that the observed sample belongs to the category;
[0152] (4) Triple Entropy Loss Function
[0153] The triple entropy loss is also called L tri ,like Figure 8 As shown in the figure, a triplet is a triplet. A sample is randomly selected from the training data set, which is called Anchor. Then a sample belonging to the same class as Anchor and a sample of a different class are randomly selected. These two samples are called Positive and Negative respectively. By minimizing these four losses L total The sum of , jointly optimizes the network in an end-to-end manner, and the total loss formula is as follows:
[0154] L total =L cpm +L ort +λ1L ce +λ2L tri ;
[0155] In the formula, λ1 and λ2 represent sparseness. In the model design, they are taken as 0.8 and 0.01 respectively. During the training process, the value of the loss function is continuously converged.
[0156] As a preferred embodiment, Figure 4 As shown, in step 1, the VIS-IR features are input into the proposed multi-branch convolutional generation module to generate more embedding steps:
[0157] (1) For each branch of the multi-branch convolutional generation module, three 3×3 expansion convolutional layers are used, which have different expansion ratios, 1, 2, and 3 from top to bottom, to reduce the number of feature maps f to 1 / 4 of its own size. The various small feature maps obtained are combined into a new large feature map F, and the ReLU activation layer is used to improve the nonlinear representation ability of the diversified embedding expansion module, and finally fed to the convolutional layer θ 1×1 , the kernel size is 1×1, and the embedding feature with the same dimension as f is obtained. The embedding function is as follows:
[0158]
[0159] In the formula, To perform convolution on the function, 3×3 represents the convolution kernel size of 3, and the upper right subscripts 1, 2, and 3 represent the first 3×3 convolution, the second 3×3 convolution, and the third 3×3 convolution respectively;
[0160] (2) All outputs are output together through the function cat as the input of the next stage of the backbone network.
[0161] Example:
[0162] The datasets used are SYSU-MM01 dataset and RegDB dataset. The parameters are set as follows: random horizontal flipping and random erasing operations are used to resize all input images to 3×384×144. The initial learning rate is set to 1×10-2. After 10 times of warm-up, the learning rate is increased to 1×10-1. After that, the learning rate is decayed to 1×10-2 at 20 epochs, and further decayed to 1×10-3 and 1×10-4 at 60 epochs and 120 epochs, respectively, until a total of 150 epochs. In each small batch, 4 VIS images and 4 IR images of 6 identities are randomly selected for training. The training adopts the SGD optimizer and the momentum is set to 0.9. The recognition results of the present invention are compared with the VI-ReID method, and the final results are shown on two public datasets, as shown in Tables 1 and 2:
[0163] Table 1 Performance comparison of the recognition method of the present invention with other recognition methods on the SYSU-MM01 dataset
[0164]
[0165] Table 2 Performance comparison of the recognition method of the present invention with other recognition methods on the RegDB dataset
[0166]
[0167] As can be seen from Table 1, on the SYSU-MM01 dataset, in the single-shot mode of All Search, the Rank-1 accuracy and m-AP of the recognition method of the present invention are 75.44% and 73.34% respectively, which are 0.74% and 1.54% higher than the second best DEEN method; in the Indoor Search mode, the Rank-1 accuracy and m-AP of the recognition method of the present invention are 84.62% and 86.99% respectively, which are 3.10% and 2.61% higher than PartMix, showing a better performance;
[0168] As can be seen from Table 2, on the RegDB dataset, the recognition method of the present invention outperforms other existing methods in all given indicators. Compared with the DEEN method, in the visible light to infrared search mode, the Rank-1 accuracy and m-AP of the recognition method of the present invention are 5.0% and 3.73% higher, respectively; in the infrared to visible light search mode, the Rank-1 accuracy and m-AP of the recognition method of the present invention are 4.0% and 4.53% higher, respectively. By comparing the results of different methods, the recognition method of the present invention shows better performance, which shows that the present invention has good robustness under different query settings, and further verifies that the recognition method of the present invention can solve the challenges faced by VI-ReID to a certain extent.
Claims
1. A cross-modal pedestrian re-identification method for intelligent security, characterized in that: The steps include: Step 1: Feature extraction: (1) For each input image, it is input into the backbone network, and Resnet50 is used as the extraction network to extract feature map information, that is, global information extraction; (2) For each image extracted in step (1), the information is respectively passed through the posture estimation module to extract the heat map of 13 key points of the human body, and the key points are learned using the human key point estimation model. The key points include the head, shoulders, elbows, wrists, hips, knees and ankles, and the semantic information of the corresponding key points is extracted; (3) Multiply the heat map of the 13 key points with the feature map global feature map of the corresponding image to obtain the local features of the corresponding key points, and then obtain the global features by pooling the feature map of each image; (4) Feeding the global feature information and local feature information to the improved multi-branch convolutional generation module to obtain more global and local feature information to generate more embeddings; (5) Use graph convolution to splice and fuse the extracted key point information, that is, splice the local feature maps of 13 key points and 1 global feature map in the depth dimension to obtain richer feature expression; the specific steps of fusion are: a. Let the pedestrian image input be x, and the feature map obtained be m cnn , that is, the extracted feature map information featuremap, the key point map is m kp , the two are calculated through outer product and global average pooling to obtain local semantic features and global features: In the formula, To perform outer product calculation, g represents the process of processing the input x to obtain m cnn processing, K represents the number of input feature information; Indicates that the feature map information is solved to obtain the global feature, KK+1 indicates that it starts from the k+1th feature information, and S indicates that it ends at the Sth information; b. For the input feature information, a two-stream Resnet50 network is used to input the VIS-IR features into the proposed multi-branch convolutional generation module to generate more embeddings; Step 2: Construct graph convolutional neural network for feature fusion: (1) Through the graph convolutional neural network, the local feature information extracted in the previous part is fused to obtain the correlation information between different local features. The specific steps are as follows: a. The local feature V l Subtract the global feature Vg to get the difference between the local feature and the global feature. The larger the difference value, the less important the feature information is and the outlier information is. The smaller the difference value, the more similar the local feature is to the global feature, the more important the local feature is and the greater its role is. b. Multiply the obtained difference feature matrix with the predefined graph adjacency matrix to obtain a new adjacency matrix, which is used to represent the relationship between feature points and then added to V l Do matrix multiplication; c. Local feature V l Use the concat method to fuse relational features and obtain the topological graph structure information features with relations, so that it has local features of 13 new key points, which not only have their own feature information, but also carry the feature information of related nodes; (2) The weight is evaluated based on the difference between the local features and the global features obtained from the input information. The joint points that deviate from the global features are occluded information or noise. Thus, an edge weight matrix is obtained to control the transmission of information and obtain local features with small differences. The graph convolution calculation formula is as follows: In the formula, f1 and f2 are two non-shared fully connected layers, A adp represents the adaptive neighbor learning matrix, Represents the input image information. Represents adaptive directed graph convolution input; (3) Cascade from step (2) to form a high-order relation module f R The specific cascade process is to use adaptive graph convolution to cascade. The high-order relationship module is based on the above high-order relationship module. A cross-graph embedding alignment layer is proposed. The alignment layer calculates the similarity based on the cosine similarity and the coefficients of the first-order aligned neighbors of the two nodes. That is, if two nodes in different networks have similar corresponding vertices, it takes two graphs as input, uses the graph matching strategy to learn the corresponding relationship between their nodes, and then regards the learned corresponding relationship as an adjacency matrix to transmit information. (4) Using a two-stream Resnet50 network and a graph convolutional neural network, the VIS-IR features are input into a multi-level feature aggregation mechanism to generate more embeddings; Step 3: Multi-level feature aggregation mechanism: In order to aggregate features from different stages to mine different channel and spatial feature representations, the channel-space multi-stage feature aggregation block is combined to aggregate multi-stage features. At the same time, two types of source features from the channel-space aggregation blocks of each stage of the backbone network are considered, namely, the low-level features before each stage and the high-level feature maps extracted by the backbone network after the stage, and the multi-level feature aggregation mechanism is used for aggregation. The specific steps are as follows: (1) Use three 1×1 convolutional layers Convert f into three compact embeddings and First, channel aggregation is performed, and the channel similarity matrix is calculated as follows, using the self-attention mechanism: In the formula, F softmax It is a classification function that maps the output value range of multiple categories to [0, 1]; pass and M c Matrix multiplication is performed to restore the channel dimension, thereby realizing multi-level feature aggregation of the channel. The formula is as follows: In the formula, w s Represents the aggregation operation of high-level features, f h Represents low-level features; (2) Using the above calculation, we get And the underlying feature map f l Perform spatial feature aggregation operation, the formula is as follows: In the formula, w s and There are two 1×1 convolutional layers, M s is the spatial similarity matrix; Step 4: Loss function optimization: By finding the sum of the loss functions used and minimizing their total value; the specific loss functions used are as follows: (1) Center-guided mining loss function In order to obtain more feature input information and process it, after step 3, the multi-level feature aggregation mechanism generates more embeddings, and then the center-guided mining loss is used to obtain diversified embeddings. The generated embeddings are mainly constrained by the following properties to make them as diverse as possible and effectively reduce the modal differences between VIS images and IR images: Property a: The generated embeddings should be as diverse as possible to effectively learn informative feature representations, thus pushing the distance between the generated embeddings of the same modality and the original embeddings to learn different features and tap into different cross-modal cues; Property b: The generated embeddings should help reduce the modality difference between VIS and IR images, thus bringing the embeddings generated from the VIS modality closer to the original IR embeddings; and similarly, bringing the embeddings generated from the IR modality closer to the original VIS embeddings; Attribute c: The intra-class distance should be smaller than the inter-class distance. Therefore, when shortening the distance, the intra-class distance should be kept smaller than the inter-class distance. The formula is as follows: In the formula, denotes the Euclidean distance between two embeddings, f v and f n are the raw embeddings from the VIS and IR modalities, is the embedding generated by the i-th branch from the VIS modality; "+" means if the result in the brackets is positive, then take the positive value, if it is negative, then take the opposite number; The above formulas for attribute a, attribute b and attribute c can be expressed as follows: Its purpose is to pull the generated embedding towards the embedding of the original IR to reduce the modality difference between the two; Push the generated embedding away from the VIS embedding so that Ability to learn informative feature representations; Make the intra-class distance smaller than the inter-class distance; Each class is represented by a center point, and the corresponding point position is represented by its center point position, that is, using C n and C v Indicates that the corresponding generated embedding center is more discriminative, and the marginal term α is used to balance the previous three terms. The formula becomes: Similarly, for the class center loss of the embedding generated by IR, it is expressed as: Finally, the center-guided mining loss function is organized as: (2) Orthogonal loss function To ensure that the embeddings generated by different branches can capture different information feature representations, different embeddings generated by different branches are forced to be orthogonal to minimize overlapping elements. That is, after the embedding is generated, an embedding orthogonalization is performed to ensure the effectiveness of subsequent operations. The formula is as follows: Where m and n are the mth and nth embeddings generated from the original embedding, respectively. The transpose of the mth embedding is multiplied by the nth embedding. The orthogonal loss can force the generated embedding to learn more informative feature representations. (3) Cross Entropy Loss Function Cross entropy loss is also called L ce , if each category in the multi-classification task is analyzed separately, the true distribution P is a binomial distribution with possible values of 0 or 1, and the distribution Q predicted by the network can be understood as the probability that the label is 1. In addition, since each category in the multi-label classification task is independent of each other, the sum of the probability values output by the last layer of neurons in the network is not equal to 1. For one type of task in the multi-label classification task, the cross entropy loss function is: In the formula, m represents the number of categories, y ic represents the sign function, if the true category of sample i is equal to c, it takes 1, otherwise it takes 0, p ic Represents the predicted probability that the observed sample belongs to the category; (4) Triple Entropy Loss Function The triple entropy loss is also called L tri A triplet is a triplet. A sample is randomly selected from the training data set, which is called Anchor. Then a sample belonging to the same class as Anchor and a sample of a different class are randomly selected. These two samples are called Positive and Negative respectively. By minimizing these four losses L total The sum of , jointly optimizes the network in an end-to-end manner, and the total loss formula is as follows: L total =L cpm +L ort +λ1L ce +λ2L tri ; In the formula, λ1 and λ2 represent coefficients. In the model design, they are taken as 0.8 and 0.01 respectively. During the training process, the value of the loss function is continuously converged.
2. The cross-modal pedestrian re-identification method for intelligent security according to claim 1, characterized in that: In step 1, the VIS-IR features are input into the proposed multi-branch convolutional generation module to generate more embedding steps: (1) For each branch of the multi-branch convolutional generation module, three 3×3 expansion convolutional layers are used, which have different expansion ratios, 1, 2, and 3 from top to bottom, to reduce the number of feature maps f to 1 / 4 of its own size. The various small feature maps obtained are combined into a new large feature map F, and the ReLU activation layer is used to improve the nonlinear representation ability of the diversified embedding expansion module, and finally fed to the convolutional layer θ 1×1 , the kernel size is 1×1, and the embedding feature with the same dimension as f is obtained. The embedding function is as follows: In the formula, To perform convolution on the function, 3×3 represents the convolution kernel size of 3, and the upper right subscripts 1, 2, and 3 represent the first 3×3 convolution, the second 3×3 convolution, and the third 3×3 convolution respectively; (2) All outputs are output together through the function cat as the input of the next stage of the backbone network.
