Pedestrian re-identification method and device, equipment, storage medium and program product

By using the target feature extraction model and generative adversarial network based on visible light and infrared images in the bank scene, the accuracy and efficiency problems of pedestrian recognition in the bank scene are solved, and more efficient pedestrian identity information recognition and security monitoring are achieved.

CN118552984APending Publication Date: 2024-08-27INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410919142.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In banking scenarios, it is difficult for existing technology to identify pedestrians efficiently and accurately, especially under complex conditions across cameras, time, and scenes, making it difficult to detect and respond to potential safety hazards in a timely manner.

Method used

The target feature extraction model based on visible light and infrared images is used to generate realistic infrared images through mutual game optimization of generative adversarial network and discriminant model. It is combined with dual-stream residual network and self-attention mechanism to improve the accuracy of feature extraction, thus Identify pedestrians’ identity information.

Benefits of technology

It improves the accuracy and efficiency of pedestrian recognition, reduces the impact of external conditions such as light and color on feature extraction results, and enhances the safety of bank scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118552984A
    Figure CN118552984A
Patent Text Reader

Abstract

The invention relates to a pedestrian re-identification method and device, equipment, a storage medium and a program product, and relates to the technical field of artificial intelligence. The method comprises the steps of obtaining a to-be-recognized pedestrian image, inputting the to-be-recognized pedestrian image into a target feature extraction model to obtain a to-be-recognized feature map corresponding to the to-be-recognized pedestrian image, and if the to-be-recognized feature map is matched with a target feature map in a feature map library, performing identification on the identity information of a pedestrian corresponding to the target feature map, according to the invention, the target feature extraction model is obtained based on the common training of the visible light image and the infrared image, so that the influence of external conditions such as light and color on the feature extraction result is reduced, and the multi-modal information is used, thereby improving the recognition accuracy of the pedestrian in the to-be-recognized pedestrian image. The accuracy of the target feature extraction model can be improved, and then the accuracy of the determined pedestrian identity information is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a pedestrian re-identification method, device, equipment, storage medium and program product. Background Art

[0002] Re-Identification is a computer vision technology whose main goal is to identify and track individuals by comparing and analyzing individual features in images or videos, such as face and body shape, under complex conditions such as across cameras, time, and scenes. This technology is widely used in pedestrian recognition in different scenarios.

[0003] As a financial service institution, the security of banks is of vital importance. In order to monitor pedestrians in banking scenarios and promptly detect and respond to potential safety hazards, how to efficiently and accurately identify pedestrians has become a technical problem that needs to be solved in this field. Summary of the invention

[0004] Based on this, it is necessary to provide a pedestrian re-identification method, device, equipment, storage medium and program product that can efficiently and accurately identify pedestrians in response to the above technical problems.

[0005] In a first aspect, the present application provides a pedestrian re-identification method. The method comprises:

[0006] Acquire an image of a pedestrian to be identified, where the image of the pedestrian to be identified is a visible light image and / or an infrared image;

[0007] The pedestrian image to be identified is input into a target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified; the target feature extraction model is obtained by training an initial feature extraction model based on a first training set, wherein the first training set includes a first visible light image, a first infrared image corresponding to the first visible light image, and a standard feature map of the first visible light image;

[0008] If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0009] In one embodiment, the method further comprises:

[0010] Acquiring the first visible light image;

[0011] The first visible light image is input into a target generation model to obtain a first infrared image corresponding to the first visible light image; the target generation model is obtained by training a generative adversarial network based on a second training set, the second training set including a plurality of second visible light images and a second infrared image corresponding to each of the second visible light images;

[0012] using the first visible light image and the first infrared image corresponding to the first visible light image as data in a first training set;

[0013] The initial feature extraction model is trained based on the first training set to obtain the target feature extraction model.

[0014] In one embodiment, the generative adversarial network includes a generative model and a discriminative model, and the method further includes:

[0015] The second visible light image is input into the intermediate generation model to obtain a first generation image output by the intermediate generation model; the intermediate generation model is obtained by training the generation model based on the second visible light image and a second infrared image corresponding to the second visible light image, and the intermediate generation model is used to generate a corresponding infrared image according to the visible light image;

[0016] The second visible light image, the second infrared image corresponding to the second visible light image, and the first generated image are input into the discriminant model to obtain a first discrimination result output by the discriminant model; the second infrared image corresponding to the second visible light image is real data, the discriminant model is used to distinguish between real data and generated data, and the discrimination result is used to indicate the probability that the infrared image is generated data;

[0017] Adjusting the parameters of the discrimination model according to the first discrimination result and the standard discrimination result;

[0018] The infrared image generated by the intermediate generation model is discriminated by using the discriminant model after parameter adjustment, and the parameters of the intermediate generation model are adjusted according to the discrimination result to obtain the target generation model.

[0019] In one embodiment, the infrared image generated by the intermediate generation model is discriminated by using the discriminant model after parameter adjustment, and the parameters of the intermediate generation model are adjusted according to the discrimination result to obtain the target generation model, including:

[0020] Inputting the second visible light image into the intermediate generation model to obtain a second generated image; the second generated image is an infrared image;

[0021] Inputting the second visible light image and the second generated image into the discriminant model after parameter adjustment to obtain a second discriminant result output by the discriminant model after parameter adjustment;

[0022] The parameters of the intermediate generation model are adjusted according to the second discrimination result, and the intermediate generation model after parameter adjustment is used as the target generation model.

[0023] In one embodiment, if the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified, including:

[0024] If there is a feature map whose similarity with the feature map to be identified is greater than a preset threshold value among the feature maps in the feature map library, the feature map whose similarity with the feature map to be identified is greater than the preset threshold value is used as the target feature map, and it is determined that the feature map to be identified matches the target feature map;

[0025] The identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0026] In one embodiment, the method further comprises:

