A pedestrian re-identification image processing method and system

By combining global average pooling and global max pooling, the saliency and nonlinear representation of the pedestrian re-identification feature map are enhanced, solving the problems of high computational cost and lack of saliency information in existing technologies, and achieving efficient pedestrian re-identification.

CN115273142BActive Publication Date: 2026-04-10UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2022-07-04
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

In existing pedestrian re-identification technologies, most attention modules use global average pooling, which leads to a lack of saliency information, high computational cost, complex design, and excessive consumption of computational resources.

Method used

We employ a combination of global average pooling and global max pooling, using complementary weighting to fuse global and local saliency information. We enhance channel feature dependencies using squeeze-excitation operations and control computational load through CRB and CBS composite convolutional layers, multiplying channel by channel to enhance feature maps.

Benefits of technology

It improves the accuracy of pedestrian re-identification, reduces the amount of computation, enhances the saliency and nonlinear expressive power of feature maps, and reduces the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115273142B_ABST
    Figure CN115273142B_ABST
Patent Text Reader

Abstract

The application discloses a kind of pedestrian re-identification image processing method and system, the system includes self-supervised re-labeling block and neural network model, the self-supervised re-labeling block includes image input module, average pooling module, maximum pooling module, first extrusion-stimulating module, second extrusion-stimulating module, third extrusion-stimulating module, weighted fusion module, CRB composite convolution module and image output module;The method is realized based on system.This application aggregates the spatial information of the feature map to be processed by the way of combining average pooling and global pooling, and simultaneously fuses global average information and local saliency information by complementary weighting, can infer more fine channel attention mask, thereby enhancing the interdependence between channel features and obtaining feature-enhanced feature map, while the whole processing process also effectively controls the increase of calculation amount.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of image processing, and particularly relates to a pedestrian re-identification image processing method and system. BACKGROUND

[0002] Person Re-identification (Re-ID for short) is a technology that aims to solve the matching problem of the same pedestrian at different times and different places according to the whole body information of the pedestrian. It can make up for the visual limitations of fixed cameras and has wide application value in security fields such as supermarkets and airports.

[0003] In the network design of Re-ID, an attention module is often introduced to improve the model's focus on the invariance features of pedestrians across cameras. For example, the patent document with publication number CN111368815A discloses a pedestrian re-identification method based on a multi-component self-attention mechanism. The method first pre-trains a deep convolutional neural network backbone model, then constructs a multi-component self-attention network after branching the backbone model to obtain multi-component self-attention features, then inputs the multi-component self-attention features into a classifier to jointly train the minimum cross-entropy loss and the metric loss, and finally inputs the test set pictures into the trained model to fuse the output component features to obtain the overall features, and realizes pedestrian re-identification through metric sorting. The patent proposes a multi-component self-attention mechanism, and the self-attention module makes the network pay more attention to the regions with discriminative characteristics. The spatial attention module and the channel attention module are integrated into the network in the form of a residual, making the network more robust and stable, and easy to train. However, the existing attention modules have the following defects:

[0004] 1) Most attention modules choose global average pooling to generate weight descriptors for each feature map channel or spatial position. Although the integrity of global information is preserved, the saliency information does not guide the description of the descriptors.

[0005] 2) Most attention modules are too complex, and the most direct manifestation is that the computational load increases significantly. SUMMARY

[0006] The purpose of the present application is to provide a pedestrian re-identification image processing method and system. The present application aggregates the spatial information of the feature map to be processed by combining average pooling with global pooling, and simultaneously fuses global average information and local saliency information through complementary weighting, which can infer more fine channel attention masks, thereby enhancing the mutual dependence between channel features and obtaining feature-enhanced feature maps. At the same time, the whole processing process also effectively controls the increase in computational load.

[0007] To achieve the above object, the technical scheme adopted by the present application is as follows:

[0008] A pedestrian re-identification image processing method, characterized by comprising the following steps:

[0009] Step A: Given a feature map to be processed, use global average pooling and global maximum pooling to aggregate the spatial information of the feature map to be processed respectively, to generate a first spatial context descriptor and a second spatial context descriptor;

