Cross-camera pedestrian re-identification method and device based on multi-scale image restoration

Through multi-scale image recovery and feature extraction fusion technology, the problem of image scale changes in pedestrian re-recognition is solved, and the recognition accuracy and performance are improved.

CN114862920BActive Publication Date: 2025-03-21XIDIAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210466776.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2025-03-21
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

Existing pedestrian re-identification technology is difficult to adapt to irregular changes in image scales, resulting in low recognition accuracy.

Method used

Multi-scale image recovery technology is used to restore lost information from low-quality images, and make full use of the local and global information of the image through multi-scale feature extraction and fusion.

Benefits of technology

It can adapt to irregular changes in image scales in pedestrian re-identification across cameras, improve recognition accuracy, and balance information of different images directly by adding distances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114862920B_ABST
    Figure CN114862920B_ABST
Patent Text Reader

Abstract

The present invention discloses a cross-camera person re-identification method based on multi-scale image restoration, comprising: obtaining a cross-camera query image and performing resolution judgment; performing multi-scale image restoration on a low-resolution image in the query image to obtain a number of high-quality images; performing multi-scale feature extraction and fusion on the high-quality image and the library image to obtain fusion features; and performing comparative analysis on the fusion features and the features of the library image to obtain a pedestrian re-identification result. The method of the present invention can adapt to various irregular changes in image scale, and can make full use of the information of images of different scales to improve the accuracy of pedestrian re-identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision technology, and in particular relates to a cross-camera pedestrian re-identification method and device based on multi-scale image restoration. Background Art

[0002] Computer vision refers to the use of cameras and computers to replace human eyes to identify, track and measure targets, and further perform image processing to make computer processing into images that are more suitable for human observation or transmission to instruments for detection. Its main task is to obtain three-dimensional information of the corresponding scene by processing the collected pictures or videos. The purpose of pedestrian re-identification is to match a specific person in different scenes and camera perspectives. Due to its wide application in pedestrian tracking, video surveillance, intelligent security, etc., it has become a research hotspot in the field of computer vision.

[0003] Traditional person re-identification technology Traditional pedestrian re-identification methods usually assume that the resolution of the gallery image and the query image is high enough, and only consider the effects of partial occlusion, human posture and perspective changes. However, due to the influence of camera hardware and the distance between the camera and the target person, the resolution of the captured pedestrian images often varies greatly. To address this problem, some researchers have proposed cross-resolution pedestrian re-identification, that is, on the traditional pedestrian re-identification dataset, assuming that the query image resolution is lower than the gallery image, and using fixed multiple downsampling to simulate the cross-resolution scenario, and solving this problem through metric learning or introducing super-resolution technology.

[0004] However, in the real world, there is no multiple relationship between gallery images and captured query images, and the scales of pedestrian images captured by different cameras vary greatly. This makes existing methods unable to adapt to various irregular changes in image scales. Either they fail to fundamentally restore the lost details of low-quality images, or they only consider local information when restoring the image, resulting in insufficient recognition accuracy and affecting recognition performance. Summary of the invention

[0005] In order to solve the above problems existing in the prior art, the present invention provides a method and device for cross-camera pedestrian re-identification based on multi-scale image restoration. The technical problem to be solved by the present invention is achieved through the following technical solutions:

[0006] A cross-camera person re-identification method based on multi-scale image restoration, comprising:

[0007] Get cross-camera query images and make resolution determinations;

[0008] Performing multi-scale image restoration on low-resolution images in the query image to obtain a number of high-quality images;

[0009] Performing multi-scale feature extraction and fusion on the high-quality image and the gallery image to obtain fusion features;

[0010] The fusion features are compared and analyzed with the features of the library images to obtain pedestrian re-identification results.

[0011] In one embodiment of the present invention, obtaining a cross-camera query image and performing resolution determination includes:

[0012] Calculate the average pixel point A of the entire data set image according to the following formula;

[0013]