[0027] If there is no feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger;

[0028] Outputting reminder information, and / or storing the identity information of the pedestrian in the image of the pedestrian to be identified and the feature map to be identified in the feature map library in correspondence;

[0029] The reminder information is used to indicate that the pedestrian in the pedestrian image to be identified is a stranger.

[0030] In a second aspect, the present application also provides a pedestrian re-identification device. The device comprises:

[0031] A first acquisition module is used to acquire an image of a pedestrian to be identified, where the image of the pedestrian to be identified is a visible light image and / or an infrared image;

[0032] A second acquisition module is used to input the pedestrian image to be identified into a target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified; the target feature extraction model is obtained by training an initial feature extraction model based on a first training set, and the first training set includes a first visible light image, a first infrared image corresponding to the first visible light image, and a standard feature map of the first visible light image;

[0033] The first determination module is used to determine the identity information of the pedestrian corresponding to the target feature map as the identity information of the pedestrian in the pedestrian image to be identified if the feature map to be identified matches the target feature map in the feature map library.

[0034] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.

[0035] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0036] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.

[0037] The above-mentioned pedestrian re-identification method, device, equipment, storage medium and program product obtain the image of the pedestrian to be identified, input the image of the pedestrian to be identified into the target feature extraction model to obtain the feature map to be identified corresponding to the image of the pedestrian to be identified. If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the image of the pedestrian to be identified. Since the target feature extraction model in this application is obtained by joint training based on visible light images and infrared images, the influence of external conditions such as light and color on the feature extraction results is reduced. The use of multimodal information can improve the accuracy of the target feature extraction model, thereby improving the accuracy of the determined pedestrian identity information. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is an internal structure diagram of a computer device provided in an embodiment of the present application;

[0039] Figure 2 It is a flowchart of a pedestrian re-identification method provided in an embodiment of the present application;

[0040] Figure 3 It is a flow chart of a method for obtaining a target feature extraction model provided in an embodiment of the present application;

[0041] Figure 4 It is a flowchart of a method for obtaining a target generation model provided in an embodiment of the present application;

[0042] Figure 5 It is a flowchart of another method for obtaining a target generation model provided in an embodiment of the present application;

[0043] Figure 6 It is a flowchart of a method for determining identity information of a pedestrian provided in an embodiment of the present application;

[0044] Figure 7is a flowchart of another method for determining identity information of a pedestrian provided in an embodiment of the present application;

[0045] Figure 8 It is a flowchart of a pedestrian re-identification method based on infrared images provided in an embodiment of the present application;

[0046] Fig. 9 It is a structural block diagram of a pedestrian re-identification device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0048] Re-Identification is a computer vision technology whose main goal is to identify and track individuals by comparing and analyzing individual features in images or videos, such as face and body shape, under complex conditions such as across cameras, time, and scenes. This technology is widely used in pedestrian recognition in different scenarios.

[0049] As a financial service institution, the security of banks is of vital importance. In order to monitor pedestrians in banking scenarios and promptly detect and respond to potential safety hazards, how to efficiently and accurately identify pedestrians has become a technical problem that needs to be solved in this field.

[0050] The pedestrian re-identification method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1 is an internal structure diagram of a computer device provided in an embodiment of the present application. The computer device may be a server, and its internal structure diagram may be as follows Figure 1 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a pedestrian re-identification method is implemented.

[0051] Those skilled in the art will understand that Figure 1The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0052] In one embodiment, Figure 2 As shown, Figure 2 is a flowchart of a pedestrian re-identification method provided in an embodiment of the present application, which can be applied to Figure 1 The computer device comprises the following steps:

[0053] S201, obtaining an image of a pedestrian to be identified.

[0054] The pedestrian image to be identified is a visible light image and / or an infrared image.

[0055] In a possible implementation, an image acquisition device may be provided in a bank work scene, and images of pedestrians to be identified in the bank work scene may be acquired by the image acquisition device.

[0056] Exemplarily, the image acquisition device may be an infrared camera, and the infrared camera may be used to acquire images of pedestrians to be identified in a bank work scene. The images of pedestrians to be identified acquired by the infrared camera are infrared images.

[0057] S202, inputting the image of the pedestrian to be identified into the target feature extraction model to obtain a feature map to be identified corresponding to the image of the pedestrian to be identified.

[0058] The target feature extraction model is obtained by training the initial feature extraction model based on the first training set, and the first training set includes a first visible light image, a first infrared image corresponding to the first visible light image, and a standard feature map of the first visible light image.

[0059] Optionally, the first visible light image and the first infrared image corresponding to the first visible light image can be input into the initial feature extraction model to obtain a feature map output by the initial feature extraction model, and the parameters of the initial feature extraction model are adjusted based on the feature map output by the initial feature extraction model and the corresponding standard feature map. The above process is repeated until the model converges or reaches a preset training round, and the feature extraction model obtained by the last parameter adjustment is used as the target feature extraction model.

[0060] Exemplarily, the feature extraction model may be a dual-stream residual network (ResNet) model, that is, two ResNets are used, one for processing infrared images and one for processing visible light images. Each ResNet includes several convolutional layers and residual blocks, and a self-attention mechanism is introduced in the residual blocks to improve the accuracy of the feature extraction model.

[0061] In one embodiment, the self-attention mechanism can be implemented in the following way:

[0062] First, input the pedestrian image to be identified into ResNet to obtain the feature map output by ResNet , and determine the feature map by the following formulas (1)-(3) The corresponding query matrix , key matrix Sum Matrix :

[0063] (1)

[0064] (2)

[0065] (3)

[0066] In formulas (1)-(3), is the query weight matrix, is the key weight matrix, is the value weight matrix.

[0067] Then calculate the query matrix and key matrix The dot product of The function is normalized to obtain the attention weight matrix , the above process can be expressed as the following formula (4):

