A method for visible-infrared cross-modal pedestrian image retrieval based on partitioned perception network

By using the cross-modal local channel attention module and the self-weighted local spatial attention module of the partitioned perception network in pedestrian image retrieval, combined with the cross-modal triplet difficulty loss function, the challenge of pedestrian recognition under changing lighting conditions is solved. Improved pedestrian image retrieval accuracy and recognition capabilities.

CN118015694BActive Publication Date: 2024-10-18HARBIN UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410022752.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-06
Publication Date
2024-10-18
Estimated Expiration
2044-01-06

AI Technical Summary

Technical Problem

Existing technologies have difficulty in accurately identifying pedestrians when lighting conditions change, especially due to the limited detail and color information of infrared images, making the visible-infrared cross-modal pedestrian image retrieval task challenging.

Method used

Using a method based on partitioned perception network, the cross-modal local channel attention module and the self-weighted local spatial attention module are introduced into the dual-stream backbone network, combined with the cross-modal triplet difficulty loss function, to enhance feature extraction and discrimination capabilities. Alleviating modal differences and improving identification accuracy.

Benefits of technology

It effectively alleviates cross-modal and intra-modal differences, improves the accuracy and recognition ability of pedestrian image retrieval, and significantly improves pedestrian identity recognition performance under different lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0004653232370000031
    Figure BDA0004653232370000031
  • Figure BDA0004653232370000033
    Figure BDA0004653232370000033
  • Figure BDA0004653232370000041
    Figure BDA0004653232370000041
Patent Text Reader

Abstract

The present invention discloses a method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network, and belongs to the technical field of pedestrian image retrieval. The method can reduce the modal difference between visible light images and infrared images, and improve the performance of cross-modal pedestrian image retrieval. The method first constructs an instance-level channel attention module and embeds it into a two-stream backbone network to reduce the difference between the two modalities while maintaining feature validity. Secondly, different from the existing horizontal division method, a non-overlapping local segmentation method is proposed to divide the feature map, and a local spatial attention module is integrated in these sub-blocks to achieve the learning of modal consistency representation and enhance the recognition ability of fine-grained features of various parts of the body. In addition, a cross-constrained triple loss function is proposed, which aims to further optimize the modal decoupling ability of the network through inter-modal and intra-modal consistency and pairwise loss construction. Compared with other methods, it has higher accuracy and more robust performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of pedestrian image retrieval, and in particular relates to a method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network. Background Art

[0002] In recent years, many methods based on feature learning have been used for image retrieval, especially in the field of pedestrian image retrieval. However, in practical tasks, when the lighting conditions are poor, most visible light cameras automatically switch to infrared mode to image by measuring the heat radiated outward by the object. To solve this problem, a direct idea is to develop and apply an algorithm that can process both visible light and infrared images. Such an algorithm should have good cross-modal feature learning capabilities so that pedestrians can still be accurately identified when the lighting conditions change. This task is called visible light-infrared cross-modal pedestrian image retrieval task. However, since infrared images capture radiation or wavelengths that cannot be perceived by the human eye, such as infrared rays, etc. Therefore, compared with visible light images, infrared images have limited details and color information, and it is very difficult to extract effective information such as color and lighting, which brings challenges to distinguishing pedestrians of different identities, making visible light-infrared image cross-modality extremely challenging. To address this challenge, we propose a method for visible light-infrared cross-modal pedestrian image retrieval based on partitioned perception networks. Summary of the invention

[0003] To address the above challenges, the present invention provides a method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network, which can focus on the differences between various parts of the body and effectively alleviate cross-modal and intra-modal differences. Two cross-modal local channel attention modules embedded in a two-stream backbone network are used to enhance the weights of specific feature channels, thereby alleviating modal differences; and a self-weighted local spatial attention module is used to divide the input feature map into multiple local regions, which can capture different parts of the person image, such as the head, torso, and legs. The division of local regions helps to focus on fine-grained features and the relationship between regions; in addition, the cross-modal triplet difficulty loss function technology we proposed helps to narrow the distance between cross-modal and intra-modal positive samples, thereby improving the accuracy of identity recognition.

