Pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion
By introducing a method of integrating attention mechanism and multi-scale features in pedestrian feature extraction, the problem of insufficient recognition accuracy in the prior art in complex scenarios is solved, and a higher pedestrian recognition accuracy is achieved.
Patent Information
- Application Number
- CN202210226785.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2042-03-09
AI Technical Summary
The existing pedestrian feature extraction methods have low recognition accuracy in complex scenarios such as background occlusion and character occlusion, making it difficult to effectively improve the detection accuracy of pedestrian re-identification.
The pedestrian feature extraction method based on the fusion of attention mechanism and multi-scale features is adopted. By constructing a top-down progressive interactive module and the M-Convolution attention mechanism module, multi-scale features are fused and the attention mechanism is used to enhance feature extraction capabilities.
It improves the accuracy of pedestrian recognition, can handle complex scenarios more effectively, and improves the detection accuracy of pedestrian re-identification.
Smart Images

Figure CN114821631B_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion, which belongs to the technical fields of computer vision, machine vision and deep learning. Background Art
[0002] In recent years, pedestrian re-identification technology has become increasingly mature, making great contributions to the construction of intelligent security systems and smart cities. Pedestrian re-identification technology mainly relies on pedestrian feature extraction.
[0003] In early studies, pedestrian feature extraction relied on a single manual feature design method. In the experiment, Gheissari N et al. used a weighted method to extract pedestrian feature information from HOG feature vectors and performed data enhancement. They used the MIT dataset for model training and algorithm verification, achieving a recognition accuracy of 77%. However, the manual feature design method is relatively complicated, and in complex scenes such as background occlusion and person occlusion, the model feature expression ability is obviously insufficient, which reduces the accuracy of pedestrian feature extraction.
[0004] With the development of deep learning, convolutional neural networks have played a strong role in pedestrian detection, recognition, and tracking with their powerful feature extraction and model expansion capabilities. Subsequently, a large number of derivative algorithms based on convolutional neural networks have been proposed, further improving the accuracy of this framework in pedestrian detection tasks. However, these pedestrian feature extraction methods are still affected by factors such as background occlusion and person occlusion, and the detection accuracy of pedestrian re-identification is still not ideal.
[0005] It can be seen that in order to improve the recognition accuracy of pedestrian re-identification, it is necessary to improve and upgrade the pedestrian feature extraction method. Summary of the invention
[0006] In order to achieve the above-mentioned purpose, the present invention discloses a pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion, and proposes a pedestrian feature extraction network based on attention mechanism and multi-scale feature fusion, including a top-down progressive interaction module and an M-Convolution attention mechanism module, which improves the accuracy of pedestrian recognition and has great practical value.
[0007] The object of the present invention is achieved in that:
[0008] The pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion includes the following steps:
[0009] Step a: Construct a top-down progressive interaction module;
[0010] Step b, construct the M-Convolution attention mechanism module;
[0011] Step c: Setting evaluation indicators;
[0012] Step d: Evaluate the effectiveness of the pedestrian feature extraction method.
[0013] The above pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion, step a has the following specific steps:
[0014] Step a1: Input pedestrian image, use residual network Resnet50 to complete feature convolution calculation, and generate four feature maps, {C 2 ,C 3 ,C 4 ,C 5} represents the four feature maps;
[0015] Step a2: The adjacent feature maps at the lower level {C 4 ,C 5}Perform cross-scale non-local feature operations and fuse the repeated pedestrian feature information to obtain a feature map
[0016] The cross-scale non-local feature operation formula is as follows:
[0017]
[0018]
[0019]
[0020] f(F i )=W f F i
[0021] g(G j )=W g G j
[0022] θ=W θ G j
[0023] Among them, F and G are two pedestrian feature maps; i, j are the position indexes of feature maps F, G, and y; ∑ is the summation symbol; φ is the similarity calculation function for dot multiplication; θ is the pedestrian feature conversion function; G j To generate a new pedestrian feature map; y i is the pedestrian feature information; σ(F,G) is a scalar function; r*r is the size of the patch area; δ(r) is the neighborhood size; W f , W g , W θis a linear embedding function that realizes the transformation from vector to scalar; e is a natural constant; T is the transposition symbol; f(F i ) T g(G j ) is the point product similarity calculation formula;
[0024] Step a3: feature map And the feature map {C 3}Perform cross-scale non-local feature operations again, and fuse the repeated pedestrian feature information again to obtain the feature map
[0025] Step a4: After cascading and upsampling operations on the obtained feature map, it is input into the attention mechanism module.
[0026] The above pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion, step b has the following specific steps:
[0027] Step b1: Capture features in the two dimensions of channel and space through the CBAM network model structure to obtain feature map A; the specific steps are as follows:
[0028] Step b1-1, perform feature capture on the CBAM network channel attention submodule;
[0029] Step b1-2: perform feature capture on the CBAM network spatial attention submodule;
[0030] Step b2: Calculate the correlation between feature maps and add attention weight K, and output a pedestrian feature map, wherein the pedestrian feature includes the number of retrieved pedestrian images, the number of output channels, and the height and width of the output pedestrian feature map;
[0031] The output pedestrian feature formula is as follows:
[0032]
[0033] AK=F 2 (A,K)=K+A⊙K
[0034] Where I, K and O represent the input pedestrian features, weights and output pedestrian features in the pedestrian re-identification convolutional network respectively; l = 0,...,N-1; m = 0,...,H-1; n = 0,...,W-1; o = 0,...,c 1 -1; p=0,...,c 2 -1; are input features; N, c 1 , H and W are the number of retrieved pedestrian images, the number of input channels, and the height and width of the input features, respectively; is the weight; is the output feature; c 2 , h and w are the number of output channels, the height and width of the output pedestrian feature map respectively; is the pedestrian feature of the attention mechanism; ⊙ represents the Hadamard product; represents the convolution operation; ∑ is the summation symbol; F 1 、F 2 is a function;
[0035] Step b3: downsample the feature map processed by the attention mechanism module by 0.5 times to obtain the predicted feature map {P 2 ,P 3 ,P 4 ,P 5 ,P 6}.
[0036] The specific steps of step c of the above pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion are as follows:
[0037] Step c1, drawing a cumulative matching curve CMC diagram;
[0038] Step c2: Use the mean average precision mAP, the first hit rate Rank-1, and the fifth hit rate Rank-5 in the cumulative matching curve CMC as the measurement indicators of the feature extraction method; the specific steps are as follows:
[0039] Step c2-1, calculate the accuracy P(k,A) of each query pedestrian image; the calculation formula is as follows:
[0040]
[0041] Among them, k represents the first k pedestrian sorting results returned; k c represents the number of positive samples among k pedestrians; A is the query image; P is the accuracy;
[0042] Step c2-2: Calculate the average AP(A) of each query pedestrian image; the calculation formula is as follows:
[0043]
[0044] Where M is the number of pedestrian images with the same label as the query image A in the candidate pedestrian image library; j is the position index of the M positive pedestrian samples in the returned sorting results;
[0045] Step c2-3, calculate the mean average precision mAP; the calculation formula is as follows:
[0046]
[0047] Where N is the number of retrieved pedestrian images;
[0048] Step c2-4, calculate the first hit rate Rank-1 and the fifth hit rate Rank-5; the calculation formula is as follows:
[0049]
[0050]
[0051] Among them, cn-1 represents the number of times the first-ranked detection result in N queries is a correct pedestrian object; cn-5 represents the number of times the fifth-ranked detection result in N queries is a correct pedestrian object.
[0052] The above pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion, step d has the following specific steps:
[0053] Step d1: Use the hard sample sampling triplet loss to adjust the network; the calculation formula is as follows:
[0054]
[0055] Among them, L ID is the label smoothing classification loss; L trihard is the triplet loss for difficult sample sampling; b represents the number of training samples per batch; ||f Hi -f Pi || 2 represents the distance between two pedestrian features; H and P are samples of the same pedestrian; H and N represent samples of different pedestrians; α represents the distance interval;
[0056] Step d2: Train on the Market-1501 and DukeMTMC-reID datasets using three pedestrian feature extraction methods: Resnet50+feature map pyramid network FPN, Resnet50+feature map pyramid network FPN+M-convolution, and Resnet50+MPN.
[0057] Step d3: Compare the three measurement indicators of mean average precision (mAP), first hit rate Rank-1, and fifth hit rate Rank-5 to evaluate the effectiveness of the pedestrian feature extraction method.
[0058] Beneficial effects:
[0059] The present invention designs a pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion, and proposes a pedestrian feature extraction network based on attention mechanism and multi-scale feature fusion, including a top-down progressive interaction module and an M-Convolution attention mechanism module, which improves the accuracy of pedestrian recognition and has great practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] Figure 1 This is a top-down progressive interaction module structure diagram.
[0061] Figure 2 This is the structure diagram of the residual network Resnet50.
[0062] Figure 3 Schematic diagram of bilinear interpolation method.
[0063] Figure 4 This is the module structure diagram of the M-Convolution attention mechanism.
[0064] Figure 5 This is the structural diagram of the CBAM network model.
[0065] Figure 6 This is the structure diagram of the channel attention submodule.
[0066] Figure 7 This is the structure diagram of the spatial attention submodule.
[0067] Figure 8 Schematic diagram of the working principle of feature map pyramid network FPN.
[0068] Fig. 9 Cumulative matching curve (CMC) graph obtained by training three extraction methods on the Market-150 dataset.
[0069] Fig.10 Cumulative matching curve CMC graph obtained by training three extraction methods on the DukeMTMC-reID dataset. DETAILED DESCRIPTION
[0070] The specific implementation modes of the present invention are further described in detail below with reference to the accompanying drawings.
[0071] The pedestrian feature extraction method based on the attention mechanism and multi-scale feature fusion of the present invention comprises the following steps:
[0072] Step a: Construct a top-down progressive interaction module;
[0073] Step b, construct the M-Convolution attention mechanism module;
[0074] Step c: Setting evaluation indicators;
[0075] Step d: Evaluate the effectiveness of the pedestrian feature extraction method.
[0076] Among them, the top-down progressive interaction module structure diagram is as follows Figure 1 As shown, the specific steps of step a are as follows:
[0077] Step a1: Input pedestrian image, using Figure 2 The residual network Resnet50 shown in the figure completes the feature convolution calculation and generates four feature maps, {C 2 ,C 3 ,C 4 ,C 5} represents the four feature maps;
[0078] Step a2: The adjacent feature maps at the lower level {C 4 ,C 5}Perform cross-scale non-local feature operations and fuse the repeated pedestrian feature information to obtain a feature map
[0079] The cross-scale non-local feature operation formula is as follows:
[0080]
[0081]
[0082]
[0083] f(F i )=W f F i
[0084] g(G j )=W g G j
[0085] θ=W θ G j
[0086] Among them, F and G are two pedestrian feature maps; i, j are the position indexes of feature maps F, G, and y; ∑ is the summation symbol; φ is the similarity calculation function for dot multiplication; θ is the pedestrian feature conversion function; G j To generate a new pedestrian feature map; y i is the pedestrian feature information; σ(F,G) is a scalar function; r*r is the size of the patch area; δ(r) is the neighborhood size; W f , W g , W θis a linear embedding function that realizes the transformation from vector to scalar; e is a natural constant; T is the transposition symbol; f(F i ) T g(G j ) is the point product similarity calculation formula;
[0087] Step a3: feature map And the feature map {C 3}Perform cross-scale non-local feature operations again, and fuse the repeated pedestrian feature information again to obtain the feature map
[0088] Step a4: After cascading and upsampling the obtained feature map, input it into the attention mechanism module;
[0089] Among them, the cascade operation can be understood as the merging of the number of channels. After the cascade operation, the features of the image itself are increased, but the information under each feature is not increased; the calculation formula is as follows:
[0090] c=c A +c B
[0091] The upsampling operation is performed as follows Figure 3 The bilinear interpolation method shown is used to complete the interpolation in the x direction. The calculation formula is as follows:
[0092]
[0093]
[0094] Then interpolate in the y direction to calculate the grayscale value of point P. The calculation formula is as follows:
[0095]
[0096] In step a4, f(Q xx ) represents the gray value of a certain point; Q 12 The coordinates are (x 1 ,y 2 );Q 22 The coordinates are (x 2 ,y 2 );Q 11 The coordinates are (x 1 ,y 1 );Q 21 The coordinates are (x 2 ,y 1 ); f(R x ) is the gray value obtained by interpolation in the x direction; f(x,y) is the gray value obtained by bilinear interpolation; c Ais the number of channels of feature map A, c B is the number of channels of the feature map B, and c is the number of channels of the feature map after cascading.
[0097] Among them, the M-Convolution attention mechanism module structure diagram is as follows Figure 4 As shown, the specific steps of step b are as follows:
[0098] Step b1: In the two dimensions of channel and space, Figure 5 The CBAM network model structure shown in the figure is used to capture features and obtain feature map A. The specific steps are as follows:
[0099] Step b1-1, perform feature capture on the CBAM network channel attention submodule;
[0100] The input feature map is subjected to global maximum pooling and global average pooling operations respectively to obtain two feature maps, which are then input into the two-layer neural network MLP and finally output after element-wise operation and sigmoid activation operation. Figure 6 Channel attention feature map shown;
[0101] Step b1-2: perform feature capture on the CBAM network spatial attention submodule;
[0102] The output feature map of the channel attention submodule is used as the input feature map of this submodule. First, it undergoes global maximum pooling and global average pooling operations in sequence to obtain two feature maps. Then, it undergoes a cascade operation, and then a convolution operation to generate a feature map with a channel number of 1. Then, it undergoes a sigmoid activation operation to output as follows: Figure 7 The spatial attention feature map shown in the figure, finally, the input feature map and the output feature map of the spatial attention submodule are multiplied element by element to output the feature map A;
[0103] Step b2: Calculate the correlation between feature maps and add attention weight K, and output a pedestrian feature map, wherein the pedestrian feature includes the number of retrieved pedestrian images, the number of output channels, and the height and width of the output pedestrian feature map;
[0104] The output pedestrian feature formula is as follows:
[0105]
[0106] AK=F 2 (A,K)=K+A⊙K
[0107] Where I, K and O represent the input pedestrian features, weights and output pedestrian features in the pedestrian re-identification convolutional network respectively; l = 0,...,N-1; m = 0,...,H-1; n = 0,...,W-1; o = 0,...,c 1 -1; p=0,...,c 2 -1; are input features; N, c 1 , H and W are the number of retrieved pedestrian images, the number of input channels, and the height and width of the input features, respectively; is the weight; is the output feature; c 2 , h and w are the number of output channels, the height and width of the output pedestrian feature map respectively; is the pedestrian feature of the attention mechanism; ⊙ represents the Hadamard product; represents the convolution operation; ∑ is the summation symbol; F 1 、F 2 is a function;
[0108] Step b3: downsample the feature map processed by the attention mechanism module by 0.5 times to obtain the predicted feature map {P 2 ,P 3 ,P 4 ,P 5 ,P 6};
[0109] The downsampling operation is completed through a convolution operation. For example, for an image with a size of M*N, it is downsampled by a factor of s to obtain a resolution image with a size of (M / s)*(N / s).
[0110] Step c: The specific steps are as follows:
[0111] Step c1, drawing a cumulative matching curve CMC diagram;
[0112] Step c2: Use the mean average precision mAP, the first hit rate Rank-1, and the fifth hit rate Rank-5 in the cumulative matching curve CMC as the measurement indicators of the feature extraction method; the specific steps are as follows:
[0113] Step c2-1, calculate the accuracy P(k,A) of each query pedestrian image; the calculation formula is as follows:
[0114]
[0115] Among them, k represents the first k pedestrian sorting results returned; k c represents the number of positive samples among k pedestrians; A is the query image; P is the accuracy;
[0116] Step c2-2: Calculate the average AP(A) of each query pedestrian image; the calculation formula is as follows:
[0117]
[0118] Where M is the number of pedestrian images with the same label as the query image A in the candidate pedestrian image library; j is the position index of the M positive pedestrian samples in the returned sorting results;
[0119] Step c2-3, calculate the mean average precision mAP; the calculation formula is as follows:
[0120]
[0121] Where N is the number of retrieved pedestrian images;
[0122] Step c2-4, calculate the first hit rate Rank-1 and the fifth hit rate Rank-5; the calculation formula is as follows:
[0123]
[0124]
[0125] Among them, cn-1 represents the number of times the first-ranked detection result in N queries is a correct pedestrian object; cn-5 represents the number of times the fifth-ranked detection result in N queries is a correct pedestrian object.
[0126] Step d: The specific steps are as follows:
[0127] Step d1: Use the hard sample sampling triplet loss to adjust the network; the calculation formula is as follows:
[0128]
[0129] Among them, L ID is the label smoothing classification loss; L trihard is the triplet loss for difficult sample sampling; b represents the number of training samples per batch; ||f Hi -f Pi || 2 represents the distance between two pedestrian features; H and P are samples of the same pedestrian; H and N represent samples of different pedestrians; α represents the distance interval;
[0130] Step d2: Train on the Market-1501 and DukeMTMC-reID datasets using three pedestrian feature extraction methods: Resnet50+feature map pyramid network FPN, Resnet50+feature map pyramid network FPN+M-convolution, and Resnet50+MPN.
[0131] Among them, the feature graph pyramid network FPN performs upsampling operations on the top-level pedestrian features and then fuses them with the lower-level features. In addition, the feature prediction of each level is performed separately. The bottom-up part mainly completes the downsampling process through convolution operations; the top-down part completes the upsampling through deconvolution operations; the horizontal connection part realizes the fusion of high-resolution but weak semantic expression features and low-resolution and strong semantic expression features for prediction output. Its working principle is as follows: Figure 8 As shown in the figure, for the feature graph pyramid network FPN+M-convolution method, the attention mechanism module M-convolution is added to the horizontal connection part to reduce useless features and improve the expression ability of effective features.
[0132] Step d3: Compare the three measurement indicators of mean average precision (mAP), first hit rate Rank-1, and fifth hit rate Rank-5 to evaluate the effectiveness of the pedestrian feature extraction method.
[0133] In this embodiment, three pedestrian feature extraction methods, Resnet50+FPN, Resnet50+FPN+M-convolution, and Resnet50+MPN, are used for training on the Market-1501 and DukeMTMC-reID datasets, and then the CMC curves are drawn. The performance of the three methods on the Market-150 dataset is shown in the figure. Fig. 9 As shown in Figure 2, the performance on the DukeMTMC-reID dataset is as follows: Fig.10 shown.
[0134] From the experimental results, Resnet50+Feature Graph Pyramid Network FPN+M-convolution and Resnet50+MPN performed well, indicating that the MPN network uses a top-down progressive interaction module, effectively utilizing the multi-scale information of pedestrian images and improving the accuracy of pedestrian detection. Moreover, on different data sets, the results of Resnet50+MPN are not lower than those of the other two network structures, indicating that the M-Convolution attention mechanism module does not slow down the feature extraction speed due to the increase in the number of network parameters. On the contrary, the suppression of the number of attention maps speeds up the feature extraction speed while also improving the accuracy of pedestrian detection.
[0135] In order to verify the effectiveness of the M-Convolution attention mechanism module and the construction of the top-down progressive interaction module, the three measurement indicators of mean average precision mAP, Rank-1 and Rank-5 are calculated, as shown in Table 1:
[0136] Table 1 Comparison of measurement indicators
[0137]
[0138] Combined with the definitions of Rank-1, mAP, and Rank-5, the effectiveness of the pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion is verified, which has great practical value.
Claims
1. A pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion, characterized in that: The following steps are involved: Step a: Construct a top-down progressive interaction module; the specific steps are as follows: Step a1: input a pedestrian image, use the residual network Resnet50 to complete feature convolution calculation, and generate four feature maps, {C2, C3, C4, C5} represents the four feature maps; Step a2: Perform cross-scale non-local feature operations on the adjacent feature maps {C4, C5} at the lower level, and fuse the repeated pedestrian feature information to obtain the feature map Step a3: feature map The cross-scale non-local feature operation is performed again with the feature map {C3}, and the repeated pedestrian feature information is fused again to obtain the feature map Step a4: After cascading and upsampling the obtained feature map, input it into the attention mechanism module; Step b, construct the M-Convolution attention mechanism module; The specific steps are as follows: Step b1, capturing features in the two dimensions of channel and space through the CBAM network model structure to obtain a feature map A; Step b2: Calculate the correlation between feature maps and add attention weight K, and output a pedestrian feature map, wherein the pedestrian feature includes the number of retrieved pedestrian images, the number of output channels, and the height and width of the output pedestrian feature map; The output pedestrian feature formula is as follows: AK=F2(A,K)=K+A⊙K Where I, K and O represent the input pedestrian features, weights and output pedestrian features in the pedestrian re-identification convolutional network respectively; l=0,...,N-1; m=0,...,H-1; n=0,...,W-1; o=0,...,c1-1; p=0,...,c2-1; is the input pedestrian feature; N, c1, H and W are the number of retrieved pedestrian images, the number of input channels, and the height and width of the input feature respectively; is the weight; is the output pedestrian features; c2, h and w are the number of output channels, the height and width of the output pedestrian feature map respectively; is the pedestrian feature of the attention mechanism; ⊙ represents the Hadamard product; ∑ is the summation symbol; F1 and F2 are functions; Step b3, downsample the feature map after being processed by the attention mechanism module by 0.5 times, and finally obtain the predicted feature map {P2, P3, P4, P5, P6}; Step c: setting evaluation indicators; Step d: Evaluate the effectiveness of the pedestrian feature extraction method.
2. The pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion according to claim 1 is characterized in that: In step a, The cross-scale non-local feature operation formula is as follows: f(F i )=W f F i g(G j )=W g G j θ=W θ G j Among them, F and G are two pedestrian feature maps; i, j are the position indexes of feature maps F and G; ∑ is the summation symbol; φ is the similarity calculation function for dot multiplication; θ is the pedestrian feature conversion function; G j To generate a new pedestrian feature map; y i is the pedestrian feature information; σ(F,G) is a scalar function; r*r is the size of the patch area; δ(r) is the neighborhood size; W f , W g , W θ is a linear embedding function that realizes the transformation from vector to scalar; e is a natural constant; T is the transposition symbol; f(F i ) T g(G j ) is the dot product similarity calculation formula.
3. The pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion according to claim 1 is characterized in that: Step b1: Step b1-1, perform feature capture on the CBAM network channel attention submodule; Step b1-2: perform feature capture on the CBAM network spatial attention submodule.
4. The pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion according to claim 1, characterized in that: Step c: The specific steps are as follows: Step c1, drawing a cumulative matching curve CMC diagram; Step c2: Use the mean average precision mAP, the first hit rate Rank-1, and the fifth hit rate Rank-5 in the cumulative matching curve CMC as the measurement indicators of the feature extraction method; the specific steps are as follows: Step c2-1, calculate the accuracy P(k,A) of each query pedestrian image; the calculation formula is as follows: Among them, k represents the first k pedestrian sorting results returned; k c represents the number of positive samples among k pedestrians; A is the query image; P is the accuracy; Step c2-2: Calculate the average AP(A) of each query pedestrian image; the calculation formula is as follows: Where M is the number of pedestrian images with the same label as the query image A in the candidate pedestrian library; j is the position index of the M positive pedestrian samples in the returned sorting results; Step c2-3, calculate the mean average precision mAP; the calculation formula is as follows: Where N is the number of retrieved pedestrian images; Step c2-4, calculate the first hit rate Rank-1 and the fifth hit rate Rank-5; the calculation formula is as follows: Among them, cn-1 represents the number of times the first-ranked detection result in N queries is a correct pedestrian object; cn-5 represents the number of times the fifth-ranked detection result in N queries is a correct pedestrian object.
5. The pedestrian feature extraction method based on attention mechanism and multi-scale feature fusion according to claim 1, characterized in that: Step d: The specific steps are as follows: Step d1: Use the hard sample sampling triplet loss to adjust the network; the calculation formula is as follows: Among them, L ID is the label smoothing classification loss; L trihard is the triplet loss for difficult sample sampling; b represents the number of training samples per batch; ||f Hi -f Pi ||2 represents the distance between two pedestrian features; H and P are samples of the same pedestrian; H and N represent samples of different pedestrians; α represents the distance interval; Step d2: Train on the Market-1501 and DukeMTMC-reID datasets using three pedestrian feature extraction methods: Resnet50+feature map pyramid network FPN, Resnet50+feature map pyramid network FPN+M-convolution, and Resnet50+MPN. Step d3: Compare the three measurement indicators of mean average precision (mAP), first hit rate Rank-1, and fifth hit rate Rank-5 to evaluate the effectiveness of the pedestrian feature extraction method.
Citation Information
Patent Citations
Pedestrian re-identification method fusing inverse attention and multi-scale depth supervision
CN111325111A
Semantic segmentation method based on feature pyramid attention and mixed attention cascading
CN112651973A