[0010] Step B: Perform squeeze-excitation operation on the first spatial context descriptor and the second spatial context descriptor respectively to obtain a first intermediate attention mask and a second intermediate attention mask;

[0011] Step C: Perform adaptive weighted fusion of the first intermediate attention mask and the second intermediate attention mask by combining a weight vector, and then perform feature detail processing on the fused mask through a CRB composite convolution layer to obtain an attention mixed mask;

[0012] Step D: Perform squeeze-excitation operation on the attention mixed mask to obtain an attention final mask;

[0013] Step E: Multiply the attention final mask and the feature map to be processed channel by channel to obtain a feature-enhanced feature map.

[0014] The squeeze-excitation operation consists of two steps of squeeze operation and excitation operation in series, the squeeze operation is used to compress the channel number of the spatial context descriptor to 1 / r of the original, r is a scaling factor, and the excitation operation is used to restore the compressed channel number; wherein the squeeze operation and the excitation operation in step B are realized based on two CRB composite convolution layers respectively, and the squeeze operation and the excitation operation in step D are realized based on a CRB composite convolution layer and a CBS composite convolution layer respectively.

[0015] The CRB composite convolution layer consists of a filter Conv1d, an activation function ReLU and a BN layer, and the CBS composite convolution layer consists of a filter Conv1d, a BN layer and a Sigmoid function.

[0016] In step A, let the feature map to be processed be F, the first spatial context descriptor and the second spatial context descriptor be F avg and F max , then:

[0017]

[0018]

[0019] wherein u(i,j) represents a pixel value at a coordinate (i,j) of the feature map to be processed; C, H and W represent a channel number, a height and a width of the feature map to be processed, respectively.

[0020] In step B, set the first intermediate attention mask and the second intermediate attention mask as F′ avg and F′ max , respectively, then:

[0021]

[0022]

[0023] wherein F sq-ex (·) represents a squeeze-and-excitation operation.

[0024] In step C, set the weight vectors corresponding to the first intermediate attention mask and the second intermediate attention mask as w C×1 and (1 C×1 -w C×1 ), respectively, the fusion mask as F′ fus , and the attention mixed mask as M, then:

[0025]

[0026] M = Conv(F′ fus ), M ∈ R C×1×1

[0027] wherein,

[0028] p i , q i ∈ [0, 1] and p i + q i = 1

[0029]

[0030] wherein · represents a channel-wise multiplication; represents a channel merging operation; - represents a channel-wise subtraction; P, Q represent the weight vectors w C×1 and (1 C×1 -w C×1 ), respectively; p i , q i represent a pair of elements corresponding to the i-th channel in the weight vectors P, Q, respectively; represent a pair of elements corresponding to the i-th channel in the real vectors X avg , X max , respectively, X avg , X maxare two parameter vectors to be learned in actual training; Conv represents a CRB composite convolution layer.

[0031] In step D, set the attention final mask as M', then:

[0032]

[0033] wherein, represents a squeeze-excitation operation.

[0034] In step E, set the feature map of feature enhancement as F', then:

[0035]

[0036] wherein, represents channel-wise multiplication.

[0037] A pedestrian re-identification image processing system, characterized by comprising a self-supervised re-labeling block and a neural network model, the self-supervised re-labeling block comprising an image input module, an average pooling module, a maximum pooling module, a first squeeze-excitation module, a second squeeze-excitation module, a third squeeze-excitation module, a weighted fusion module, a CRB composite convolution module, and an image output module, wherein,

[0038] The image input module is used for inputting a feature map to be processed.

[0039] The average pooling module is used for aggregating the spatial information of the feature map to be processed and generating a first spatial context descriptor.

[0040] The maximum pooling module is used for aggregating the spatial information of the feature map to be processed and generating a second spatial context descriptor.

[0041] The first squeeze-excitation module is used for performing a squeeze operation and an excitation operation on the first spatial context descriptor respectively, and obtaining a first intermediate attention mask.

[0042] The second squeeze-excitation module is used for performing a squeeze operation and an excitation operation on the second spatial context descriptor respectively, and obtaining a second intermediate attention mask.