[0014] Among them, h i ,w i is the height and width of the i-th query image, n is the number of images in the entire dataset, and avg represents the average sum of pixels of all images;

[0015] If the pixel points of the query image are lower than the average pixel point A of the entire data set image, the query image is determined to be a low-resolution image; otherwise, the query image is determined to be a high-resolution image.

[0016] In one embodiment of the present invention, performing multi-scale image restoration on a low-resolution image in the query image to obtain a plurality of high-quality images includes:

[0017] Perform feature extraction on the low-resolution query image to obtain a shallow feature image;

[0018] Performing deep feature extraction on the shallow feature image to obtain a deep feature image;

[0019] Build multiple recovery Transformer models with different scales;

[0020] Different restoration Transformer models are used to restore the shallow feature image and the deep feature image respectively, and a plurality of high-quality images are obtained accordingly.

[0021] In one embodiment of the present invention, deep feature extraction is performed on the shallow feature image to obtain a deep feature image, including:

[0022] Constructing a deep feature extractor; wherein the deep feature extractor includes a plurality of residual and sliding window based Transformer blocks and a first convolutional layer, and each of the residual and sliding window based Transformer blocks includes a plurality of sliding window mechanism based Transformer layers and a second convolutional layer;

[0023] The deep feature extractor is used to extract deep features from the shallow feature image to obtain a deep feature image.

[0024] In one embodiment of the present invention, multi-scale feature extraction and fusion are performed on the high-quality image and the gallery image to obtain fusion features including:

[0025] Build several multi-scale feature extraction models and train them;

[0026] Several high-quality images and gallery images of different scales are used as input images of the multi-scale feature extraction model, and different multi-scale feature extraction models are used to extract multi-scale features from the corresponding input images, thereby obtaining multiple sets of features of different scales.

[0027] Each group of features of different scales is fused separately to obtain multiple fused features.

[0028] In one embodiment of the present invention, each of the multi-scale feature extraction models includes a plurality of bottleneck layers of different scales for extracting features of different scales; wherein,

[0029] Each bottleneck layer consists of a 1×1 convolutional layer, a 3×3 depthwise separable convolutional layer, a batch normalization layer, and a rectified linear unit schedule function.

[0030] In one embodiment of the present invention, each group of features at different scales is fused separately to obtain a plurality of fused features, including:

[0031] Construct an aggregation gate network consisting of a non-parametric global average pooling layer and a multi-layer perceptron;

[0032] The aggregation gate network is used to fuse each group of features of different scales to obtain multiple fused features.

[0033] In one embodiment of the present invention, comparing and analyzing the fusion features with the features of the library image to obtain a person re-identification result includes:

[0034] Calculate the distance vector between each fusion feature and the gallery image feature respectively;

[0035] Accumulate the distance vectors between all fusion features and library image features to obtain the accumulated distance value;

[0036] A recognition result is obtained according to the accumulated distance value.

[0037] Another embodiment of the present invention further provides a cross-camera pedestrian re-identification device based on multi-scale image restoration, comprising:

[0038] A preprocessing module, used to obtain cross-camera query images and make resolution judgments;

[0039] A multi-scale image restoration module, used for performing multi-scale image restoration on low-resolution images in the query image to obtain a plurality of high-quality images;

[0040] A multi-feature extraction and fusion module is used to extract and fuse multi-scale features of the high-quality image and the gallery image to obtain fusion features;

[0041] The image recognition module is used to compare and analyze the fusion features with the features of the library image to obtain a pedestrian re-identification result.

[0042] Beneficial effects of the present invention:

[0043] 1. The present invention restores the lost information of low-quality images by introducing multi-scale image restoration technology, which can adapt to the irregular changes of image scale in unconstrained cross-camera pedestrian re-identification. At the same time, multi-scale feature extraction and fusion are adopted to make full use of the local and global information of the image, further improving the performance of cross-camera pedestrian re-identification.