[0068] (4)

[0069] In formula (4), is the key matrix The feature dimension of is used to scale the dot product result.

[0070] Finally, the enhanced feature map is obtained by the following formula (5): :

[0071] (5)

[0072] Optionally, after feature extraction, a fusion layer can be added to fuse the features of the infrared image and the visible light image, and a cross-attention mechanism can be introduced to enable the model to better focus on the correlation features between the two modalities:

[0073] First, the infrared image to be identified and the visible light image to be identified can be input into two ResNets respectively to obtain the infrared feature map output by ResNet. , and visible light characteristic map . And determine the infrared signature The corresponding query matrix , key matrix Sum Matrix , and visible light characteristic map The corresponding query matrix , key matrix Sum Matrix .

[0074] Then the attention weight matrix is ​​determined by the following formulas (6)-(7): and :

[0075] (6)

[0076] (7)

[0077] Finally, the fused feature map is obtained by the following formula (8): :

[0078] (8)

[0079] In the embodiment of the present application, the enhanced feature map can be Or the fused feature map as the feature map to be identified.

[0080] S203: If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0081] Optionally, the feature map to be identified can be compared with several feature maps in the feature map library. If there is a feature map among the several feature maps in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, the feature map whose similarity with the feature map to be identified is greater than the preset threshold is used as the target feature map, and it is determined that the feature map to be identified matches the target feature map, and then the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified; if there is no feature map among the several feature maps in the feature map library whose similarity with the feature map to be identified is greater than the preset threshold, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger, and a reminder message can be generated to prompt that the pedestrian in the pedestrian image to be identified is a stranger, and the identity information of the pedestrian in the pedestrian image to be identified and the feature map to be identified are stored in the feature map library accordingly.

[0082] In an embodiment of the present application, an image of a pedestrian to be identified is obtained, and the image of the pedestrian to be identified is input into a target feature extraction model to obtain a feature map to be identified corresponding to the image of the pedestrian to be identified. If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the image of the pedestrian to be identified. Since the target feature extraction model in the present application is obtained by joint training based on visible light images and infrared images, the influence of external conditions such as light and color on the feature extraction results is reduced. The use of multimodal information can improve the accuracy of the target feature extraction model, thereby improving the accuracy of the determined pedestrian identity information.

[0083] Reference Figure 3 , Figure 3 : is a flow chart of a method for obtaining a target feature extraction model provided in an embodiment of the present application. Based on the above embodiment, the method further includes the following steps:

[0084] S301, acquiring a first visible light image.

[0085] Exemplarily, a stored historical visible light image may be obtained from a local database and used as the first visible light image. Alternatively, an existing visible light image may be obtained by searching on the network and used as the first visible light image.

[0086] S302: Input the first visible light image into a target generation model to obtain a first infrared image corresponding to the first visible light image.

[0087] The target generation model is obtained by training a generative adversarial network based on a second training set, where the second training set includes multiple second visible light images and a second infrared image corresponding to each second visible light image.

[0088] In the embodiment of the present application, the generative adversarial network includes a generative model and a discriminative model, wherein the generative model is used to generate a corresponding infrared image according to a visible light image, and the discriminative model is used to distinguish between real data and generated data.

[0089] In a possible implementation, training the generative adversarial network based on the second training set to obtain the target generative model can be implemented in the following manner:

[0090] First, the generative model is pre-trained using part of the second visible light images in the second training set and the corresponding second infrared images, so that the generative model can generate relatively realistic infrared images based on the visible light images. The second infrared images are real data, and the relatively realistic infrared images generated by the generative model are generated data. Then, the parameters of the generative model are fixed, and the discriminant model is trained based on part of the second visible light images in the second training set, the corresponding second infrared images, and the generated images generated by the generative model, so that the discriminant model can better distinguish between real data and generated data. Finally, the parameters of the discriminant model are fixed, and the generative model is trained based on part of the second visible light images in the second training set and the generated images generated by the generative model, so that the data generated by the generative model can deceive the discriminant model.

[0091] The above process is repeated continuously, so that the generative model and the discriminative model compete with each other, and the model parameters are updated through the back propagation algorithm to reduce the loss function until the model converges or reaches the preset number of training times. The generative model obtained from the last training is used as the target generative model.

[0092] S303: Use the first visible light image and the first infrared image corresponding to the first visible light image as data in a first training set.

[0093] Optionally, a standard feature map of the first visible light image may be obtained, and the first visible light image, the first infrared image corresponding to the first visible light image, and the standard feature map of the first visible light image may be used as a first training set.

[0094] Alternatively, a standard feature map of the first visible light image and a standard feature map of the first infrared image may be obtained, and then the first visible light image, the first infrared image corresponding to the first visible light image, the standard feature map of the first visible light image, and the standard feature map of the first infrared image may be used as the first training set.

[0095] S304: Train the initial feature extraction model based on the first training set to obtain a target feature extraction model.

[0096] Exemplarily, the first visible light image in the first training set and the first infrared image corresponding to the first visible light image can be input into the initial feature extraction model to obtain a feature map output by the initial feature extraction model, and the parameters of the initial feature extraction model are adjusted based on the feature map output by the initial feature extraction model and the standard feature map. The above steps are repeated until the model converges or reaches a preset number of training times, and then the feature extraction model after the last parameter adjustment is used as the target feature extraction model.

[0097] In the embodiment of the present application, a first visible light image is obtained, and the first visible light image is input into a target generation model to obtain a first infrared image corresponding to the first visible light image. The first visible light image and the first infrared image corresponding to the first visible light image are used as data in a first training set, and an initial feature extraction model is trained based on the first training set to obtain a target feature extraction model. In the embodiment of the present application, the target feature extraction model is obtained by training the visible light image and the infrared image together, thereby reducing the influence of external conditions such as light and color on the feature extraction results. The use of multimodal information can improve the accuracy of the target feature extraction model, thereby improving the accuracy of the determined pedestrian identity information.