[0043] The weighted fusion module is used for adaptively weighting and fusing the first intermediate attention mask and the second intermediate attention mask respectively by combining the weight vectors, and obtaining a fusion mask.

[0044] The CRB composite convolution module is used for performing feature detail processing on the fusion mask, and obtaining an attention mixed mask.

[0045] The third squeeze-excitation module is used for performing a squeeze operation and an excitation operation on the attention mixed mask respectively, and obtaining an attention final mask.

[0046] The image output module is configured to multiply the attention final mask with the feature map to be processed channel by channel to obtain a feature-enhanced feature map.

[0047] The neural network model is configured to process the feature-enhanced feature map and output a recognition result.

[0048] The squeezing operation is configured to compress the channel number of the spatial context descriptor to 1 / r of the original, and the r is a scaling factor, and the excitation operation is configured to restore the compressed channel number; wherein in the first squeezing-excitation module and the second squeezing-excitation module, the squeezing operation and the excitation operation are respectively realized based on two CRB compound convolution layers; in the third squeezing-excitation module, the squeezing operation and the excitation operation are respectively realized based on a CRB compound convolution layer and a CBS compound convolution layer; the CRB compound convolution layer is composed of a filter Conv1d, an activation function ReLU and a BN layer, and the CBS compound convolution layer is composed of a filter Conv1d, a BN layer and a Sigmoid function.

[0049] By adopting the technical scheme, the application has the following beneficial technical effects:

[0050] 1. The pedestrian re-identification image processing method comprises five steps, wherein,

[0051] Step A uses global average pooling and global maximum pooling to aggregate spatial information of the feature map to be processed respectively, and generates a first spatial context descriptor and a second spatial context descriptor; the advantage is that using global average pooling and global maximum pooling at the same time can take into account the integrity and specificity of feature information.

[0052] Steps B and D can enhance the cross-channel information interaction of the descriptor through the squeezing-excitation operation, improve the nonlinear expression ability, so that the channel dependence relationship of the intermediate attention mask is fully interacted, and on the other hand, the channel dimension of the descriptor can be adjusted to effectively control the amount of calculation, and also greatly reduce the amount of calculation of the subsequent filter.

[0053] Step C can determine the importance of the first intermediate attention mask and the second intermediate attention mask according to the actual task through adaptive weighted fusion. The CRB compound convolution layer is used to further process feature details and improve nonlinear expression ability, and to compress the channel dimension of the fusion mask to reduce the amount of subsequent calculation.

[0054] The channel-by-channel multiplication in step E is a feature "re-calibration" process, and the final mask enhances the saliency features of the target in the feature map to be processed and suppresses unimportant features.

[0055] In summary, the application adopts a combination of average pooling and global pooling, which can infer finer channel attention masks and recalibrate the channel direction of feature responses in a complementary weighting manner, thereby enhancing the interdependence between channel features and mining and constructing the invariance characteristics of the target itself. On the other hand, in order to alleviate the increase in computational complexity, the features can be transmitted through the "squeeze-excitation" operation, which can not only perform nonlinear processing on the features but also control the number of channels of the feature map, thereby significantly constraining the computational cost.

[0056] 2. The application can enhance the feature richness of each mask through the squeeze-excitation operation, while effectively controlling the increase in computational complexity.

[0057] In addition, the squeeze operation and the excitation operation in step B are respectively realized based on two CRB composite convolution layers, and the squeeze operation and the excitation operation in step D are respectively realized based on a CRB composite convolution layer and a CBS composite convolution layer. It should be noted that the CRB composite convolution layer is composed of a conventional layer in the order of Conv1d-->ReLU-->BN, which mainly has the function of adjusting the channel dimension in addition to processing the features. In particular, the joint use of the filter Conv1d and the activation function ReLU can enable the model to fully learn the nonlinear interaction between channel features, and the BN layer can constrain the data distribution while accelerating the convergence. In addition, the application places the BN layer behind the activation function ReLU, which avoids the non-negative response of ReLU to make the weight layer update in a suboptimal manner. The CBS adopts the order of Conv1d-->BN-->Sigmoid, Conv1d is responsible for processing features and adjusting the channel dimension, the BN layer is used to accelerate the convergence of SR, and the Sigmoid function maps the value of the attention mask to the interval [0, 1] to serve as a recalibration factor (i.e., the final attention mask).