[0044] 2. The present invention calculates the distance between the fused feature images and the library images for fused feature images of different scales respectively, and balances the information of different images by directly adding the distances, so that the recognition result is more accurate.

[0045] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 is a flow chart of a cross-camera pedestrian re-identification method based on multi-scale image restoration provided by an embodiment of the present invention;

[0047] Figure 2 is a framework diagram of a cross-camera pedestrian re-identification method based on multi-scale image restoration provided by an embodiment of the present invention;

[0048] Figure 3 is a data comparison diagram of three different pedestrian re-identification scenarios provided by an embodiment of the present invention;

[0049] Figure 4 It is a structural schematic diagram of a cross-camera pedestrian re-identification method based on multi-scale image restoration provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The present invention is further described in detail below with reference to specific embodiments, but the embodiments of the present invention are not limited thereto.

[0051] Embodiment 1

[0052] See also Figure 1 , Figure 1 : is a flow chart of a cross-camera pedestrian re-identification method based on multi-scale image restoration provided by an embodiment of the present invention, which includes:

[0053] Step 1: Get a cross-camera query image and make a resolution judgment.

[0054] First, in this embodiment, the query image can be obtained by capturing pedestrian images from a real scene using multiple cameras. In addition, a gallery image needs to be obtained for subsequent comparison and recognition.

[0055] Then, after obtaining the query image, it is necessary to determine the resolution of the query image.

[0056] Specifically, in real scenes, since the scales of pedestrian images (i.e., query images) captured by different cameras are quite different, even the pedestrian images captured by the same camera are different, so high-quality and low-quality images often coexist in the obtained query images. In order to ensure that the image quality of the images in the data set is kept at the same level as much as possible after restoration, this embodiment needs to distinguish between low-quality and high-quality images after capturing the query image. Then, multi-scale image restoration is performed on the low-quality query image to obtain a high-quality image with more detailed information.

[0057] In this embodiment, the average number of pixels is mainly used as a threshold to determine whether an image is a low-quality image or a high-quality image, as follows:

[0058] First, calculate the average pixel point A of the entire dataset image according to the following formula;

[0059]

[0060] Among them, h i ,w i is the height and width of the i-th query image, n is the number of images in the entire dataset, and avg represents the average sum of pixels of all images;

[0061] Then, the size of the pixel points of the query image is compared with the above average pixel points. If the pixel points of the query image are lower than the average pixel points A of the entire data set image, the query image is determined to be a low-resolution image, that is, a low-quality image; otherwise, the query image is determined to be a high-resolution image, that is, a high-quality image.

[0062] When the query image is a high-resolution image, you can directly jump to step 3 to perform multi-scale feature extraction and fusion processing on it. If the query image is a low-resolution image, execute step 2 to perform multi-scale image restoration, that is, multi-scale image reconstruction.

[0063] Step 2: Perform multi-scale image restoration on the low-resolution image in the query image to obtain several high-quality images.

[0064] For details, see Figure 2 , Figure 2 : is a framework diagram of a cross-camera pedestrian re-identification method based on multi-scale image restoration provided by an embodiment of the present invention. In this framework, a restoration Transformer is mainly used to restore the image of the pedestrian, which specifically includes the following steps:

[0065] 21) Extracting features from the low-resolution query image to obtain a shallow feature image;

[0066] Specifically, given a low-resolution image x l As input, it first passes through the shallow feature extractor E s (·) Extract shallow features F s , expressed as: F s =E s (x l ).

[0067] In this embodiment, the shallow feature extractor E s (·) can be implemented through a convolutional layer. For the specific implementation method, reference can be made to the existing related technologies, and this implementation will not be described in detail here.

[0068] 22) Perform deep feature extraction on the shallow feature image to obtain a deep feature image.

[0069] First, a deep feature extractor is constructed; wherein the deep feature extractor includes a plurality of residual and sliding window based Transformer blocks and a first convolutional layer, and each of the residual and sliding window based Transformer blocks includes a plurality of sliding window mechanism based Transformer layers and a second convolutional layer.