[0004] In an embodiment of the present invention, a method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network is provided, including: defining a triplet difficulty loss objective function, which contains four constraints, respectively ensuring that the feature distance between positive sample pairs within the modality is less than the feature distance between negative sample pairs, the feature distance between positive sample pairs under the same modality is less than the feature distance between negative sample pairs under different modalities, the feature distance between negative sample pairs in the same modality is greater than the feature distance between positive sample pairs in different modalities, and the feature distance between negative sample pairs under cross-modality is greater than the feature distance between positive sample pairs; two cross-modal local channel attention modules embedded in a two-stream backbone network, reducing cross-modal differences through channel attention, while maintaining the validity of sample features by using instance normalization; a self-weighted local spatial attention module, which is used to divide the input feature map into multiple local spatial regions. These local spatial regions can capture different parts of a person's image, such as the head, torso, and legs. The differences between body parts are emphasized based on the local spatial attention weights, thereby increasing the weights of related features.

[0005] Furthermore, the steps for defining the objective function of the method for defining visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network are as follows:

[0006] In order to minimize the feature distance between samples of the same type and maximize the feature distance between samples of different types, a triplet constraint is introduced. Each triplet consists of an anchor sample, a positive sample, and a negative sample:

[0007]

[0008] where N is the number of triplets, D(·,·) is a Euclidean distance function used to measure the distance between feature representations, and fa i , fp i and are the feature representations of the anchor sample, positive sample, and negative sample of the i-th triplet, respectively, and α is an interval used to enforce the separation between positive and negative samples. In fact, the triplet loss encourages positive samples to be close to the anchor sample, while pushing negative samples away from the anchor sample.

[0009] Furthermore, the first part of the objective function emphasizes the following constraint: within the same modality, the feature distance between positive sample pairs should be smaller than the distance between negative sample pairs, ensuring the consistency of features within the same modality and enhancing the model's ability to capture intra-modality differences. We call this part the intra-modality identity loss:

[0010]

[0011] The second part of the objective function forces the feature distance of positive image pairs within the same modality to be smaller than the feature distance of negative image pairs across different modalities, so that the model will focus on relatively large intra-modal variations during metric learning. We want the maximum feature distance of the same identity person within the same modality to be smaller than the minimum distance between different persons across different modalities, and this distance must be smaller than a predefined distance ρ1:

[0012]

[0013] The third part of the objective function forces the feature distance between negative pairs within the same modality to be larger than the feature distance between positive pairs across different modalities. This helps enhance the model's ability to perceive differences between modalities, thereby helping to reduce cross-modal variation while maintaining high discrimination. We hope that for the same person, the maximum distance between different modalities is smaller than the minimum distance between different people within the same modality, and this distance is smaller than a predefined distance ρ1:

[0014]

[0015] The fourth part of the objective function targets specific samples where both positive and negative samples come from different modalities. This further encourages the model to learn feature expressions with cross-modal generalization capabilities and enhances the model's robustness to different modalities. We hope that when both positive and negative samples are in cross-modal situations, the maximum distance of the same identity is still smaller than the minimum distance of different identities, and this distance is smaller than the predefined distance ρ1:

[0016]

[0017] Furthermore, the four constraints of the objective function are summed up to obtain the complete objective function, as shown in the following formula:

[0018] L=L IMI +L IMP +L CMC +L CMIC

[0019] Furthermore, the steps of defining two cross-modal local channel attention modules embedded in a two-stream backbone network for the method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network are as follows:

[0020] The channel attention mechanism is integrated into ResNet50. The goal is to enhance the model's attention to different channels so that it can adaptively select and emphasize important feature channels. By integrating the channel attention mechanism, the model can pay more attention to key feature channels, which helps optimize the feature extraction process, as shown in the following formula:

[0021]

[0022] First, input the image into the ResNet-50 backbone network to obtain the features Where h, w, c represent the height, width and number of channels of the feature matrix respectively. Global average pooling and maximum pooling are performed on the input feature F in the spatial domain to obtain two 1×1×c channel features.

[0023] Then, they are input into the same Multi-layer Perceptron (MLP) network. To reduce computational complexity, the MLP network consists of two convolutional layers: Reduce the number of channels to And use ReLU (rectified linear unit) as the activation function. The second convolutional layer The number of channels is restored to c. Finally, two features are obtained by element-by-element addition, and the channel mask is obtained through the Sigmoid activation function.