[0058] 3. The first intermediate attention mask and the second intermediate attention mask are adaptively weighted and fused by combining the weight vectors in step C of the application, and the fusion method is Cat (channel merging) rather than Add (element addition), which effectively avoids the problem of feature confusion caused by direct addition.

[0059] 4. The generation of the weight vector and the final attention mask of the application completely depends on the adaptive learning of the network, and the selection of parameters is supervised during the training process, thereby autonomously allocating weights to the first intermediate attention mask and the second intermediate attention mask. BRIEF DESCRIPTION OF DRAWINGS

[0060] Figure 1 The flowchart of the application;

[0061] Figure 2 Schematic diagram of the present application;

[0062] Figure 3 Schematic diagram of the CRB composite convolution layer in the present application;

[0063] Figure 4 Schematic diagram of the squeeze-and-excitation operation in the present application;

[0064] Figure 5 Detailed schematic diagram of the squeeze-and-excitation operation in the present application;

[0065] Figure 6 Schematic diagram of the adaptive weighted fusion in the present application;

[0066] Figure 7 Schematic diagram of the integration scheme of the SR block and the residual unit in ResNet-50 in the present application;

[0067] Figure 8 Detailed configuration diagram of ResNet-50 and SR-ResNet-50 in the present application. DETAILED DESCRIPTION

[0068] Embodiment 1

[0069] The embodiment discloses a processing method for pedestrian re-identification images, as shown in Figure 1 , 2 , which comprises the following steps:

[0070] Step A: Given a feature map to be processed, the spatial information of the feature map to be processed is aggregated using global average pooling and global maximum pooling respectively to generate a first spatial context descriptor and a second spatial context descriptor.

[0071] Specifically, let the feature map to be processed be F, the first spatial context descriptor and the second spatial context descriptor be F avg and F max , respectively, then the first spatial context descriptor and the second spatial context descriptor are generated in the following manner:

[0072]

[0073]

[0074] In the formula, u(i,j) represents the pixel value at the coordinate (i,j) of the feature map to be processed; C, H and W represent the channel number, height and width of the feature map to be processed, respectively.

[0075] Step B: Perform a squeeze-and-excitation operation on the first spatial context descriptor and the second spatial context descriptor respectively, and obtain a first intermediate attention mask and a second intermediate attention mask after completion.

[0076] Specifically, the first intermediate attention mask and the second intermediate attention mask are set to F′ respectively. avg and F′ max The first and second intermediate attention masks are obtained as follows:

[0077]

[0078]

[0079] In the formula, F sq-ex (·) indicates a squeeze-excitation operation; two F's sq-ex The operation process of (·) is the same but the parameters are not shared.

[0080] Regarding the squeeze-excitation operation in this step, it's important to note that it consists of two consecutive steps: a squeeze operation and an excitation operation. The squeeze operation compresses the number of channels in the spatial context descriptor to 1 / r of its original value, where r is a scaling factor. The scaling factor r can be adjusted based on experimental results. The excitation operation restores the compressed number of channels. For example... Figure 4 As shown, it can control the channel dimension by adjusting the scaling factor r, thereby increasing or decreasing the model's capacity. Through the squeeze-excitation operation, the channel dependencies of the attention mask are fully interacted, which also significantly reduces the computational cost of subsequent filters.

[0081] Step C: Adaptively weightedly fuse the first and second intermediate attention masks using the weight vectors respectively, and then process the fused mask through a CRB composite convolutional layer to obtain the attention hybrid mask. For example... Figure 3 As shown, the CRB composite convolutional layer consists of a 1*1 kernel-sized filter Conv1d, an activation function ReLU, and a BN layer. That is, it consists of regular layers in the order of Conv1d-->ReLU-->BN. The 1*1 kernel-sized convolutional layer does not change the size of the feature map. Its main function is to enhance the cross-channel information interaction of the feature map. Feature detail processing mainly refers to processing only a small range of detail information of 1*1 on the feature map each time.