[0070] For example, in this embodiment, a deep feature extractor E is set D (·) consists of 6 RSTBs (Transformer blocks based on residual and sliding windows) and a convolutional layer. Each RSTB consists of six STL layers (Transformer layers based on sliding window mechanism) plus a convolutional layer, such as Figure 2 shown.

[0071] Each STL layer consists of two normalization layers LayerNorm, a multi-head self-attention layer MSA, and a multi-layer perceptron MLP. The difference between this STL and the original Transformer layer is that it uses a sliding window mechanism. STL first adjusts the input size to Then, standard self-attention is performed on each window. The formula for the whole process is as follows:

[0072] Y=MSA(LN(Y))+Y

[0073] Y=MLP(LN(Y))+Y

[0074] Among them, Y represents a single window feature, MSA refers to multi-head self-attention, LN refers to layer normalization, and MLP refers to multi-layer perceptron.

[0075] Then, a deep feature extractor is used to extract deep features from the shallow feature image to obtain a deep feature image.

[0076] Specifically, through the deep feature extractor E D (·) From the shallow feature F s Get the deep feature F D , expressed as: F D =E D (F s ).

[0077] 23) Construct multiple restoration Transformer models with different scales.

[0078] Since the resolutions of query images and query images and gallery images are very different, it is obviously inappropriate to use the same restoration scale Transformer model for all images. Therefore, this embodiment adopts a multi-scale high-quality image reconstructor to restore images from multiple scales.

[0079] Optionally, as an implementation of the present invention, four scales {2, 3, 4, 8} may be used to restore the image.

[0080] In addition, in order to make the restored image more realistic, this application also optimizes the constructed restoration Transformer model by minimizing the L1 pixel loss, which is expressed as:

[0081]

[0082] Among them, m corresponds to the recovery scale of different Transformers, x l2h,m represents the high-quality image obtained by the restored Transformer with a scale of m, x h For real high quality images.

[0083] 24) Using different restoration Transformer models respectively to perform image restoration on the shallow feature image and the deep feature image, and correspondingly obtaining a plurality of high-quality images.

[0084] Specifically, aggregate shallow features F D and deep features F s As the input of the reconstructor R(·), we get the high-resolution image x l2h , the whole process can be expressed as:

[0085] F s =E s (x l ),F D =E D (F s )

[0086] x l2h =R(F s +F D )

[0087] This embodiment introduces a multi-scale image restoration Transformer to restore the lost information of low-quality images. It can adapt to the irregular changes in image scale in unconstrained cross-camera pedestrian re-identification, realize the complementary advantages of images of different scales, and further improve the recognition accuracy.

[0088] It is understandable that in another embodiment of the present invention, it is also possible not to perform multi-scale Transformer image restoration on the low resolution in the query image, and the multi-scale feature extraction and fusion of step 3 can be directly performed.

[0089] Step 3: Perform multi-scale feature extraction and fusion on high-quality images and library images to obtain fusion features. The specific process is as follows:

[0090] 31) Build several multi-scale feature extraction models and train them.

[0091] In this embodiment, the entire network first restores the image, and then trains the images before and after restoration together. For each input image, different scale Transformers will generate different restored images, i.e., high-quality query images. This will result in a large number of restored images with large differences, and it is impossible to obtain the optimal result using only a single feature extraction network. Therefore, this embodiment creates multiple feature extraction models.

[0092] Specifically, multiple feature extraction models are represented as M1, M2, ..., M r , where each model corresponds to a single scale-restoring Transformer. For each feature extraction model, only the high-quality image obtained by the corresponding scale-restoring Transformer model and the initial high-quality image are used to train it. The specific training process can be referred to the existing related technology, and this embodiment will not be described in detail here.

[0093] It should be noted that when constructing the feature extraction model, in addition to multiple models corresponding to the scale of the restored Transformer model, it is also necessary to build a model for feature extraction of gallery images, and its model structure is the same as that of other models.