[0098] Generative adversarial networks include generative models and discriminative models, see Figure 4 , Figure 4 : is a flow chart of a method for obtaining a target generation model provided in an embodiment of the present application. Based on the above embodiment, the method further includes the following steps:

[0099] S401, inputting the second visible light image into the intermediate generation model to obtain a first generated image output by the intermediate generation model.

[0100] The intermediate generation model is obtained by training the generation model based on the second visible light image and the second infrared image corresponding to the second visible light image, and the intermediate generation model is used to generate the corresponding infrared image according to the visible light image.

[0101] In the embodiment of the present application, a portion of the second visible light images can be randomly selected from the second training set, and the generation model can be pre-trained based on the randomly selected portion of the second visible light images and the infrared images corresponding to each visible light image to obtain an intermediate generation model. The intermediate generation model can generate a generation image that is close to a real infrared image based on the visible light image.

[0102] After pre-training the generative model to obtain the intermediate generative model, a portion of the second visible light images is randomly selected from the second training set, and the randomly selected portion of the visible light images is input into the intermediate generative model to obtain a first generative image output by the intermediate generative model.

[0103] S402 , inputting the second visible light image, the second infrared image corresponding to the second visible light image, and the first generated image into a discriminant model to obtain a first discriminant result output by the discriminant model.

[0104] The second infrared image corresponding to the second visible light image is real data, the discriminant model is used to distinguish between real data and generated data, and the discriminant result is used to indicate the probability that the infrared image is generated data.

[0105] Exemplarily, the discrimination result may be a probability that the input image is real data, and / or a probability that the input image is generated data.

[0106] In an embodiment of the present application, the second visible light image, the second infrared image corresponding to the second visible light image, and the first generated image can be input into the discriminant model to respectively obtain the probabilities that the input second visible light image, the second infrared image, and the first generated image are generated data, and the probabilities that each second visible light image, each second infrared image, and each first generated image is generated data are used as the first discriminant result.

[0107] S403: Adjust the parameters of the discrimination model according to the first discrimination result and the standard discrimination result.

[0108] The standard judgment results include that the second visible light image is real data, the second infrared image is real data, and the first generated image is generated data.

[0109] Optionally, the parameters of the discrimination model may be adjusted according to the first discrimination result and the standard discrimination result. Then, the steps of generating the first discrimination result and adjusting the parameters are repeated until the model converges or reaches a preset number of training times.

[0110] S404, using the adjusted discriminant model, discriminate the infrared image generated by the intermediate generation model, and adjust the parameters of the intermediate generation model according to the discrimination result to obtain the target generation model.

[0111] In one embodiment, the second visible light image can be input into the intermediate generation model to obtain a second generation image, and then the second visible light image and the second generation image can be input into the discriminant model after parameter adjustment to obtain a second discrimination result output by the discriminant model after parameter adjustment, and the parameters of the intermediate generation model can be adjusted according to the second discrimination result. The above steps are repeated until the model converges or reaches a preset number of training times, and then the generation model after the last parameter adjustment is used as the target generation model.

[0112] In the embodiment of the present application, the second visible light image is input into the intermediate generation model to obtain the first generation image output by the intermediate generation model, the second visible light image, the second infrared image corresponding to the second visible light image, and the first generation image are input into the discrimination model to obtain the first discrimination result output by the discrimination model, the parameters of the discrimination model are adjusted according to the first discrimination result and the standard discrimination result, the infrared image generated by the intermediate generation model is discriminated using the discriminant model after parameter adjustment, and the parameters of the intermediate generation model are adjusted according to the discrimination result to obtain the target generation model. Since in the embodiment of the present application, the generation model and the discrimination model are adversarially trained, the parameters of the generation model and the discrimination model can be continuously optimized, and the performance of the generation model and the discrimination model can be jointly improved through mutual game, so as to improve the accuracy of the trained target generation model.

[0113] Reference Figure 5 , Figure 5 1 is a flow chart of another method for obtaining a target generation model provided by an embodiment of the present application. This embodiment involves a possible implementation method of how to use the adjusted discriminant model to discriminate the infrared image generated by the intermediate generation model, and adjust the parameters of the intermediate generation model according to the discrimination result to obtain the target generation model. Based on the above embodiment, the above S404 includes the following steps:

[0114] S501, inputting the second visible light image into the intermediate generation model to obtain a second generated image.

[0115] The second generated image is an infrared image.

[0116] Exemplarily, a portion of the second visible light images may be randomly selected from the second training set, and the randomly selected second visible light images may be input into the intermediate generation model to obtain the second generated images output by the intermediate generation model.

[0117] S502, input the second visible light image and the second generated image into the discriminant model after parameter adjustment to obtain a second discrimination result output by the discriminant model after parameter adjustment.

[0118] Exemplarily, the second visible light image and the second generated image can be input into the discriminant model to obtain the probabilities that the input second visible light image and the second generated image are generated data, respectively, and the probabilities that each second visible light image and each first generated image are generated data are taken as the second discriminant result.

[0119] S503: Adjust the parameters of the intermediate generation model according to the second discrimination result, and use the adjusted intermediate generation model as the target generation model.

[0120] In one embodiment, the parameters of the discriminant model can be fixed, and then the parameters of the intermediate generative model can be adjusted according to the second discrimination result. The above parameter adjustment steps are repeated until the model converges or reaches a preset number of training times, so that the image generated by the generative model can deceive the discriminant model. Then the generative model after the last meal is used as the target generative model.