[0082] Specifically, such as Figure 6 As shown, the weight vectors corresponding to the first intermediate attention mask and the second intermediate attention mask are set as w, respectively. C×1 and (1) C×1 -w C×1 The blending mask is F′. fus If the attention blending mask is M, then the attention blending mask is obtained as follows:

[0083]

[0084] M = Conv(F′) fus ),M∈R C×1×1

[0085] in,

[0086] p i ,q i ∈[0,1] and p i +q i =1

[0087]

[0088] In the formula, · indicates multiplication by channel; This indicates a channel merging operation; - indicates channel-by-channel subtraction; P and Q represent the weight vectors w, respectively. C×1 and (1) C×1 -w C×1 ); pi and qi represent a pair of elements corresponding to the i-th channel in the weight vectors P and Q, respectively; Representing real vectors X avg X max The pair of elements corresponding to the i-th channel, X avg X max These are the two parameter vectors to be learned during actual training; Conv represents the CRB composite convolutional layer. During actual training, the weight vectors are broadcast (copied) across spatial dimensions to facilitate element-wise operations in the code.

[0089] It should be noted that this step cleverly introduces the Softmax function during implementation, constraining the network's learned parameters to the interval [0,1], that is:

[0090]

[0091] At this point, the problem of the network learning the weight vectors P and Q is transformed into learning the weights X and Q respectively. avg and X max The learning.

[0092] Step D: Perform a squeeze-excitation operation on the attention mixing mask to obtain the final attention mask.

[0093] Specifically, if we set the final attention mask to M′, then the final attention mask is obtained as follows:

[0094]

[0095] In the formula, denotes the squeeze-excitation operation.

[0096] Step E: multiply the attention final mask with the feature map to be processed channel by channel to obtain a feature-enhanced feature map.

[0097] Specifically, assuming that the feature-enhanced feature map is F', the feature-enhanced feature map is obtained in the following manner:

[0098]

[0099] In the formula, denotes channel-by-channel multiplication.

[0100] Similarly, in the actual training process, the attention final mask M' will first be broadcasted (copied) along the feature map spatial dimension (HxW) to change the dimension R C×1×1 to R C×H×W , so as to perform element-by-element operation.

[0101] In addition, it needs to be explained that the squeeze operation and the excitation operation in step B are respectively implemented based on two CRB composite convolution layers, and the squeeze operation and the excitation operation in step D are respectively implemented based on a CRB composite convolution layer and a CBS composite convolution layer. The CRB composite convolution layer is composed of a filter Conv1d, an activation function ReLU and a BN layer, which is the same as in step C above. The CBS composite convolution layer is composed of a filter Conv1d, a BN layer and a Sigmoid function, that is, a normal layer in the order of Conv1d-->BN-->Sigmoid. It needs to be noted that, as shown in Figure 5 , the same form of squeeze-excitation operation is required in step B and step D, but the parameters of each squeeze-excitation operation are not shared.

[0102] Further, as shown in Figure 5 , in addition to the squeeze-excitation operation in step D, the basic unit of each squeeze-excitation operation is a CRB composite convolution layer as shown in Figure 3 . Preferably, the Conv1d in each CRB composite convolution layer and CBS composite convolution layer is a one-dimensional convolution with a size of 1*1 (which is essentially equivalent to a fully connected layer). In the CRB composite convolution layer, the joint use of the filter Conv1d and the activation function ReLU can enable the model to fully learn the nonlinear interaction between the feature map channels, and the BN layer is responsible for constraining the data distribution while accelerating the convergence. Of course, the kernel size of the filter Conv1d is not limited in the present application, and can be set accordingly according to actual needs.

[0103] In actual implementation of the present embodiment, assuming that the dimension of the input feature map F to be processed is C*H*W, the process experienced by the feature map F is as follows:

[0104] (1) respectively perform global average pooling operation and global maximum pooling operation, respectively obtain the first spatial context descriptor F avg and the second spatial context descriptor F max .

[0105] (2) F avg , F max respectively perform squeeze and excitation operation, respectively obtain the first intermediate attention mask F' avg and the second intermediate attention mask F' max .