[0094] Furthermore, since the image scale and perspective will change significantly in the cross-camera pedestrian re-identification scenario, learning only a single scale feature is obviously not the best choice. Even in the same image, features of different scales focus on different information. In order to achieve the complementary advantages of features of different scales and maximize the information utilization efficiency of restored images of different scales, this embodiment adopts a multi-scale feature learning method for the constructed feature extraction model. Through multi-scale feature learning, it is possible to utilize global and local information in the same image and better adapt to images of different scales.

[0095] Optionally, as an implementation of the present invention, each multi-scale feature extraction model includes multiple bottleneck layers of different scales for extracting features of different scales; wherein,

[0096] Each bottleneck layer consists of a 1×1 convolutional layer, a 3×3 depthwise separable convolutional layer, a batch normalization layer, and a rectified linear unit schedule function.

[0097] Taking computational efficiency into consideration, in this embodiment, the maximum number of bottleneck layers is preferably 4.

[0098] 32) Several high-quality images and gallery images of different scales are used as input images of the multi-scale feature extraction model, and different multi-scale feature extraction models are used to perform multi-scale feature extraction on the corresponding input images to obtain multiple sets of features of different scales.

[0099] Specifically, given an input H, which can be any high-quality image obtained by different restoration Transformer models, a gallery image, or a high-resolution query image, the feature scales obtained after passing through i bottleneck layers are (2i+1)×(2i+1), respectively, and the formula is as follows:

[0100] F i =B i (H)

[0101] Among them B i (·) indicates that the number of bottleneck layers has passed through i consecutively. i Indicates that B i (·) Obtained features.

[0102] 33) Each group of features of different scales is fused separately to obtain multiple fused features.

[0103] In order to better utilize features of different scales and maximize the compatibility and complementary advantages of features of different scales, this embodiment uses a dynamic unified aggregation gate to fuse features.

[0104] First, an aggregation gate network consisting of a non-parametric global average pooling layer and a multi-layer perceptron is constructed.

[0105] Then, the aggregation gate network is used to fuse each group of features of different scales to obtain multiple fused features, which can be expressed as follows:

[0106]

[0107] Where A(·) is an aggregation gate, which is actually a micro-network consisting of a non-parametric global average pooling layer and a multi-layer perceptron. ⊙ represents the Hadamard product, and F H is the multi-scale feature finally obtained.

[0108] Step 4: Compare and analyze the fused features with the features of the library images to obtain the pedestrian re-identification results.

[0109] 41) Calculate the distance vector between each fusion feature and the library image feature respectively.

[0110] 42) Accumulate the distance vectors between all fusion features and library image features to obtain the accumulated distance value.

[0111] 43) Obtaining a recognition result according to the accumulated distance value.

[0112] Specifically, the distance vector between each fusion feature and the feature of the gallery image is represented by D m , where m is the corresponding Transformer recovery scale. Accumulate the distance vectors between all fused features and the features of the gallery image:

[0113]

[0114] Among them, m is the Transformer feature extraction model for the recovery scale of m, and its value can be 1, 2, 3, 4, 8. When m is 1, it represents a gallery image.

[0115] In this embodiment, for fused feature images of different scales, the distances between the fused feature images and the gallery images are calculated respectively, and the information of different images is balanced by directly adding the distances, so that the recognition result is more accurate.

[0116] The present invention restores the lost information of low-quality images by introducing a multi-scale image restoration transformer, which can adapt to the irregular changes in image scale in unconstrained cross-camera pedestrian re-identification. At the same time, multi-scale feature extraction and fusion are adopted to make full use of the local and global information of the image to further improve the performance of cross-camera pedestrian re-identification. Compared with traditional pedestrian re-identification methods, the method of the present invention can adapt to various irregular changes in image scale, and can make full use of the information of images of different scales to improve the accuracy of pedestrian re-identification.