[0121] In the embodiment of the present application, the second visible light image is input into the intermediate generation model to obtain the second generation image, the second visible light image and the second generation image are input into the discriminant model after parameter adjustment to obtain the second discrimination result output by the discriminant model after parameter adjustment, the parameters of the intermediate generation model are adjusted according to the second discrimination result, and the intermediate generation model after parameter adjustment is used as the target generation model. In the embodiment of the present application, adversarial training is performed on the generation model and the discriminant model, so that the parameters of the generation model and the discriminant model can be continuously optimized, and the performance of the generation model and the discriminant model can be jointly improved through mutual game, so as to improve the accuracy of the target generation model obtained by training.

[0122] Reference Figure 6 , Figure 6 1 is a flow chart of a method for determining the identity information of a pedestrian provided in an embodiment of the present application. This embodiment involves a possible implementation method of determining the identity information of the pedestrian corresponding to the target feature map as the identity information of the pedestrian in the pedestrian image to be identified if the feature map to be identified matches the target feature map in the feature map library. Based on the above embodiment, the above S203 includes the following steps:

[0123] S601, if there is a feature map whose similarity with the feature map to be identified is greater than a preset threshold among several feature maps in the feature map library, the feature map whose similarity with the feature map to be identified is greater than the preset threshold is used as a target feature map, and it is determined that the feature map to be identified matches the target feature map.

[0124] S602, determining the identity information of the pedestrian corresponding to the target feature map as the identity information of the pedestrian in the pedestrian image to be identified.

[0125] Optionally, the feature map to be identified can be compared with several feature maps in the feature map library. If there is a feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, the feature map whose similarity with the feature map to be identified is greater than the preset threshold is used as the target feature map. Then, according to the correspondence between the feature map and the identity information of the pedestrian, the identity information of the pedestrian corresponding to the target feature map is used as the identity information of the pedestrian in the pedestrian image to be identified.

[0126] In an embodiment of the present application, if there is a feature map among several feature maps in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, the feature map whose similarity with the feature map to be identified is greater than the preset threshold, then the feature map whose similarity with the feature map to be identified is taken as the target feature map, and it is determined that the feature map to be identified matches the target feature map, and the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified, so that the identity information of the pedestrian in the pedestrian image to be identified can be determined based on the identity information of the pedestrian corresponding to the existing feature map, thereby simplifying the identity confirmation operation and improving the efficiency of the pedestrian's identity information.

[0127] Reference Figure 7 , Figure 7 FIG. 1 is a flow chart of another method for determining the identity information of a pedestrian provided in an embodiment of the present application. Based on the above embodiment, the method further includes the following steps:

[0128] S701: If there is no feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger.

[0129] S702, outputting reminder information, and / or storing the identity information of the pedestrian in the image of the pedestrian to be identified and the feature map to be identified in a feature map library in correspondence.

[0130] The reminder information is used to indicate that the pedestrian in the pedestrian image to be identified is a stranger.

[0131] Optionally, the feature map to be identified can be compared with several feature maps in the feature map library. If there is no feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, the identity information of the pedestrian in the pedestrian image to be identified is determined to be a stranger.

[0132] When the pedestrian's identity information is a stranger, a reminder message may be generated to remind the user that the pedestrian to be identified is a stranger. The user may monitor the pedestrian in the pedestrian image to be identified or obtain the pedestrian's identity information according to the reminder message.

[0133] Alternatively, when the identity information of the pedestrian is a stranger, the correspondence between the identity information of the pedestrian in the pedestrian image to be identified and the feature map to be identified can also be determined, and the correspondence is stored in the feature map library.

[0134] In the embodiment of the present application, if there is no feature map whose similarity with the feature map to be identified is greater than a preset threshold value among several feature maps in the feature map library, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger, and a reminder message is output, and / or the identity information of the pedestrian in the pedestrian image to be identified and the feature map to be identified are stored in the feature map library accordingly, so that when the pedestrian in the pedestrian image to be identified is a stranger, the user can be reminded to pay attention in time, and take measures in time when the pedestrian has abnormal behavior, which helps to improve the security of the bank's work scene. In addition, the identity information of the pedestrian in the pedestrian image to be identified and the feature map to be identified are stored in the feature map library accordingly, and the identity information of the pedestrian and the corresponding feature map are retrieved, which improves work efficiency.

[0135] Reference Figure 8 , Figure 8 : is a flowchart of a pedestrian re-identification method based on infrared images provided in an embodiment of the present application. The method comprises the following steps:

[0136] S801, training a generative adversarial network based on a plurality of second visible light images and a second infrared image corresponding to each second visible light image to obtain a target generation model.

[0137] S802: Input the first visible light image into the target generation model to obtain a first infrared image corresponding to the first visible light image. The first visible light image and the first infrared image corresponding to the first visible light image are used as data in the first training set.

[0138] S803: Train the initial feature extraction model based on the first training set to obtain a target feature extraction model.

[0139] S804, obtaining a pedestrian image to be identified, where the pedestrian image to be identified is a visible light image or an infrared image.

[0140] S805, inputting the pedestrian image to be identified into the target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified.

[0141] S806: If there is a feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, the feature map whose similarity with the feature map to be identified is greater than the preset threshold is used as a target feature map.

[0142] S807, determining the identity information of the pedestrian corresponding to the target feature map as the identity information of the pedestrian in the pedestrian image to be identified.

[0143] S808: If there is no feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger.

[0144] S809, outputting reminder information, and / or storing the identity information of the pedestrian in the image of the pedestrian to be identified and the feature map to be identified in a feature map library in correspondence.

[0145] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0146] Based on the same inventive concept, the embodiment of the present application also provides a pedestrian re-identification device for implementing the pedestrian re-identification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more pedestrian re-identification device embodiments provided below can refer to the limitations of the pedestrian re-identification method above, and will not be repeated here.

[0147] In one embodiment, Fig. 9 As shown, Fig. 9 900 is a structural block diagram of a pedestrian re-identification device provided in an embodiment of the present application. The device 900 includes:

