Pedestrian re-identification methods, devices and electronic equipment
By fusing visible light and infrared image features and training a generative adversarial network model to generate pseudo-fused images, the problem of insufficient accuracy in cross-modal person re-identification is solved, achieving higher recognition accuracy and lower false detection rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-28
- Publication Date
- 2026-03-13
AI Technical Summary
Existing technologies lack accuracy in cross-modal pedestrian re-identification, especially when visible light cameras cannot effectively identify criminals at night, making accurate image matching difficult.
By acquiring training sample sets of visible light and infrared images, a convolutional neural network model is used to fuse image features, and a generative adversarial network model is trained to generate pseudo-fused images. The pedestrian re-identification network is then optimized to achieve pedestrian matching across modalities.
It improves the accuracy of cross-modal image retrieval, reduces the false detection rate, and enhances the ability to re-identify pedestrians under different lighting conditions.
Smart Images

Figure CN115188028B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition technology, and in particular to a pedestrian re-identification method, apparatus, and electronic device. Background Technology
[0002] Infrared and visible light pedestrian re-identification is one of the important tasks of nighttime security. Traditional pedestrian re-identification can only solve the identification task under sufficient light, while criminals usually prefer to operate at night. In this case, relying solely on visible light cameras is obviously insufficient to solve the image matching problem.
[0003] To address this, existing technologies propose using Generative Adversarial Networks (GANs) to learn the correlations between modalities by training a generator and a discriminator, thereby achieving cross-modal retrieval. However, the intermediate modal channel information generated by this approach only contains one modality, making it difficult to perform good image retrieval across modalities. Summary of the Invention
[0004] The purpose of this invention is to provide a pedestrian re-identification method that can improve the accuracy of cross-modal image retrieval.
[0005] To achieve the above objectives, the present invention provides a pedestrian re-identification method, comprising the following steps:
[0006] Obtain a training sample set, which includes multiple first training images and multiple second training images corresponding to the multiple first training images respectively. The modality of the first training images is one of visible light images and infrared images, and the modality of the second training images is the other of visible light images and infrared images.
[0007] A true fused image is obtained by fusing the first training image and its corresponding second training image using a pre-defined convolutional neural network model.
[0008] The real fused image and the first training image are used to train a preset generative adversarial network model, so that the pseudo fused image generated by the generative adversarial network model based on the first training image meets the preset standard.
[0009] An optimized training sample set is formed using the real fused image, the pseudo fused image, and the second training image. The pedestrian re-identification network is trained using the optimized training sample set to obtain the trained pedestrian re-identification network.
[0010] A set of images to be detected is obtained, the set of images to be detected includes multiple first images and multiple second images, the modality of the first images is one of visible light images and infrared images, and the modality of the second images is the other of visible light images and infrared images;
[0011] The first image is input into the trained generative adversarial network model to obtain the pseudo-fused image corresponding to the first image.
[0012] The pseudo-fused image and the second image are input into the trained pedestrian re-identification network for pedestrian matching to obtain the pedestrian re-identification result.
[0013] Specifically, the real fused image obtained by fusing the first training images and the second training images through a pre-defined convolutional neural network model includes:
[0014] Image features of the first training image and the second training image are extracted by the first convolutional layer and the second convolutional layer, respectively;
[0015] The image features of the first training image and the second training image are fused by a preset element-level fusion rule to obtain real fused image features;
[0016] The image is reconstructed from the features of the real fused image through the third and fourth convolutional layers to obtain the real fused image.
[0017] Optionally, the preset element-level fusion algorithm is: ;
[0018] in, This represents the j-th feature map extracted from the i-th first training image or the second training image through the second convolutional layer. It is the j-th channel of the real fused image features, fuse is the element fusion rule, and i, j and N are all positive integers.
[0019] Optionally, training a preset generative adversarial network model using the real fused image and the first training image specifically includes:
[0020] The first training image is converted into a pseudo-fused image that includes information from both visible light and infrared modes.
[0021] The pseudo-fused image and the real fused image are transformed into the same feature space to reduce the feature differences between the pseudo-fused image and the real fused image;
[0022] Receive image-feature pairs generated from pseudo-fused images or real fused images. When the image in the image-feature pair is a real fused image and the feature is a feature of a real fused image, and the IDs corresponding to the image and the feature are the same, the discrimination result is true; otherwise, the discrimination result is false.
[0023] When the accuracy of the discrimination result meets the target, the training of the generative adversarial network model is completed.
[0024] Specifically, the pedestrian re-identification network matches the pseudo-fused image and the second image by calculating the cosine similarity of the feature vectors of the pseudo-fused image and the second image.
[0025] Optionally, in the step of converting the first training image into a pseudo-fused image that includes information from both the visible light image and the infrared image:
[0026] A preset cycle consistency loss is used to ensure that the first training image and the pseudo-fused image maintain the same structural content information;
[0027] A preset identity loss is used to ensure that the first training image and the pseudo-fused image maintain the same ID.
[0028] Optionally, in the step of transforming the pseudo-fused image and the true fused image to the same feature space:
[0029] A feature generator based on a convolutional neural network is used to encode pseudo-fused images and real fused images into the same feature space by minimizing classification loss and triplet loss.
[0030] The present invention also provides a pedestrian re-identification device, comprising:
[0031] The first acquisition unit is used to acquire a training sample set, which includes a plurality of first training images and a plurality of second training images corresponding to the plurality of first training images respectively. The modality of the first training image is one of visible light image and infrared image, and the modality of the second training image is the other of visible light image and infrared image.
[0032] The fusion unit is used to fuse the first training image and its corresponding second training image through a preset convolutional neural network model to obtain a real fused image;
[0033] The first training unit is used to train a preset generative adversarial network model using the real fused image and the first training image, so that the pseudo fused image generated by the generative adversarial network model based on the first training image meets the preset standard.
[0034] The second training unit uses the pseudo-fused image and the second training image to form an optimized training sample set, and uses the optimized training sample set to train the pedestrian re-identification network to obtain the trained pedestrian re-identification network.
[0035] The second acquisition unit is used to acquire a set of images to be detected, the set of images to be detected including multiple first images and multiple second images, wherein the modality of the first image is one of visible light image and infrared image, and the modality of the second image is the other of visible light image and infrared image;
[0036] The generation unit is used to input the first image into the trained generative adversarial network model to obtain a pseudo-fused image corresponding to the first image.
[0037] The recognition unit is used to input the pseudo-fused image and the second image into the trained pedestrian re-identification network for pedestrian matching to obtain the pedestrian re-identification result.
[0038] The present invention also provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the above-described method.
[0039] The beneficial effects of this invention are as follows: This invention provides a pedestrian re-identification method. The method assumes that the pedestrian content information in infrared and visible light images from the same camera remains unchanged. It fuses the two modal images, trains a generative adversarial network model to generate a pseudo-fused image that is difficult to distinguish, and uses the pseudo-fused image to replace the original visible light or infrared image as input. The pseudo-fused image contains information from the original visible light or infrared image, which can reduce the false detection rate when extracting features and ranking similarity. It can reduce the difference between the two input modalities and has higher accuracy in cross-modal pedestrian re-identification. Attached Figure Description
[0040] To further understand the features and technical content of this invention, please refer to the following detailed description and accompanying drawings. However, the drawings are provided for reference and illustration only and are not intended to limit the invention.
[0041] In the attached diagram,
[0042] Figure 1 This is a flowchart of the pedestrian re-identification method of the present invention;
[0043] Figure 2 A flowchart illustrating the model training process for the pedestrian re-identification method of the present invention;
[0044] Figure 3 A flowchart illustrating the pedestrian re-identification method of the present invention during pedestrian identification;
[0045] Figure 4 This is a schematic diagram of the generative adversarial network model in the pedestrian re-identification method of the present invention;
[0046] Figure 5 This is a schematic diagram of the first training image in one embodiment of the pedestrian re-identification method of the present invention;
[0047] Figure 6 This is a schematic diagram of a second training image in one embodiment of the pedestrian re-identification method of the present invention;
[0048] Figure 7 This is a schematic diagram of a real fused image in one embodiment of the pedestrian re-identification method of the present invention;
[0049] Figure 8 This is a schematic diagram of a real fused image in one embodiment of the pedestrian re-identification method of the present invention;
[0050] Figure 9 This is a schematic diagram of the pedestrian re-identification device of the present invention;
[0051] Figure 10 This is a schematic diagram of the electronic device of the present invention. Detailed Implementation
[0052] To further illustrate the technical means and effects of the present invention, the following detailed description is provided in conjunction with the preferred embodiments of the present invention and their accompanying drawings.
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0054] In the description of this application, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicating orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0055] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0056] Please see Figures 1 to 10 This invention provides a pedestrian re-identification method, comprising the following steps:
[0057] Step S1: Obtain a training sample set, which includes multiple first training images and multiple second training images corresponding to the multiple first training images. The modality of the first training images is either a visible light image or an infrared image, and the modality of the second training images is either a visible light image or an infrared image.
[0058] In some embodiments of the present invention, each first training image and its corresponding second training image are two different modal images captured simultaneously by the same camera, namely a visible light image and an infrared image. Typically, the pedestrians in the visible light image and the infrared image exhibit the same pose and viewpoint. Figure 5 and Figure 6 As shown.
[0059] Step S2: The first training image and its corresponding second training image are fused using a preset convolutional neural network model to obtain a real fused image.
[0060] In some embodiments of the present invention, the first training image is an infrared image and the second training image is a visible light image.
[0061] Specifically, step S2 includes:
[0062] Image features of the first training image and the second training image are extracted by the first convolutional layer and the second convolutional layer, respectively;
[0063] The image features of the first training image and the second training image are fused by a preset element-level fusion rule to obtain real fused image features;
[0064] The image is reconstructed from the features of the real fused image through the third and fourth convolutional layers to obtain the real fused image.
[0065] It should be noted that in step S2, extensive shallow features of the input image (first training image or second training image) are extracted through the first and second convolutional layers. It is worth noting that since training a regression model (image-to-image) from randomly initialized convolutional kernels is usually difficult and unstable, the method adopted in this invention is to transfer the parameters of a well-trained classification model to the regression model. That is, the first convolutional layer of a high-level ResNet101 pre-trained on ImageNet is used as the first convolutional layer Conv1 of this invention (containing 64 convolutional kernels of size 7x7). This first convolutional layer Conv1 can be used to extract effective image features and is generally used for classification tasks. Directly inputting it into the feature fusion module is not suitable for image fusion tasks. Therefore, this invention also adds a second convolutional layer conv2 to adjust the convolutional features of the first convolutional layer Conv1 to adapt to feature fusion.
[0066] Specifically, the preset element-level fusion algorithm is as follows:
[0067] ;
[0068] in, This represents the j-th feature map extracted from the i-th first training image or the second training image through the second convolutional layer. It is the j-th channel of the real fused image features, fuse is the element fusion rule, and i, j and N are all positive integers.
[0069] In practical applications, there are three commonly used element-level fusion rules: element-level maximum value, element-level summation, and element-level average value. The appropriate fusion rule should be selected based on the characteristics of the image dataset. For example, sharp features (maximum values) represent salient objects in a surveillance scene. Therefore, the element-maximum fusion rule is often used in transform domain image fusion algorithms to fuse multi-focus images, infrared and visual images, and medical images. Correspondingly, the element-maximum fusion rule described in this invention is preferred.
[0070] Furthermore, since only the first and second convolutional layers are used for feature extraction, the abstraction level of the extracted convolutional features is not high. Therefore, during image reconstruction, two additional convolutional layers, namely the third and fourth convolutional layers, are used to reconstruct the real fused image from the features of the real fused image, such as... Figure 7 As shown.
[0071] Step S3: Train a preset generative adversarial network model using the real fused image and the first training image, so that the pseudo-fused image generated by the generative adversarial network model based on the first training image meets the preset standard.
[0072] Training a pre-defined generative adversarial network model using the real fused image and the first training image specifically includes:
[0073] The first training image is converted into a pseudo-fused image that includes information from both visible light and infrared modes.
[0074] The pseudo-fused image and the real fused image are transformed into the same feature space to reduce the feature differences between the pseudo-fused image and the real fused image;
[0075] Receive image-feature pairs generated from pseudo-fused images or real fused images. When the image in the image-feature pair is a real fused image and the feature is a feature of a real fused image, and the IDs corresponding to the image and the feature are the same, the discrimination result is true; otherwise, the discrimination result is false.
[0076] When the accuracy of the discrimination result meets the target, the training of the generative adversarial network model is completed.
[0077] Furthermore, in the step of converting the first training image into a pseudo-fused image that includes information from both the visible light image and the infrared image:
[0078] A preset cycle consistency loss is used to ensure that the first training image and the pseudo-fused image maintain the same structural content information;
[0079] A preset identity loss is used to ensure that the first training image and the pseudo-fused image maintain the same ID.
[0080] Furthermore, in the step of transforming the pseudo-fused image and the true fused image to the same feature space:
[0081] A feature generator based on a convolutional neural network is used to encode pseudo-fused images and real fused images into the same feature space by minimizing classification loss and triplet loss.
[0082] Corresponding to the above steps, the generative adversarial network model set by this invention includes:
[0083] The pixel alignment module 101 is used to convert the first training image into a pseudo-fused image that includes two modal information: a visible light image and an infrared image.
[0084] The feature alignment module 102 is used to convert the pseudo-fused image and the real fused image into the same feature space to reduce the feature differences between the pseudo-fused image and the real fused image;
[0085] The joint discrimination module 103 is used to receive image-feature pairs generated from pseudo-fused images or real fused images. When the image in the image-feature pair is a real fused image and the feature is a feature of the real fused image, and the IDs corresponding to the image and the feature are the same, the discrimination result is true; otherwise, the discrimination result is false.
[0086] It should be noted that, in order to reduce the difference between the two modalities, the pixel alignment module 101 converts the real second training image into a pseudo-fused image containing information from both the first and second training images. To ensure that the first training image and the pseudo-fused image maintain the same structural content information, a cycle consistency loss is used, specifically:
[0087] ;
[0088] Among them, G P’ Using GAN models to train fused images from real data To the second training image The mapping of G P The GAN model is trained from the second training image. To real-world fused images The mapping.
[0089] Furthermore, in order to make the pseudo-fused image X' mix With the corresponding second training image The same ID should be maintained, and the pixel alignment module 101 needs to satisfy X'. mix The identity loss corresponding to the ID includes a triple constraint supervision condition:
[0090] ;
[0091] ;
[0092] ;
[0093] Where P(·) is the probability that the predicted result is the true ID corresponding to the input image, and X a and X p These are positive sample pairs corresponding to the same ID, X a and X n These are negative sample pairs corresponding to different IDs. It is the cosine distance between X1 and X2 in the embedding space, where m is an edge parameter, usually set to 1.
[0094] Therefore, the total loss of pixel alignment module 101 is:
[0095] ;
[0096] in, and It is the weight of the corresponding item.
[0097] Furthermore, the feature alignment module 102 includes a feature generator based on a convolutional neural network, which encodes the pseudo-fused image and the real fused image into the same feature space by minimizing classification loss and triplet loss.
[0098] In detail, the pixel alignment module 101 reduces the differences between modalities. To improve the accuracy of person re-identification across modalities, it is also necessary to consider the huge intra-modal differences caused by different poses, viewpoints, lighting, etc. The feature alignment module 102 is mainly used to solve this problem. The feature generator encodes the pseudo-fused image and the real fused image into the same feature space by minimizing the classification loss and triplet loss. A convolutional neural network is used as the feature generator to learn the feature map M, which is then averaged to the feature vector V.
[0099] Furthermore, the input to the feature generator is a pseudo-fused image. Images that blend with reality The classification loss of the classifier Triple loss of the embedder Optimize and classify losses and triplet loss as follows:
[0100]
[0101] ;
[0102] in P(·) represents the union of the sets, and P(·) is the probability that the predicted result is the real ID corresponding to the input image. The ID corresponding to the pseudo-fused image is the same as that of the second training image.
[0103] In addition, to reduce cross-modal differences caused by distributional divergence, generative adversarial loss is additionally applied in the feature space.
[0104] Therefore, the total loss of feature alignment module 102 is:
[0105] .
[0106] Specifically, the joint discrimination module 103 includes a joint discriminator. The input of the joint discriminator is an image-feature pair (X, M), and the output is a probability (1 represents real, 0 represents fake). The system classifies a data point as real only when a real fused image and a real fused feature have the same ID; otherwise, it classifies the data as fake. The objective function of the joint discrimination module is defined as follows:
[0107] ;
[0108] ;
[0109] ;
[0110] in Let P(·) represent the union of the sets, where P(·) is the probability that the predicted result corresponds to the true ID of the input image. The ID corresponding to the pseudo-fused image is the same as that of the second training image. In the image X and feature M, the true values belong to the same ID. In the image X and feature M, they belong to the same ID and at least one of them is not a true value. The image X and feature M in the image are the true values belonging to different IDs.
[0111] To make the pseudo-fused image and the real fused image as similar as possible, and to confuse the joint discrimination module, the loss function... The definition is as follows:
[0112] ;
[0113] ;
[0114] in, In this diagram, image X and feature M belong to the same ID; image X is a pseudo-fused image, and M is a true fused feature. Image X and feature M belong to the same ID; image X is a pseudo-fused image, and M is a pseudo-fused feature. In the image X and feature M, they belong to the same ID. Image X is the real fused image, and M is the pseudo fused feature.
[0115] Finally, when the accuracy of the joint discrimination module 103 in distinguishing between real and pseudo-fused images reaches the target, that is, when the joint discrimination module 103 has difficulty in accurately distinguishing the authenticity of pseudo-fused images, the trained generative adversarial network model can be obtained. This generative adversarial network model can generate pseudo-fused images that are close to real fused images based on the second training image.
[0116] Step S4: Use the real fused image, pseudo fused image and second training image to form an optimized training sample set, and use the optimized training sample set to train the pedestrian re-identification network to obtain the trained pedestrian re-identification network.
[0117] Among them, the real fused image and the pseudo fused image contain information from the original visible light image or infrared image. It is an intermediate mode between the visible light image and the infrared image. Using this intermediate mode for pedestrian re-identification can reduce the difference between the two input modes and has higher accuracy in the cross-modal pedestrian re-identification process.
[0118] Step S5: Obtain the image set to be detected. The image set to be detected includes multiple first images and multiple second images. The modality of the first image is one of visible light image and infrared image, and the modality of the second image is the other of visible light image and infrared image.
[0119] Step S6: Input the first image into the trained generative adversarial network model to obtain the pseudo-fused image corresponding to the first image;
[0120] Step S7: Input the pseudo-fused image and the second image into the trained pedestrian re-identification network for pedestrian matching to obtain the pedestrian re-identification result.
[0121] Specifically, the pedestrian re-identification network matches the pseudo-fused image and the second image by calculating the cosine similarity of the feature vectors of the pseudo-fused image and the second image.
[0122] Please see Figure 9 The present invention also provides a pedestrian re-identification device, comprising:
[0123] The present invention also provides a pedestrian re-identification device, comprising:
[0124] The first acquisition unit 10 is used to acquire a training sample set, which includes a plurality of first training images and a plurality of second training images corresponding to the plurality of first training images respectively. The modality of the first training image is one of visible light image and infrared image, and the modality of the second training image is the other of visible light image and infrared image.
[0125] The fusion unit 20 is used to fuse the first training image and its corresponding second training image through a preset convolutional neural network model to obtain a real fused image;
[0126] The first training unit 30 is used to train a preset generative adversarial network model with the real fused image and the first training image, so that the pseudo fused image generated by the generative adversarial network model based on the first training image meets the preset standard.
[0127] The second training unit 40 uses the pseudo-fused image and the second training image to form an optimized training sample set, and uses the optimized training sample set to train the pedestrian re-identification network to obtain the trained pedestrian re-identification network.
[0128] The second acquisition unit 50 is used to acquire an image set to be detected, the image set to be detected including a plurality of first images and a plurality of second images, wherein the mode of the first image is one of visible light image and infrared image, and the mode of the second image is the other of visible light image and infrared image;
[0129] The generation unit 60 is used to input the first image into the trained generative adversarial network model to obtain a pseudo-fused image corresponding to the first image.
[0130] The recognition unit 70 is used to input the pseudo-fused image and the second image into the trained pedestrian re-identification network for pedestrian matching to obtain the pedestrian re-identification result.
[0131] Please see Figure 10 The present invention also provides an electronic device, including: a memory 200 and a processor 100, wherein the memory 200 stores a computer program, and when the computer program is executed by the processor 100, the processor 100 performs the steps of the above method.
[0132] In summary, this invention provides a pedestrian re-identification method. The method preserves the pedestrian content information in both infrared and visible light images from the same camera. It fuses the two modalities, trains a generative adversarial network model to generate a pseudo-fused image that is difficult to distinguish, and uses this pseudo-fused image to replace the original visible light or infrared image as input. The pseudo-fused image contains information from the original visible light or infrared image, which reduces the false detection rate when extracting features and ranking them by similarity. This reduces the difference between the two input modalities and achieves higher accuracy in cross-modal pedestrian re-identification.
[0133] As described above, those skilled in the art can make various other corresponding changes and modifications based on the technical solutions and concepts of this invention, and all such changes and modifications should fall within the protection scope of the claims of this invention.
Claims
1. A pedestrian re-identification method, characterized in that, The method comprises the following steps: obtaining a training sample set comprising a plurality of first training images and a plurality of second training images corresponding to the plurality of first training images respectively, wherein the modality of the first training image is one of a visible light image and an infrared image, and the modality of the second training image is the other of the visible light image and the infrared image; fusing the first training image and the corresponding second training image through a preset convolutional neural network model to obtain a real fused image; training a preset generative adversarial network model using the real fused image and the first training image, so that the generative adversarial network model generates a pseudo fused image according to the first training image to reach a preset standard; using the real fused image, the pseudo fused image and the second training image to form an optimized training sample set, training a pedestrian re-identification network using the optimized training sample set to obtain a trained pedestrian re-identification network; obtaining an image set to be detected, wherein the image set to be detected comprises a plurality of first images and a plurality of second images, the modality of the first image is one of a visible light image and an infrared image, and the modality of the second image is the other of the visible light image and the infrared image; inputting the first image into the trained generative adversarial network model to obtain a pseudo fused image corresponding to the first image; inputting the pseudo fused image and the second image into the trained pedestrian re-identification network for pedestrian matching to obtain a pedestrian re-identification result. 2.The pedestrian re-identification method of claim 1, wherein, The fusing of each first training image and second training image through a preset convolutional neural network model to obtain a real fused image specifically comprises: extracting image features of the first training image and the second training image through a first convolutional layer and a second convolutional layer respectively; fusing the image features of the first training image and the second training image through a preset element-level fusion rule to obtain real fused image features; reconstructing an image from the real fused image features through a third convolutional layer and a fourth convolutional layer to obtain a real fused image. 3.The pedestrian re-identification method of claim 2, wherein, The preset element-level fusion algorithm is: ; wherein, represents the jth feature map extracted by the second convolutional layer from the ith first training image or the second training image, is the jth channel of the real fused image feature, fuse is an element fusion rule, i, j and N are all positive integers. 4.The pedestrian re-identification method of claim 1, wherein, The training of the preset generative adversarial network model using the real fused image and the first training image specifically comprises: converting the first training image into a pseudo fused image comprising two modalities of visible light image and infrared image; converting the pseudo fused image and the real fused image into the same feature space to reduce the feature difference between the pseudo fused image and the real fused image; receiving an image-feature pair generated by the pseudo fused image or the real fused image, when the image in the image-feature pair is the real fused image and the feature is the feature of the real fused image, and the IDs corresponding to the image and the feature are the same, the discrimination result is true, otherwise the discrimination result is false; when the accuracy rate of the discrimination result meets the standard, the training of the generative adversarial network model is completed. 5.The pedestrian re-identification method of claim 1, wherein, The pedestrian re-identification network matches the pseudo fused image and the second image by calculating the cosine similarity of the feature vectors of the pseudo fused image and the second image. 6.The pedestrian re-identification method of claim 4, wherein, In the step of converting the first training image into a pseudo fused image comprising two modalities of visible light image and infrared image: adopting a preset cycle-consistency loss to make the first training image and the pseudo fused image maintain the same structural content information; The preset identity loss is used to keep the first training image and the pseudo fusion image with the same ID. 7.The pedestrian re-identification method of claim 4, wherein, In the step of converting the pseudo fusion image and the real fusion image into the same feature space: A feature generator based on a convolutional neural network is used to encode the pseudo fusion image and the real fusion image into the same feature space by minimizing the classification loss and the triplet loss.
8. A pedestrian re-identification apparatus, comprising: Comprise: A first acquisition unit is configured to acquire a training sample set, the training sample set comprising a plurality of first training images and a plurality of second training images corresponding to the plurality of first training images respectively, the modality of the first training image being one of a visible light image and an infrared image, and the modality of the second training image being the other of the visible light image and the infrared image; A fusion unit is configured to fuse the first training image and the second training image corresponding thereto by using a preset convolutional neural network model to obtain a real fusion image; A first training unit is configured to train a preset generative adversarial network model using the real fusion image and the first training image, so that the pseudo fusion image generated by the generative adversarial network model according to the first training image meets a preset standard; A second training unit is configured to use the pseudo fusion image and the second training image to form an optimized training sample set, and train a person re-identification network using the optimized training sample set to obtain a trained person re-identification network; A second acquisition unit is configured to acquire an image set to be detected, the image set to be detected comprising a plurality of first images and a plurality of second images, the modality of the first image being one of a visible light image and an infrared image, and the modality of the second image being the other of the visible light image and the infrared image; A generation unit is configured to input the first image into the trained generative adversarial network model to obtain a pseudo fusion image corresponding to the first image; An identification unit is configured to input the pseudo fusion image and the second image into the trained person re-identification network to perform person matching and obtain a person re-identification result.
9. An electronic device, comprising: Comprise: A memory and a processor, the memory storing a computer program, the computer program being executed by the processor to make the processor execute the steps of the method of any one of claims 1-7.
Citation Information
Patent Citations
Cross-modal pedestrian re-identification method based on image generation and shared learning network
CN114241517A
Pedestrian re-identification method based on unsupervised cross-modal
CN114495004A