[0117] Embodiment 2

[0118] The method proposed by the present invention is experimentally compared with the existing method to verify the beneficial effects of the present invention.

[0119] 1. The first group of experiments:

[0120] 1.1 Test content:

[0121] The three existing methods and the method of the present invention are compared and tested on the cross-camera dataset MTA-reid. The three existing methods are:

[0122] The existing method is the literature Luo,H.,Gu,Y.,Liao,X.,Lai,S.,&Jiang,W.(2019).Bag of tricks and a strong baseline for deep person re-identification.In Proceedings of the IEEE / CVF conference on computer vision and pattern recognition workshops(pp.0-0). The method proposed in "Strong Baseline" is referred to as Strong Baseline;

[0123] The second existing method is the literature Ye,M.,Shen,J.,Lin,G.,Xiang,T.,Shao,L.,&Hoi,SC (2021).Deep learning for person re-identification:A survey and outlook.IEEE Transactions on Pattern Analysis and Machine Intelligence 》The method proposed is referred to as AGW;

[0124] The third existing method is the literature Chen,T.,Ding,S.,Xie,J.,Yuan,Y.,Chen,W.,Yang,Y.,...& Wang,Z.(2019).Abd-net: Attentive but diverse person re-identification.In Proceedings of the IEEE / CVF International Conference on Computer Vision (pp.8351-8361) 》The method provided by is referred to as ABD.

[0125] The method of the present invention is divided into two experiments. One is that in the specific process of implementing the present invention, only multi-scale feature extraction and fusion technology is used, and MRT (multi-scale image restoration transformer) is not used to restore low-quality images; the other is to use MRT and multi-scale feature extraction and fusion technology at the same time.

[0126] 1.2. Analysis of test results:

[0127] The test results are shown in Table 1.

[0128] Table 1 Comparison of the proposed method and the existing method on the cross-camera dataset MTA-reid

[0129] mAP Rank1 Rank5 Rank10 Method 1: Strong Baseline 25.8 50.5 69.7 74.9 Method 2: AGW 27.7 53.8 71.7 76.5 Method 3: ABD 30.5 56.6 72.4 76.8 The present invention: does not use MRT <![CDATA[ 31.1 ]]> <![CDATA[ 60.0 ]]> <![CDATA[ 73.9 ]]> <![CDATA[ 78.1 ]]> The present invention 35.0 63.8 76.1 80.1

[0130] As shown in Table 1, the method of the present invention is compared with three existing pedestrian re-identification algorithms, and is evaluated using four indicators: Map (average precision mean), Rank1 (probability that the result ranked first is correct), Rank5 (probability that the result ranked fifth is correct), and Rank10 (probability that the result ranked tenth is correct).

[0131] As can be seen from Table 1, on the cross-camera dataset MTA-reid, the Strong Baseline method uses effective training techniques to achieve 25.8%, 50.5%, 69.7% and 74.9% on Map, Rank1, Rank5 and Rank10 respectively. The AGW method designs a weighted generalized mean pooling triplet loss, and achieves 27.7%, 53.8%, 71.7% and 76.5% on mAP, Rank1, Rank5 and Rank10 respectively on this cross-camera dataset. The ABD method achieves 30.5%, 56.6%, 72.4% and 76.8% by integrating the attention module and diversity regularization. Our method achieves 35.0%, 63.8%, 76.1% and 80.1% on mAP, Rank1, Rank5 and Rank10 respectively, which is much higher than the performance of other methods. Among them, mAP is 4.5% higher than the second-best method, and Rank1, Rank5, and Rank10 are 7.2%, 3.7%, and 3.3% higher than the second-best method, respectively.

[0132] In addition, it can be seen from Table 1 that the present invention can achieve results that surpass other methods without using MRT (multi-scale image restoration transformer). It proves that the two parts of the method of the present invention: multi-scale image restoration transformer and multi-scale feature extraction are very effective in solving the problem of cross-camera pedestrian re-identification. Compared with the existing methods, it can significantly improve the accuracy of cross-camera pedestrian re-identification.