[0106] (3) F' avg and F' max respectively and the weight vector P, Q with the dimension of C*1*1 are multiplied channel by channel, and then the results of the two are merged in the channel to obtain the fusion mask F' fus with the dimension of 2C*1*1.

[0107] (4) F' fus performs CRB composite convolution layer operation to obtain the attention mixed mask M with the dimension of C*1*1.

[0108] (5) M performs squeeze and excitation operation to obtain the attention final mask M' with the dimension of C*1*1.

[0109] (6) M' (C*1*1) and F (C*H*W) are multiplied channel by channel to obtain the enhanced feature map with the dimension of C*H*W. In actual training, M' will first be broadcasted (copied) along the spatial dimension to change the dimension to C*H*W, and then multiplied element by element with F with the dimension of C*H*W, and finally the feature-enhanced feature map F' is obtained.

[0110] Compared with the initially input feature map F to be processed, the finally obtained feature-enhanced feature map F' enhances the scale diversity and semantic richness of the feature map to be processed, so as to more accurately obtain the related features in the feature map to be processed.

[0111] Embodiment 2

[0112] The embodiment discloses a pedestrian re-identification image processing system, which comprises a self-supervised recalibration block and a neural network model, wherein the neural network model comprises but is not limited to a VGGNet series, a ResNet series and a MobileNet series neural network model, the self-supervised recalibration (SR) block can be simply referred to as an SR block, and the SR block specifically comprises an image input module, an average pooling module, a maximum pooling module, a first squeeze-excitation module, a second squeeze-excitation module, a third squeeze-excitation module, a weighted fusion module, a CRB composite convolution module and an image output module.

[0113] The image input module is used for inputting a feature map to be processed.

[0114] The average pooling module is used for aggregating spatial information of the feature map to be processed and generating a first spatial context descriptor.

[0115] The maximum pooling module is used for aggregating spatial information of the feature map to be processed and generating a second spatial context descriptor.

[0116] The first squeeze-excitation module is used for performing a squeeze operation and an excitation operation on the first spatial context descriptor respectively and obtaining a first intermediate attention mask.

[0117] The second squeeze-excitation module is used for performing a squeeze operation and an excitation operation on the second spatial context descriptor respectively and obtaining a second intermediate attention mask.

[0118] The weighted fusion module is used for adaptively weighting and fusing the first intermediate attention mask and the second intermediate attention mask by combining a weight vector respectively and obtaining a fusion mask.

[0119] The CRB composite convolution module is used for performing feature detail processing on the fusion mask and obtaining an attention mixed mask.

[0120] The third squeeze-excitation module is used for performing a squeeze operation and an excitation operation on the attention mixed mask respectively and obtaining an attention final mask.

[0121] The image output module is used for multiplying the attention final mask and the feature map to be processed channel by channel to obtain a feature-enhanced feature map.

[0122] The neural network model is used for processing the feature-enhanced feature map and outputting a recognition result.

[0123] It should be noted that the squeezing operation is used to compress the number of channels of the spatial context descriptor to 1 / r of the original, and the scaling factor r needs to be adjusted according to the experimental results to make the SR block play the optimal role in the network model. The excitation operation is used to restore the compressed number of channels; wherein, in the first squeezing-excitation module and the second squeezing-excitation module, the squeezing operation and the excitation operation are respectively realized based on two CRB composite convolution layers; in the third squeezing-excitation module, the squeezing operation and the excitation operation are respectively realized based on a CRB composite convolution layer and a CBS composite convolution layer; the CRB composite convolution layer is composed of a filter Conv1d, an activation function ReLU and a BN layer, and the CBS composite convolution layer is composed of a filter Conv1d, a BN layer and a Sigmoid function.

[0124] The SR block in the embodiment is a plug-and-play feature enhancement module, which can be flexibly inserted into all general backbone networks such as VGGNet series, ResNet series and MobileNet series to form an SRNet instantiation model, and then used for Re-ID tasks.

[0125] For example, if a ResNet-50 network model is used for pedestrian re-identification, the input is a pedestrian picture, and the output is the result of pedestrian re-identification. When the SR block is inserted at a certain position in the ResNet-50, it can be called an SR-ResNet-50 network model, and its mechanism is that when the input information flows through the SR block, the image features will be enhanced, and then the enhanced features continue to be passed back, and the output is the result of pedestrian re-identification. Similarly, the same is true for VGGNet network.