[0148] The first acquisition module 901 is used to acquire an image of a pedestrian to be identified. The image of the pedestrian to be identified is a visible light image and / or an infrared image.

[0149] The second acquisition module 902 is used to input the pedestrian image to be identified into the target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified; the target feature extraction model is obtained by training the initial feature extraction model based on the first training set, and the first training set includes a first visible light image, a first infrared image corresponding to the first visible light image, and a standard feature map of the first visible light image.

[0150] The first determination module 903 is used to determine the identity information of the pedestrian corresponding to the target feature map as the identity information of the pedestrian in the pedestrian image to be identified if the feature map to be identified matches the target feature map in the feature map library.

[0151] In one embodiment, the apparatus 900 further includes:

[0152] The third acquisition module is used to acquire the first visible light image.

[0153] A fourth acquisition module is used to input the first visible light image into a target generation model to obtain a first infrared image corresponding to the first visible light image; the target generation model is obtained by training a generative adversarial network based on a second training set, and the second training set includes multiple second visible light images and a second infrared image corresponding to each second visible light image.

[0154] The second determining module is used to use the first visible light image and the first infrared image corresponding to the first visible light image as data in the first training set.

[0155] The training module is used to train the initial feature extraction model based on the first training set to obtain a target feature extraction model.

[0156] In one embodiment, the generative adversarial network includes a generative model and a discriminative model, and the apparatus 900 further includes:

[0157] The fifth acquisition module is used to input the second visible light image into the intermediate generation model to obtain the first generation image output by the intermediate generation model; the intermediate generation model is obtained by training the generation model based on the second visible light image and the second infrared image corresponding to the second visible light image, and the intermediate generation model is used to generate the corresponding infrared image according to the visible light image.

[0158] The sixth acquisition module is used to input the second visible light image, the second infrared image corresponding to the second visible light image, and the first generated image into the discriminant model to obtain a first discrimination result output by the discriminant model; the second infrared image corresponding to the second visible light image is real data, the discriminant model is used to distinguish between real data and generated data, and the discrimination result is used to indicate the probability that the infrared image is generated data.

[0159] The parameter adjustment module is used to adjust the parameters of the discrimination model according to the first discrimination result and the standard discrimination result.

[0160] The seventh acquisition module is used to use the discriminant model after parameter adjustment to discriminate the infrared image generated by the intermediate generation model, and adjust the parameters of the intermediate generation model according to the discrimination result to obtain the target generation model.

[0161] In one embodiment, the seventh acquisition module includes:

[0162] The first acquisition unit is used to input the second visible light image into the intermediate generation model to obtain a second generated image; the second generated image is an infrared image.

[0163] The second acquisition unit is used to input the second visible light image and the second generated image into the discriminant model after parameter adjustment to obtain a second discrimination result output by the discriminant model after parameter adjustment.

[0164] A parameter adjustment unit is used to adjust the parameters of the intermediate generation model according to the second discrimination result, and use the adjusted intermediate generation model as the target generation model.

[0165] In one embodiment, the first determining module 903 includes:

[0166] The first determination unit is used to, if there is a feature map among several feature maps in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, take the feature map whose similarity with the feature map to be identified is greater than the preset threshold as the target feature map, and determine that the feature map to be identified matches the target feature map.

[0167] The second determination unit is used to determine the identity information of the pedestrian corresponding to the target feature map as the identity information of the pedestrian in the pedestrian image to be identified.

[0168] In one embodiment, the apparatus 900 further includes:

[0169] The third determination module is used to determine that the identity information of the pedestrian in the pedestrian image to be identified is a stranger if there is no feature map whose similarity with the feature map to be identified is greater than a preset threshold among the several feature maps in the feature map library.

[0170] The output module is used to output reminder information and / or store the identity information of the pedestrian in the image of the pedestrian to be identified and the feature map to be identified in the feature map library accordingly.

[0171] The reminder information is used to indicate that the pedestrian in the pedestrian image to be identified is a stranger.

[0172] Each module in the above-mentioned pedestrian re-identification device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0173] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0174] Acquire an image of a pedestrian to be identified, where the image of the pedestrian to be identified is a visible light image and / or an infrared image;

[0175] The pedestrian image to be identified is input into the target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified; the target feature extraction model is obtained by training the initial feature extraction model based on the first training set, and the first training set includes a first visible light image, a first infrared image corresponding to the first visible light image, and a standard feature map of the first visible light image;

[0176] If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0177] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0178] Acquire a first visible light image;

[0179] Inputting the first visible light image into a target generation model to obtain a first infrared image corresponding to the first visible light image; the target generation model is obtained by training a generative adversarial network based on a second training set, the second training set including a plurality of second visible light images and a second infrared image corresponding to each second visible light image;

[0180] using the first visible light image and the first infrared image corresponding to the first visible light image as data in a first training set;

[0181] The initial feature extraction model is trained based on the first training set to obtain a target feature extraction model.

[0182] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0183] Inputting the second visible light image into the intermediate generation model to obtain a first generation image output by the intermediate generation model; the intermediate generation model is obtained by training the generation model based on the second visible light image and a second infrared image corresponding to the second visible light image, and the intermediate generation model is used to generate a corresponding infrared image according to the visible light image;

[0184] The second visible light image, the second infrared image corresponding to the second visible light image, and the first generated image are input into the discriminant model to obtain a first discriminant result output by the discriminant model; the second infrared image corresponding to the second visible light image is real data, the discriminant model is used to distinguish between real data and generated data, and the discriminant result is used to indicate the probability that the infrared image is generated data;

[0185] Adjusting the parameters of the discrimination model according to the first discrimination result and the standard discrimination result;

[0186] The infrared image generated by the intermediate generation model is discriminated by using the adjusted discriminant model, and the parameters of the intermediate generation model are adjusted according to the discrimination results to obtain the target generation model.