[0133] 2. The second group of experiments:

[0134] 2.1 Test content

[0135] The three groups of images are processed respectively using the traditional pedestrian re-identification, the existing cross-resolution pedestrian re-identification and the cross-camera pedestrian re-identification method of the present invention, and the processing results are compared.

[0136] 2.2 Analysis of test results

[0137] See also Figure 3 , Figure 3 This is a data comparison chart of three different pedestrian re-identification scenarios provided by an embodiment of the present invention; wherein the left column comes from the gallery image, and the right column comes from the query image. a) Images from the traditional pedestrian re-identification dataset Market1501. There is basically no difference in resolution, only the perspective has changed. b) Images from the cross-resolution pedestrian re-identification dataset MLR-Market1501, with slightly changed resolution and perspective. c) Images from the cross-camera pedestrian re-identification MTA-reid, with significant changes in the scale and perspective of the image. Figure 3 It can be seen that the method of the present invention is more suitable for real environment.

[0138] Embodiment 3

[0139] Based on the above-mentioned embodiment 1, this embodiment provides a cross-camera pedestrian re-identification device based on multi-scale feature fusion. Figure 4 , Figure 4 is a schematic diagram of the structure of a cross-camera pedestrian re-identification method based on multi-scale image restoration provided by an embodiment of the present invention, which includes:

[0140] Preprocessing module 1, used to obtain cross-camera query images and perform resolution judgment;

[0141] A multi-scale image restoration module 2 is used to perform multi-scale image restoration on the low-resolution image in the query image to obtain a plurality of high-quality images;

[0142] A multi-feature extraction and fusion module 3 is used to extract and fuse multi-scale features of the high-quality image and the gallery image to obtain fusion features;

[0143] The image recognition module 4 is used to compare and analyze the fusion features with the features of the library images to obtain pedestrian re-recognition results.

[0144] The device provided in this embodiment can implement the method provided in the above-mentioned embodiment 1, and the detailed process will not be repeated here.

[0145] Therefore, the device provided in this embodiment can adapt to irregular changes in image scale when performing cross-camera pedestrian re-identification, and can make full use of local and global information of images of different scales, thereby greatly improving the accuracy of pedestrian re-identification.

[0146] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A cross-camera pedestrian re-identification method based on multi-scale image restoration, characterized in that: include: Get cross-camera query images and make resolution determinations; Performing multi-scale image restoration on low-resolution images in the query image to obtain a number of high-quality images; Performing multi-scale feature extraction and fusion on the high-quality image and the gallery image to obtain fusion features; Comparing and analyzing the fusion features with the features of the library image to obtain a person re-identification result; The low-resolution image in the query image is restored using multi-scale images to obtain a number of high-quality images, including: Perform feature extraction on the low-resolution query image to obtain a shallow feature image; Performing deep feature extraction on the shallow feature image to obtain a deep feature image, including: constructing a deep feature extractor; wherein the deep feature extractor includes a plurality of residual and sliding window-based Transformer blocks and a first convolutional layer, and each of the residual and sliding window-based Transformer blocks includes a plurality of sliding window-based Transformer layers and a second convolutional layer; performing deep feature extraction on the shallow feature image using the deep feature extractor to obtain a deep feature image; Build multiple recovery Transformer models with different scales; Using different restoration Transformer models to restore the shallow feature image and the deep feature image, respectively, to obtain a plurality of high-quality images; Multi-scale feature extraction and fusion are performed on the high-quality image and the library image to obtain fusion features, including: Constructing and training several multi-scale feature extraction models; wherein each of the multi-scale feature extraction models includes multiple bottleneck layers of different scales for extracting features of different scales; each bottleneck layer includes a 1×1 convolution layer, a 3×3 depth-separable convolution layer, a batch normalization layer, and a linear rectified unit planning function; Several high-quality images and gallery images of different scales are used as input images of the multi-scale feature extraction model, and different multi-scale feature extraction models are used to perform multi-scale feature extraction on the corresponding input images, thereby obtaining multiple groups of features of different scales; Each group of features of different scales is fused separately to obtain multiple fused features; including: constructing an aggregation gate network including a non-parametric global average pooling layer and a multi-layer perceptron; using the aggregation gate network to fuse each group of features of different scales separately to obtain multiple fused features; Comparing and analyzing the fusion features with the features of the library image to obtain a person re-identification result includes: Calculate the distance vector between each fusion feature and the gallery image feature respectively; Accumulate the distance vectors between all fusion features and library image features to obtain the accumulated distance value; A recognition result is obtained according to the accumulated distance value.