[0126] In the following, the embodiment gives an integration scheme of the SR block and the most general ResNet-50. As shown in the figure, Figure 7 The SR block is inserted into the ResNet-50 after the "nonlinear operation" of the residual unit and before the summation with the "identity mapping branch", and is called SR-ResNet-50, and the detailed configuration is as shown in the figure Figure 8 At this time, the scaling factor r of the SR block in the SR-ResNet-50 is set to 16.

[0127] Similarly, when the SR block is integrated with other general backbone networks, the above similar scheme can be used for construction, but it should be noted that the integration position of the SR block and the setting of the scaling factor r of the SR block need to be adjusted according to the experimental results to make the SR block play the optimal role in the network.

[0128] As can be seen from Table 1, compared with ResNet-50, the accuracy of SR-ResNet-50 on three Re-ID public datasets is improved to different degrees, especially the performance on the Occluded-Duke dataset is improved significantly. Taking the test results on the Occluded-Duke dataset as an example, the SR-ResNet-50 using the SR block improves the Rank-1 by 5.97%, and the calculation amount only increases by 0.052 GFLOPs (taking a single forward propagation of a three-channel color pedestrian image of 256*128 pixels as an example), and the calculation amount only increases by about 1.3%. It is shown that as an exchange for this slight additional calculation burden, the SR-ResNet-50 has a good trade-off between improving the model performance and increasing the model calculation cost, fully proving the effectiveness of the SR block design.

[0129] Table 1 Test results of SR-ResNet-50 and ResNet-50 on three different Re-ID datasets

[0130]

[0131] The above is only a specific embodiment of the present application, any feature disclosed in the specification can be replaced by other equivalent or similar purpose replacement features unless specifically described; all features disclosed or steps in all methods or processes can be combined in any way, except for mutually exclusive features and / or steps.

Claims

1. A pedestrian re-identification image processing method, characterized in that The method comprises the following steps: Step A: Given a feature map to be processed, the spatial information of the feature map to be processed is aggregated using global average pooling and global maximum pooling respectively to generate a first spatial context descriptor and a second spatial context descriptor; Step B: The first spatial context descriptor and the second spatial context descriptor are respectively subjected to squeeze-excitation operation to obtain a first intermediate attention mask and a second intermediate attention mask; Step C: The first intermediate attention mask and the second intermediate attention mask are respectively subjected to adaptive weighted fusion in combination with a weight vector, and then the fused mask is subjected to feature detail processing through a CRB composite convolution layer to obtain an attention mixed mask; Step D: The attention mixed mask is subjected to squeeze-excitation operation to obtain an attention final mask; Step E: The attention final mask is multiplied with the feature map to be processed channel by channel to obtain a feature-enhanced feature map; In step C, the weight vectors corresponding to the first and second intermediate attention masks are set as w C×1 and (1 C×1 - w C×1 ), the fusion mask is , and the attention mixing mask is M, then: wherein, p i , q i ∈[0, 1] and p i + q i =1 where • denotes a channel-wise multiplication; denotes a channel-wise subtraction; P, Q denote weight vectors w C×1 and (1 C×1 - w C×1 ); p i 、 q i denote the corresponding pair of elements in the i-th channel of weight vectors P, Q, respectively; 、 denote the corresponding pair of elements in the i-th channel of real vectors X avg 、 X max , respectively, X avg 、 X max are the two parameter vectors to be learned in actual training; Conv denotes a CRB composite convolution layer. 2.The pedestrian re-identification image processing method of claim 1, wherein: The squeeze-excitation operation is composed of two steps of squeeze operation and excitation operation in series, the squeeze operation is used to compress the channel number of the spatial context descriptor to 1 / r of the original, r is a scaling factor, and the excitation operation is used to restore the compressed channel number; wherein the squeeze operation and the excitation operation in step B are respectively realized based on two CRB composite convolution layers, and the squeeze operation and the excitation operation in step D are respectively realized based on a CRB composite convolution layer and a CBS composite convolution layer. 3.The processing method of pedestrian re-identification image according to claim 2, characterized in that: The CRB composite convolution layer is composed of a filter Conv1d, an activation function ReLU and a BN layer, and the CBS composite convolution layer is composed of a filter Conv1d, a BN layer and a Sigmoid function. 4.The pedestrian re-identification image processing method of claim 1, wherein: In step A, let F be the feature map to be processed, and let F avg and F max then: In the formula, u i j represents the pixel value at the feature map coordinate ( i j ) to be processed;​​​ C, H and W respectively represent the channel number, height and width of the feature map to be processed.