[0187] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0188] Inputting the second visible light image into the intermediate generation model to obtain a second generated image; the second generated image is an infrared image;

[0189] Inputting the second visible light image and the second generated image into the discriminant model after parameter adjustment to obtain a second discriminant result output by the discriminant model after parameter adjustment;

[0190] The parameters of the intermediate generation model are adjusted according to the second discrimination result, and the intermediate generation model after parameter adjustment is used as the target generation model.

[0191] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0192] If there is a feature map whose similarity with the feature map to be identified is greater than a preset threshold value among several feature maps in the feature map library, the feature map whose similarity with the feature map to be identified is greater than the preset threshold value is used as the target feature map, and it is determined that the feature map to be identified matches the target feature map;

[0193] The identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0194] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0195] If there is no feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger;

[0196] Outputting reminder information, and / or storing the identity information of the pedestrian in the image of the pedestrian to be identified and the feature map to be identified in a feature map library in correspondence;

[0197] The reminder information is used to indicate that the pedestrian in the pedestrian image to be identified is a stranger.

[0198] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0199] Acquire an image of a pedestrian to be identified, where the image of the pedestrian to be identified is a visible light image and / or an infrared image;

[0200] The pedestrian image to be identified is input into the target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified; the target feature extraction model is obtained by training the initial feature extraction model based on the first training set, and the first training set includes a first visible light image, a first infrared image corresponding to the first visible light image, and a standard feature map of the first visible light image;

[0201] If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0202] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0203] Acquire a first visible light image;

[0204] Inputting the first visible light image into a target generation model to obtain a first infrared image corresponding to the first visible light image; the target generation model is obtained by training a generative adversarial network based on a second training set, the second training set including a plurality of second visible light images and a second infrared image corresponding to each second visible light image;

[0205] using the first visible light image and the first infrared image corresponding to the first visible light image as data in a first training set;

[0206] The initial feature extraction model is trained based on the first training set to obtain a target feature extraction model.

[0207] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0208] Inputting the second visible light image into the intermediate generation model to obtain a first generation image output by the intermediate generation model; the intermediate generation model is obtained by training the generation model based on the second visible light image and a second infrared image corresponding to the second visible light image, and the intermediate generation model is used to generate a corresponding infrared image according to the visible light image;

[0209] The second visible light image, the second infrared image corresponding to the second visible light image, and the first generated image are input into the discriminant model to obtain a first discriminant result output by the discriminant model; the second infrared image corresponding to the second visible light image is real data, the discriminant model is used to distinguish between real data and generated data, and the discriminant result is used to indicate the probability that the infrared image is generated data;

[0210] Adjusting the parameters of the discrimination model according to the first discrimination result and the standard discrimination result;

[0211] The infrared image generated by the intermediate generation model is discriminated by using the adjusted discriminant model, and the parameters of the intermediate generation model are adjusted according to the discrimination results to obtain the target generation model.

[0212] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0213] Inputting the second visible light image into the intermediate generation model to obtain a second generated image; the second generated image is an infrared image;

[0214] Inputting the second visible light image and the second generated image into the discriminant model after parameter adjustment to obtain a second discriminant result output by the discriminant model after parameter adjustment;

[0215] The parameters of the intermediate generation model are adjusted according to the second discrimination result, and the intermediate generation model after parameter adjustment is used as the target generation model.

[0216] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0217] If there is a feature map whose similarity with the feature map to be identified is greater than a preset threshold value among several feature maps in the feature map library, the feature map whose similarity with the feature map to be identified is greater than the preset threshold value is used as the target feature map, and it is determined that the feature map to be identified matches the target feature map;

[0218] The identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0219] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0220] If there is no feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger;

[0221] Outputting reminder information, and / or storing the identity information of the pedestrian in the image of the pedestrian to be identified and the feature map to be identified in a feature map library in correspondence;

[0222] The reminder information is used to indicate that the pedestrian in the pedestrian image to be identified is a stranger.

[0223] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0224] Acquire an image of a pedestrian to be identified, where the image of the pedestrian to be identified is a visible light image and / or an infrared image;

[0225] The pedestrian image to be identified is input into the target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified; the target feature extraction model is obtained by training the initial feature extraction model based on the first training set, and the first training set includes a first visible light image, a first infrared image corresponding to the first visible light image, and a standard feature map of the first visible light image;

[0226] If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0227] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0228] Acquire a first visible light image;

[0229] Inputting the first visible light image into a target generation model to obtain a first infrared image corresponding to the first visible light image; the target generation model is obtained by training a generative adversarial network based on a second training set, the second training set including a plurality of second visible light images and a second infrared image corresponding to each second visible light image;

[0230] using the first visible light image and the first infrared image corresponding to the first visible light image as data in a first training set;

[0231] The initial feature extraction model is trained based on the first training set to obtain a target feature extraction model.

[0232] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0233] Inputting the second visible light image into the intermediate generation model to obtain a first generation image output by the intermediate generation model; the intermediate generation model is obtained by training the generation model based on the second visible light image and a second infrared image corresponding to the second visible light image, and the intermediate generation model is used to generate a corresponding infrared image according to the visible light image;

[0234] The second visible light image, the second infrared image corresponding to the second visible light image, and the first generated image are input into the discriminant model to obtain a first discriminant result output by the discriminant model; the second infrared image corresponding to the second visible light image is real data, the discriminant model is used to distinguish between real data and generated data, and the discriminant result is used to indicate the probability that the infrared image is generated data;

[0235] Adjusting the parameters of the discrimination model according to the first discrimination result and the standard discrimination result;

[0236] The infrared image generated by the intermediate generation model is discriminated by using the adjusted discriminant model, and the parameters of the intermediate generation model are adjusted according to the discrimination results to obtain the target generation model.