2. The cross-camera person re-identification method based on multi-scale image restoration according to claim 1 is characterized in that: Obtaining a cross-camera query image and determining its resolution includes: Calculate the average pixel A of the entire dataset image according to the following formula; Among them, h i ,w i is the height and width of the i-th query image, n is the number of images in the entire dataset, and avg represents the average sum of pixels of all images; If the pixel points of the query image are lower than the average pixel point A of the entire data set image, the query image is determined to be a low-resolution image; otherwise, the query image is determined to be a high-resolution image.

3. A cross-camera pedestrian re-identification device based on multi-scale image restoration, characterized in that: include: A preprocessing module (1) is used to obtain a cross-camera query image and perform resolution determination; A multi-scale image restoration module (2) is used to perform multi-scale image restoration on the low-resolution image in the query image to obtain a plurality of high-quality images; A multi-feature extraction and fusion module (3) is used to extract and fuse multi-scale features of the high-quality image and the gallery image to obtain fusion features; An image recognition module (4) is used to compare and analyze the fusion features with the features of the library image to obtain a pedestrian re-identification result; Wherein, the multi-scale image restoration module (2) is specifically used for: Perform feature extraction on the low-resolution query image to obtain a shallow feature image; Performing deep feature extraction on the shallow feature image to obtain a deep feature image, including: constructing a deep feature extractor; wherein the deep feature extractor includes a plurality of residual and sliding window-based Transformer blocks and a first convolutional layer, and each of the residual and sliding window-based Transformer blocks includes a plurality of sliding window-based Transformer layers and a second convolutional layer; performing deep feature extraction on the shallow feature image using the deep feature extractor to obtain a deep feature image; Build multiple recovery Transformer models with different scales; Using different restoration Transformer models to restore the shallow feature image and the deep feature image, respectively, to obtain a plurality of high-quality images; The multi-feature extraction and fusion module (3) is specifically used for: Constructing and training several multi-scale feature extraction models; wherein each of the multi-scale feature extraction models includes multiple bottleneck layers of different scales for extracting features of different scales; each bottleneck layer includes a 1×1 convolution layer, a 3×3 depth-separable convolution layer, a batch normalization layer, and a linear rectified unit planning function; Several high-quality images and gallery images of different scales are used as input images of the multi-scale feature extraction model, and different multi-scale feature extraction models are used to perform multi-scale feature extraction on the corresponding input images, thereby obtaining multiple groups of features of different scales; Each group of features of different scales is fused separately to obtain multiple fused features; including: constructing an aggregation gate network including a non-parametric global average pooling layer and a multi-layer perceptron; using the aggregation gate network to fuse each group of features of different scales separately to obtain multiple fused features; The image recognition module (4) is specifically used for: Calculate the distance vector between each fusion feature and the gallery image feature respectively; Accumulate the distance vectors between all fusion features and library image features to obtain the accumulated distance value; A recognition result is obtained according to the accumulated distance value.

Citation Information

Patent Citations

  • Image super-resolution reconstruction model and method based on cross-scale attention network

    CN112862688A

  • Pedestrian re-identification method based on multi-scale feature fusion

    CN114202740A