5. The processing method of pedestrian re-identification images according to claim 1, characterized in that: In step B, the first and second intermediate attention masks are set as and then: In the formulae, F sq-ex (·) indicates the extrusion-stimulation operation. 6.The pedestrian re-identification image processing method of claim 1, wherein: In step D, the attention final mask is set as Then: In the formula, represents the extrusion-stimulation operation.

7. The processing method of pedestrian re-identification images according to claim 1, characterized in that: In step E, the feature map of the set feature enhancement is set as Then: In the formula, denotes a channel-wise multiplication.

8. A processing system for pedestrian re-identification images, characterized in that: The method comprises a self-supervised re-labeling block and a neural network model, the self-supervised re-labeling block comprises an image input module, an average pooling module, a maximum pooling module, a first squeeze-excitation module, a second squeeze-excitation module, a third squeeze-excitation module, a weighted fusion module, a CRB composite convolution module and an image output module, wherein, The image input module is used for inputting the feature map to be processed; The average pooling module is used for aggregating the spatial information of the feature map to be processed and generating a first spatial context descriptor; The maximum pooling module is used for aggregating the spatial information of the feature map to be processed and generating a second spatial context descriptor; The first squeeze-excitation module is used for performing squeeze operation and excitation operation on the first spatial context descriptor respectively and obtaining a first intermediate attention mask; The second squeeze-excitation module is used for performing squeeze operation and excitation operation on the second spatial context descriptor respectively and obtaining a second intermediate attention mask; The weighted fusion module is used for adaptively weighting and fusing the first intermediate attention mask and the second intermediate attention mask in combination with a weight vector, and obtaining a fused mask; The CRB composite convolution module is used for performing feature detail processing on the fused mask and obtaining an attention mixed mask; The third squeeze-excitation module is used for performing squeeze operation and excitation operation on the attention mixed mask respectively and obtaining an attention final mask; The image output module is configured to multiply the attention final mask with the feature map to be processed channel by channel to obtain a feature-enhanced feature map. The neural network model is configured to process the feature-enhanced feature map and output a recognition result. In the weighted fusion module, the weight vectors corresponding to the first intermediate attention mask and the second intermediate attention mask are respectively set as w C×1 and (1 C×1 - w C×1 ), the fusion mask is , the attention mixed mask is M, and then: In the first and second squeeze-activation modules, the squeeze operation and the activation operation are respectively implemented based on two CRB composite convolution layers. p i , q i ∈ [0, 1] and p i + q i =1 where • denotes element-wise multiplication; denotes channel merging operation; - denotes element-wise subtraction; P, Q denote weight vectors w C×1 and (1 C×1 - w C×1 ); p i , q i denote the corresponding pair of elements in weight vectors P, Q at the i-th channel, respectively; , denote the corresponding pair of elements in real vectors X avg , X max at the i-th channel, respectively, X avg , X max i.e., the two parameter vectors to be learned in actual training; Conv denotes CRB composite convolution layer.

9. The processing system of pedestrian re-identified images according to claim 8, wherein: In the third squeeze-activation module, the squeeze operation and the activation operation are respectively implemented based on a CRB composite convolution layer and a CBS composite convolution layer. The CRB composite convolution layer is composed of a filter Conv1d, an activation function ReLU and a BN layer. The CBS composite convolution layer is composed of a filter Conv1d, a BN layer and a Sigmoid function.

Citation Information

Patent Citations

  • Pedestrian re-identification method based on multi-component self-attention mechanism

    CN111368815A