[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0238] Inputting the second visible light image into the intermediate generation model to obtain a second generated image; the second generated image is an infrared image;

[0239] Inputting the second visible light image and the second generated image into the discriminant model after parameter adjustment to obtain a second discriminant result output by the discriminant model after parameter adjustment;

[0240] The parameters of the intermediate generation model are adjusted according to the second discrimination result, and the intermediate generation model after parameter adjustment is used as the target generation model.

[0241] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0242] If there is a feature map whose similarity with the feature map to be identified is greater than a preset threshold value among several feature maps in the feature map library, the feature map whose similarity with the feature map to be identified is greater than the preset threshold value is used as the target feature map, and it is determined that the feature map to be identified matches the target feature map;

[0243] The identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

[0244] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0245] If there is no feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger;

[0246] Outputting reminder information, and / or storing the identity information of the pedestrian in the image of the pedestrian to be identified and the feature map to be identified in a feature map library in correspondence;

[0247] The reminder information is used to indicate that the pedestrian in the pedestrian image to be identified is a stranger.

[0248] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0249] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0250] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0251] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A pedestrian re-identification method, characterized in that: The method comprises: Acquire a pedestrian image to be identified, where the pedestrian image to be identified is a visible light image and / or an infrared image; Inputting the pedestrian image to be identified into a target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified; the target feature extraction model is obtained by training an initial feature extraction model based on a first training set, wherein the first training set includes a first visible light image, a first infrared image corresponding to the first visible light image, and a standard feature map of the first visible light image; If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

2. The method according to claim 1, characterized in that The method further comprises: Acquire the first visible light image; Inputting the first visible light image into a target generation model to obtain a first infrared image corresponding to the first visible light image; the target generation model is obtained by training a generative adversarial network based on a second training set, wherein the second training set includes a plurality of second visible light images and a second infrared image corresponding to each of the second visible light images; using the first visible light image and a first infrared image corresponding to the first visible light image as data in a first training set; The initial feature extraction model is trained based on the first training set to obtain the target feature extraction model.

3. The method according to claim 2, characterized in that The generative adversarial network includes a generative model and a discriminative model, and the method further includes: Inputting the second visible light image into an intermediate generation model to obtain a first generation image output by the intermediate generation model; the intermediate generation model is obtained by training the generation model based on the second visible light image and a second infrared image corresponding to the second visible light image, and the intermediate generation model is used to generate a corresponding infrared image according to the visible light image; The second visible light image, the second infrared image corresponding to the second visible light image, and the first generated image are input into the discriminant model to obtain a first discriminant result output by the discriminant model; the second infrared image corresponding to the second visible light image is real data, the discriminant model is used to distinguish between real data and generated data, and the discriminant result is used to indicate the probability that the infrared image is generated data; Adjusting the parameters of the discrimination model according to the first discrimination result and the standard discrimination result; The infrared image generated by the intermediate generation model is discriminated by using the discriminant model after parameter adjustment, and the parameters of the intermediate generation model are adjusted according to the discrimination result to obtain the target generation model.

4. The method according to claim 3, characterized in that The method of using the parameter-adjusted discriminant model to discriminate the infrared image generated by the intermediate generation model, and adjusting the parameters of the intermediate generation model according to the discriminant result to obtain the target generation model includes: Inputting the second visible light image into the intermediate generation model to obtain a second generated image; the second generated image is an infrared image; Inputting the second visible light image and the second generated image into the parameter-adjusted discriminant model to obtain a second discriminant result output by the parameter-adjusted discriminant model; The parameters of the intermediate generation model are adjusted according to the second discrimination result, and the intermediate generation model after parameter adjustment is used as the target generation model.

5. The method according to any one of claims 1 to 4, characterized in that: If the feature map to be identified matches the target feature map in the feature map library, the identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified, including: If there is a feature map among several feature maps in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, the feature map whose similarity with the feature map to be identified is greater than the preset threshold is used as a target feature map, and it is determined that the feature map to be identified matches the target feature map; The identity information of the pedestrian corresponding to the target feature map is determined as the identity information of the pedestrian in the pedestrian image to be identified.

6. The method according to claim 5, characterized in that The method further comprises: If there is no feature map in the feature map library whose similarity with the feature map to be identified is greater than a preset threshold, it is determined that the identity information of the pedestrian in the pedestrian image to be identified is a stranger; Outputting reminder information, and / or storing the identity information of the pedestrian in the image of the pedestrian to be identified and the feature map to be identified in the feature map library in correspondence; The reminder information is used to indicate that the pedestrian in the pedestrian image to be identified is a stranger.

7. A pedestrian re-identification device, characterized in that: The device comprises: A first acquisition module is used to acquire an image of a pedestrian to be identified, wherein the image of the pedestrian to be identified is a visible light image and / or an infrared image; a second acquisition module, configured to input the pedestrian image to be identified into a target feature extraction model to obtain a feature map to be identified corresponding to the pedestrian image to be identified; the target feature extraction model is obtained by training an initial feature extraction model based on a first training set, wherein the first training set includes a first visible light image and a first infrared image corresponding to the first visible light image; The first determination module is used to determine the identity information of the pedestrian corresponding to the target feature map as the identity information of the pedestrian in the pedestrian image to be identified if the feature map to be identified matches the target feature map in the feature map library.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Infrared picture identification method and device based on cyclic generative adversarial network, and medium

    CN110633698A

  • Pedestrian re-identification method and device, electronic equipment and storage medium

    CN111967314A

  • ViT-fused cross-modal pedestrian re-identification method and device

    CN114898397A

  • Cross-modal pedestrian re-identification method based on channel recombination and attention mechanism

    CN115100678A

  • Cross-modal pedestrian re-identification method based on specific modal feature compensation

    CN115171148A