[0024] Next, the Hadamard product of the result of feature F input to InstanceNorm2d and the mask Mc is calculated, and the Hadamard product of feature F and mask Mc is calculated. Finally, the residual connection is used to combine these two calculation results to obtain the output, so that the network can selectively enhance features with higher weights and suppress features with lower weights. The expression of the above operation is:

[0025] Z=Mc⊙F+Mc⊙IN(F)

[0026] Where ⊙ represents the Hadamard product of two matrices. This operation can make the model pay more attention to the features related to the task and enhance the robustness to noise or irrelevant information.

[0027] Furthermore, the steps of defining a self-weighted local spatial attention module of a partitioned perception network model of the method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network are as follows:

[0028] Given that the importance of features at different locations may vary, some spatial features may be more important for the task, while other features may be relatively unimportant. The goal of the self-weighted local spatial attention module is to identify the importance of features in different regions and locations, so that the model can more effectively focus on local features relevant to the task, as shown in the following formula:

[0029]

[0030] We let the global feature map output by the backbone network be Perform average pooling and maximum pooling on the channel dimension respectively to obtain Favg and This way the model will focus on features with more important spatial shapes, where F avg , We will F avg and F max Connect them together to get a feature map with spatial information To further capture the importance of features at different positions, we divide the height and width dimensions into segments of size Sp*Sp, where j represents the jth position block in Fs. Next, F s,j Through j 3×3 convolutions, denoted as conv j , and apply the sigmoid activation function to get the regional attention weight. Finally, concatenate the results to get Each F s,j Restore to its original position and splice together to get

[0031] Furthermore, we perform element-wise multiplication of the attention weights with the original features to obtain block-based spatially refined feature weights. This enhances the model's focus on important features and suppresses responses to irrelevant features, thereby improving the discriminative ability of cross-modal person re-identification, as shown in the following formula:

[0032] F′=F w ⊙F g +F w ⊙IN(F g )

[0033] Furthermore, F′ is input into two modality-specific fully connected classifiers respectively, and the features are classified according to their identities using the identity loss function, as shown in the following formula:

[0034]

[0035] Among them, L id represents the identity loss, n is the number of visible light images in the training sample, m is the number of infrared images, is the class label of the i / jth sample, C v / r is a modality-specific classifier, is the feature representation of the i / jth sample.

[0036] The extracted features are calculated with the Euclidean distance of others, and then sorted by distance to get the rank accuracy.

[0037] The present invention provides a method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network, which has the following advantages:

[0038] (1) We designed a cross-modal local channel attention module. By combining the channel attention mechanism and instance normalization, we enhanced the model's attention to different channels and optimized the feature extraction process, thereby improving the network's expressiveness and discrimination capabilities.

[0039] (2) We design a self-weighted local spatial attention module to simulate the importance of features at different positions, enabling the model to more effectively focus on task-related local features and further improve the discriminative ability of cross-modal person re-identification.

[0040] (3) In addition, we propose a cross-modal triplet difficulty loss function to reduce the distance between cross-modal and intra-modal positive samples, thereby improving the model's identity recognition ability. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0042] Figure 1 It is a flow chart of a method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network provided by the present invention;

[0043] Figure 2 It is a structural diagram of a partition perception network method for cross-modal pedestrian re-identification in visible light-infrared images provided by the present invention;

[0044] Figure 3 It is a structural diagram of a cross-modal local channel attention module provided by the present invention;

[0045] Figure 4 It is a structural diagram of a self-weighted local spatial attention module provided by the present invention; DETAILED DESCRIPTION

[0046] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0047] The present invention provides a method for visible light-infrared cross-modal pedestrian image retrieval based on a partitioned perception network. Taking the SYSU-MM01 dataset as an example, the method steps are as follows:

[0048] Step S1: Get the SYSU-MM01 dataset, including the original data X and label Y, and modify the image size to (384, 128, 3).

[0049] Step S2: Divide the experimental data and label data into a training set (11096) and a test set (10578).

[0050] Step S3: Based on ResNet50, a two-stream backbone network is constructed to process visible light and infrared images respectively. The first layer of ResNet50 is used as a specific modality layer, that is, the visible light modality and infrared modality weights have independent weights, and the weights of the last four layers are shared. A cross-modal local channel attention module is added to the second and third layers of ResNet50.

[0051] Step S4: Construct a self-weighted local spatial attention module and objective function.

[0052] Step S5: Input the training set into the network to generate global features, each feature size is (2048, 24, 8).

[0053] Step S6: Use the Adam optimizer to optimize the model, with an initial learning rate of 0.00035. The learning rate decays at the 70th, 110th, and 130th time points with a decay coefficient of 0.1. The entire learning process lasts for 140 epochs.

[0054] Step S7: Using the minibatch method, we randomly select 8 identities and randomly sample 4 visible light images and 4 infrared images for each identity. Then, we perform 10-pixel zero padding, followed by random flipping, cropping, and random erasing. In order to be close to the aspect ratio of the human body in the original image, we set the aspect ratio of the image to 3:1, so all input images are resized to 384x128 pixels and passed into the network to start training.

[0055] Step S8: Match the final extracted features and calculate the loss value in combination with the training labels. Use the gradient descent algorithm to train the network, using the default configuration of Adam. The training ends when the loss value drops to the minimum.

[0056] Step S9: The test set is passed into the network, and the features extracted from the infrared image and the visible light image are used for retrieval, and the matching accuracy is calculated based on the retrieval results.

[0057] Detailed description of the invention Results

[0058] This implementation uses two publicly available data sets. The details of the data sets are described as follows:

[0059] The SYSU-MM01 dataset includes visible and infrared images of 491 identities from 6 cameras, providing a total of 287,628 visible light images and 15,792 infrared images.

[0060] The RegDB dataset includes a training set and a validation set, each of which consists of 206 identities. Each identity has 10 infrared images and 10 visible light images, so the training set and validation set have a total of 2,060 infrared images and 2,060 visible light images.

[0061] In order to verify the superiority of this implementation (Ours), this implementation is compared with several existing advanced methods, including DSCSN, DFLN-ViT, AlignGAN, CMDSF and other methods. The classification accuracy of these methods for the above three public datasets will be compared. The specific data comparison is shown in the following table. Table 1 shows the results on the SYSU-MM01 dataset; Table 2 shows the results on the RegDB dataset.

[0062] Table 1 Results of SYSU-MM01 dataset

[0063] method Rank = 1 Rank = 10 Rank = 20 mAP DSCSN 35.10 77.60 88.90 37.40 MSPAC 46.62 87.59 95.77 47.26 FMI 60.02 94.18 98.14 58.80 MCLNet 65.40 93.33 97.14 61.98 DFLN-ViT 59.84 92.49 97.20 57.70 AlignGAN 42.40 85.00 93.70 40.70 CMDSF 59.97 92.84 97.82 57.28 RBDF 57.66 85.85 91.27 54.41 JCCL 57.20 94.30 98.40 59.30 DML 58.40 91.20 96.90 56.10 Our 67.37 95.37 98.90 65.18

[0064] Table 2 Classification results of RegDB dataset

[0065]

[0066]

[0067] By comparing the data in the above table, it can be clearly seen that this method achieves very good performance and significantly improves the retrieval performance.

[0068] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.

Claims

1. A visible light-infrared cross-modal pedestrian image retrieval method based on partitioned perception network, It is characterized in that The method comprises the steps of: The visible light and infrared image datasets are divided into a gallery set and a probe set, respectively. The gallery set consists of samples from two indoor and two outdoor visible light cameras, and the probe set consists of samples from two infrared cameras. Define a cross-modal triplet difficulty loss objective function, which contains four constraints, which are: make the feature distance between positive sample pairs in the same modality smaller than the feature distance between negative sample pairs; make the feature distance between positive sample pairs in the same modality smaller than the feature distance between negative sample pairs in different modalities; make the feature distance between negative sample pairs in the same modality larger than the feature distance between positive sample pairs in different modalities; make the feature distance between negative sample pairs in different modalities larger than the feature distance between positive sample pairs; the role of the above four constraints is to improve the model's ability to learn cross-modal consistency features and identity identification features; Construct two cross-modal local channel attention modules embedded in a two-stream backbone network, which use channel attention to reduce cross-modal differences and use instance normalization to maintain the effectiveness of sample features; Construct a self-weighted local spatial attention module, which divides the input feature map into multiple local spatial regions that can capture different parts of the person image. The module emphasizes the differences between body parts based on the local spatial attention weights, thereby increasing the weights of related features. Based on the features extracted by the network, the Euclidean distance with other pedestrian features is calculated, and then the rank accuracy is obtained by sorting by distance; The expression of the cross-modal local channel attention module is: Input the image into the ResNet-50 backbone network to obtain the features Where h, w, c represent the height, width and number of channels of the feature matrix respectively. Global average pooling and maximum pooling are performed on the input feature F in the spatial domain to obtain two 1×1×c channel features; Then, they are input into the same multi-layer perceptron MLP network. To reduce computational complexity, the MLP network consists of two convolutional layers: Reduce the number of channels to And use the linear rectifier unit ReLU as the activation function, the second convolutional layer Restore the number of channels to c, and finally add the two features element by element, and get the channel mask through the Sigmoid activation function Next, the Hadamard product of the result of feature F input to InstanceNorm2d and the mask Mc is calculated, and the Hadamard product of feature F and mask Mc is calculated; finally, the residual connection is used to combine these two calculation results to obtain the output, so that the network can selectively enhance features with higher weights and suppress features with lower weights. The expression of the above operation is: Z=Mc⊙F+Mc⊙IN(F) Where ⊙ represents the Hadamard product of two matrices. This operation enables the model to pay more attention to task-related features and enhance robustness to noise or irrelevant information.

2. According to the partitioned perception network-based visible light-infrared cross-modal pedestrian image retrieval method of claim 1, It is characterized in that The cross-modal triplet difficulty loss objective function is: (1) The expression of the first part of the objective function is: Where D(·,·) is the Euclidean distance function, which is used to measure the distance between feature representations. Euclidean distance is a commonly used distance measurement method, which is derived from the straight-line distance between two points in Euclidean space. x represents the visible light image, z represents the infrared image, i and j correspond to the same person's identity, k represents the identity of another person, and ρ 1 is an interval used to strengthen the separation between positive and negative samples; (2) The expression of the second part of the objective function is: (3) The expression of the third part of the objective function is: (4) The expression of the fourth part of the objective function is: (5) The overall expression of the objective function is: L=L IMI +L IMP +L CMC +L CMIC .

3. According to claim 1, the visible light-infrared cross-modal pedestrian image retrieval method based on partitioned perception network, It is characterized in that The expression of the self-weighted local spatial attention module is: The global feature map output by the backbone network is Perform average pooling operation AvgPooling and maximum pooling operation MaxPooling on the channel dimension respectively to obtain the pooled feature map F avg and in The pooling operation can make the model pay more attention to the important features of the spatial shape. Finally, concatenate F avg and F max Get a feature map with spatial information In order to further distinguish the importance of features at different positions, the feature map F s Divide into blocks of size Sp*Sp, and get Where j represents F s The j-th block in F s,j Through j 3×3 convolutional layers, where conv j represents the jth convolutional layer. Then, a Sigmoid activation function is used to obtain the block attention weights. s,j Restore to its original position and splice together to get Then, the attention weights are element-wise multiplied with the original features to obtain the block-based spatially refined feature weights, as shown in the following formula: F′=F w ⊙F g +F w ⊙IN(F g ) This operation can enhance the model's attention to important features while suppressing attention to irrelevant features, thereby improving the discriminative ability of the output features for cross-modal pedestrian image retrieval; F′ is input into the fully connected classifiers of the two modalities respectively and trained using the identity loss function. The model processes the visible light and infrared image modalities respectively and fuses the features of the corresponding modalities, so that the complementary information of the visible light and infrared branches can be utilized. The definition of the identity loss function is shown in the following formula: Among them, L id represents the identity loss function, n is the number of visible light images in the training sample, m is the number of infrared images, is the class label of the i / jth sample, C v / r is a modality-specific classifier, is the feature representation of the i / jth sample.

Citation Information

Patent Citations

  • Three-mode pedestrian re-identification method based on instance normalization style fusion module

    CN116503900A