An unsupervised visible light and infrared bidirectional cross-modal pedestrian search method

Through an unsupervised visible and infrared bidirectional cross-modal pedestrian search method, the modality adaptive dynamic visual Transformer network and the bidirectional cross-modal matching loss function are used to solve the limitations of the existing technology under poor lighting conditions and data set annotation. problem, achieving pedestrian search and recognition capabilities under adverse lighting conditions.

CN114154017BActive Publication Date: 2024-08-23HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111423613.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-26
Publication Date
2024-08-23
Estimated Expiration
2041-11-26

AI Technical Summary

Technical Problem

Existing pedestrian search methods are difficult to obtain effective pedestrian appearance features under poor lighting conditions, and their practicability and scalability are limited by data set annotation issues.

Method used

An unsupervised visible light and infrared bidirectional cross-modal pedestrian search method is designed, using the modality adaptive dynamic visual Transformer network and the query-guided unsupervised pedestrian suggestion generation module, combined with the bidirectional cross-modal matching loss function, to achieve visible light and feature extraction and matching of infrared images.

Benefits of technology

It can effectively search and identify pedestrians with specific identities under poor lighting conditions, easing the limitations of data set annotation on supervised methods, and realizing visible-infrared bidirectional cross-modal pedestrian search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114154017B
    Figure CN114154017B
Patent Text Reader

Abstract

The present invention belongs to the field of computer vision technology, and specifically relates to an unsupervised visible light and infrared bidirectional cross-modal pedestrian search method. The present invention designs a modality-adaptive dynamic visual Transformer network, which simultaneously processes images of two different modalities, visible light and infrared, through the same network to meet the requirements of modality difference and consistency; designs a query-guided unsupervised pedestrian suggestion generation module, and uses a bidirectional cross-modal matching loss function based on contrastive learning to achieve unsupervised visible light-infrared bidirectional cross-modal pedestrian search. The present invention solves the limitations of existing pedestrian search methods under poor lighting conditions and the problem of data set annotation, and can achieve visible light-infrared bidirectional cross-modal pedestrian search, that is, given a visible light pedestrian image, search for the infrared scene image where the corresponding pedestrian appears and obtain its location, and given an infrared pedestrian image, search for the visible light scene image where the corresponding pedestrian appears and obtain its location.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer vision, and in particular relates to an unsupervised visible light and infrared bidirectional cross-modal pedestrian search method. Background Art

[0002] Nowadays, video cameras have been widely deployed in public places such as stations, airports, shopping malls, schools, etc., forming a huge surveillance network. In recent years, pedestrian search has gradually become one of the important applications of computer vision in the field of video surveillance. It is worth noting that pedestrian search processes the entire image captured by the camera, and there is usually no overlap in the field of view between the cameras that collect the image. Pedestrian detection, pedestrian re-identification and pedestrian search are different; among them, pedestrian detection is to locate the position of pedestrians in the scene image indiscriminately, and there is no difference between different pedestrians; pedestrian re-identification is to search for pedestrian images with corresponding identities in a gallery containing many pedestrian images for a given query pedestrian image, and the identities of different pedestrians are different; pedestrian search is to search for scene images with corresponding pedestrians in a gallery containing many scene images for a given query pedestrian image and obtain their location, that is, it includes both detection and re-identification processes, which is more suitable for practical applications.

[0003] Existing pedestrian search methods target visible light images. However, in practical applications, it is necessary to detect and re-identify pedestrians of specific identities under poor lighting conditions such as low light or no light. In this case, it is difficult for existing pedestrian search methods based on visible light to obtain effective pedestrian appearance features. In addition, the annotation problem of pedestrian search datasets limits the practicality and scalability of current supervised methods. Summary of the invention

[0004] The purpose of the present invention is to solve the limitations of existing pedestrian search methods under poor lighting conditions and the problem of data set annotation, and to provide an unsupervised visible light and infrared bidirectional cross-modal pedestrian search method that can realize visible light-infrared bidirectional cross-modal pedestrian search.

[0005] An unsupervised visible light and infrared bidirectional cross-modal pedestrian search method comprises the following steps:

[0006] Step 1: Collect visible light and infrared query pedestrian images and scene image data respectively, and create a visible light-infrared bidirectional cross-modal pedestrian search dataset suitable for unsupervised methods;

[0007] Step 2: Design a modality-adaptive dynamic visual Transformer network as a feature extractor, with the input being the visible and infrared gallery scene images and the query pedestrian images, and the output being the feature map of the corresponding modality;

[0008] Step 3: Design a query-guided unsupervised pedestrian proposal generation module, input the feature maps of the gallery scene image and the query pedestrian image into the module at the same time, and obtain the predicted scene pedestrian feature map after processing;

[0009] Step 4: Design a bidirectional cross-modal matching module. After processing the feature map of the query pedestrian image and the predicted scene pedestrian feature map through the pooling layer and the modality-adaptive dynamic visual Transformer, input them into the bidirectional cross-modal matching loss function and perform network optimization in an unsupervised manner.

[0010] Furthermore, the modality-adaptive dynamic visual Transformer network designed in step 2 is composed of stacked modality-adaptive dynamic visual Transformers; the modality-adaptive dynamic visual Transformer includes a switchable normalization layer, a multi-head attention layer and a 1X1 dynamic convolution layer; its input is a combination of linear embedding and modality embedding, which can adaptively select the normalization method according to the different modalities and dynamically adjust the structure of the linear mapping part.

[0011] Furthermore, the query-guided unsupervised pedestrian suggestion generation module designed in the step 3 includes a switchable normalization layer, a query-guided attention layer, and an unsupervised pedestrian suggestion frame layer; in the query-guided attention layer, the gallery scene image feature map obtained in step 2 is weighted by different weight matrices before being input into the convolution operation, and then a pixel-by-pixel dot product is performed and a softmax calculation is performed; thereafter, the query pedestrian feature map obtained in step 2 is used as a convolution kernel, and a convolution operation is performed on the processed gallery scene image feature map to obtain a query-guided attention map; the unsupervised pedestrian suggestion frame layer obtains a predicted pedestrian feature map in the scene image based on the query-guided attention map and the gallery scene image feature map obtained in step 2.

[0012] Furthermore, the bidirectional cross-modal matching module designed in step 4 includes a pooling layer, a modality-adaptive dynamic visual Transformer, and a bidirectional cross-modal matching loss function; the input of the module designed in step 4 is the predicted pedestrian feature map output by step 3 and the query pedestrian feature map output by step 2; the two sets of feature maps are respectively input to the bidirectional cross-modal matching loss function after passing through the pooling layer and the modality-adaptive dynamic visual Transformer to optimize the network;

[0013] The defined bidirectional cross-modal matching loss function is as follows,

[0014]

[0015] Among them, '·' is the inner product operation; τ1 and τ2 are hyperparameters and τ1, τ2>0, which are temperature coefficients that control the softness of the probability distribution and are automatically learned during the training process; x i Refers to the predicted pedestrian features of the i-th gallery scene image in a batch after step 3; q i and q j Refers to the features obtained after step 2 of the i-th and j-th query pedestrian images in a batch, and j≠i; in each training, 2N scene images and 2N query pedestrian images are selected respectively; in each batch, the total number of scene images in the infrared modality library and the total number of scene images in the visible light modality library are the same, which is N. Similarly, the total number of query pedestrian images in the visible light modality and the total number of query pedestrian images in the infrared modality are the same, which is N; when i∈[0,N-1], x i is the predicted pedestrian feature of the scene image in the visible light modality library, i∈[N,2N-1], x i is the predicted pedestrian feature of the infrared modality library scene image; when j∈[0,N-1], q i and q j is the feature of the pedestrian image queried in the infrared mode; when j∈[N,2N-1], q i and q j Query the features of pedestrian images for visible light modality;

[0016] In step 2, step 3, and step 4, the entire network is end-to-end, and the training and testing process does not need to be terminated from input to output.

[0017] The beneficial effects of the present invention are:

[0018] The present invention designs a modality-adaptive dynamic visual Transformer network, which processes images of two different modalities, visible light and infrared, through the same network to meet the requirements of modality difference and consistency; designs a query-guided unsupervised pedestrian suggestion generation module, and uses a bidirectional cross-modal matching loss function based on contrastive learning to achieve unsupervised visible light-infrared bidirectional cross-modal pedestrian search. The present invention solves the limitations of existing pedestrian search methods under poor lighting conditions and the problem of data set annotation, and can achieve visible light-infrared bidirectional cross-modal pedestrian search, that is, given a visible light pedestrian image, search for the infrared scene image where the corresponding pedestrian appears and obtain its location, and given an infrared pedestrian image, search for the visible light scene image where the corresponding pedestrian appears and obtain its location. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is the overall flow chart of the present invention.

[0020] Figure 2 It is a schematic diagram of the overall network structure of the present invention.

[0021] Figure 3 This is a network structure diagram of the feature extractor of the present invention.

[0022] Figure 4 Schematic diagram of the modality-adaptive dynamic visual Transformer of the present invention.

[0023] Figure 5 Module graph for our query-guided unsupervised person proposal generation.

[0024] Figure 6 Schematic diagram of the query guided attention layer of the present invention.

[0025] Figure 7 This is a diagram of the bidirectional cross-modal matching module of the present invention. DETAILED DESCRIPTION

[0026] The present invention is further described below in conjunction with the accompanying drawings.

[0027] The present invention proposes an unsupervised visible light-infrared bidirectional cross-modal pedestrian search method, which proposes a new network architecture for new application fields. The present invention designs a modality-adaptive dynamic visual Transformer network, which simultaneously processes images of two different modalities, visible light and infrared, through the same network to meet the requirements of modality difference and consistency; designs a query-guided unsupervised pedestrian suggestion generation module, and uses a bidirectional cross-modal matching loss function based on contrastive learning to achieve unsupervised visible light-infrared bidirectional cross-modal pedestrian search. The present invention makes up for the limitations of existing pedestrian search methods under poor lighting conditions and alleviates the limitations of supervised methods caused by the labeling problem of pedestrian search data sets in the case of massive data.

[0028] The present invention solves the limitations of existing pedestrian search methods under poor lighting conditions and the problem of data set annotation, and can realize visible light-infrared bidirectional cross-modal pedestrian search, that is, given a visible light pedestrian image, it can search for the infrared scene image where the corresponding pedestrian appears and obtain its location; given an infrared pedestrian image, it can search for the visible light scene image where the corresponding pedestrian appears and obtain its location.

[0029] S1. Collect visible light and infrared query pedestrian images and scene image data respectively, and produce a visible light-infrared bidirectional cross-modal pedestrian search dataset suitable for unsupervised methods;

[0030] S2. A modality-adaptive dynamic visual Transformer network is designed as a feature extractor, with visible and infrared gallery scene images and query pedestrian images as input, and the output is the feature map of the corresponding modality;

[0031] S3. A query-guided unsupervised pedestrian proposal generation module is designed. The feature maps of the gallery scene image and the query pedestrian image are simultaneously input into the module, and the predicted scene pedestrian feature map is obtained after processing;

[0032] S4. A bidirectional cross-modal matching module is designed. After the feature map of the query pedestrian image and the predicted scene pedestrian feature map are processed by the pooling layer and the modality-adaptive dynamic visual Transformer, they are input into the bidirectional cross-modal matching loss function and the network is optimized in an unsupervised manner.

[0033] Embodiment 1:

[0034] S1, collects visible light and infrared pedestrian images and scene image data respectively, and creates data sets;

[0035] It is known that there are 2m pedestrians of different identities. Among them, m pedestrians have their indoor and outdoor pedestrian images collected by visible light cameras under good lighting conditions, and their indoor and outdoor scene images collected by infrared cameras under bad lighting conditions; another m pedestrians have their indoor and outdoor scene images collected by visible light cameras under good lighting conditions, and their indoor and outdoor pedestrian images collected by infrared cameras under bad lighting conditions;

[0036] The coverage of the pedestrian image is at least the rectangular frame surrounding the complete pedestrian, and no more than 30% partial occlusion is allowed. The pedestrian's posture and movement are not limited; the scene image can contain multiple pedestrians; the camera's field of view does not overlap;

[0037] S2, a modality-adaptive dynamic visual Transformer network is designed as a feature extractor;

[0038] The feature extractor includes two branches: gallery feature extraction and query feature extraction. The parameters between the two are independent, such as Figure 3 As shown;

[0039] The input images are normalized, where the gallery scene images are normalized to 1500X 900 and the query pedestrian images are normalized to 250X 150. Assuming that the number of images in each batch is 2N, the 0th to N-1th images in the gallery feature extraction network are visible light images, and the Nth to 2N-1th images are infrared images. The 0th to N-1th images in the query feature extraction network are infrared images, and the Nth to 2N-1th images are visible light images.

[0040] Taking the patch division method of Swin Transformer as an example, but not limited to the division methods of other visual transformers, after dividing the image into patches, it is mapped into linear embedding vectors; after the linear embedding of different modalities, the modal embedding is superimposed and used as the input of the modality adaptive dynamic visual transformer;

[0041] like Figure 4 As shown in the figure, the modality-adaptive dynamic visual Transformer consists of a switchable normalization layer, a multi-head attention layer and a 1X1 dynamic convolution layer. Its input is a combination of linear embedding and modality embedding. It can dynamically adjust the focus of the Transformer according to the different modality embeddings, thereby realizing the simultaneous processing of images of two different modalities, visible light and infrared, through the same network, meeting the requirements of modality difference and consistency.

[0042] S3, such as Figure 5 As shown, for the gallery scene features g and query pedestrian features q obtained by S2, after being processed by the switchable normalization layer, they are input to the query guided attention layer;

[0043] The structure of the query-guided attention layer is as follows Figure 6 As shown, g' i Refers to the normalized features of the i-th scene image feature map in a batch output by S2, q' i Refers to the normalized features of the i-th query pedestrian image feature map in a batch output by S2, W i K and W i Q is the weight matrix in the attention layer, g' i After passing W i K and W i Q After weighting, do pixel-by-pixel dot product and calculate through softmax. Then, use q i As the convolution kernel, a convolution operation is performed on it to obtain the query-guided attention map.

[0044] The activated part in the output attention map is the predicted pedestrian position; the unsupervised pedestrian proposal frame layer obtains the predicted pedestrian position coordinates according to the query-guided attention map, and corresponds the predicted pedestrian position coordinates with the gallery scene features g obtained by S2 to obtain the predicted pedestrian features x.

[0045] S4, such as Figure 7As shown in the figure, the predicted pedestrian feature x output by S3 and the query pedestrian feature q output by S2 are used as the input of the pooling layer, and feature maps of the same size are output and respectively input to the modality-adaptive dynamic visual Transformer. The output features obtained are used as the input of the bidirectional cross-modal matching loss function; the bidirectional cross-modal matching loss function is defined as follows:

[0046]

[0047] Among them, '·' is the inner product operation; τ1 and τ2 are hyperparameters and τ1, τ2>0, which are temperature coefficients that control the softness of the probability distribution and are automatically learned during the training process; x i Refers to the predicted pedestrian features obtained after the i-th gallery scene image in a batch passes through S3, q i and q j Refers to the features obtained after S2 of the i-th and j-th query pedestrian images in a batch, and j≠i; in each training, 2N scene images and 2N query pedestrian images are selected respectively; in each batch, the total number of infrared modality scene images and visible light modality scene images is the same, which is N. Similarly, the total number of visible light modality query pedestrian images and infrared modality query pedestrian images is the same, which is N. When i∈[0,N-1], x i is the predicted pedestrian feature of the visible light modality scene image, i∈[N,2N-1], x i is the predicted pedestrian feature of the infrared modality scene image; when j∈[0,N-1], q i and q j is the feature of the pedestrian image queried in the infrared mode; when j∈[N,2N-1], q i and q j The features of pedestrian images are queried for the visible light modality; therefore, bidirectional cross-modal matching can be achieved through this loss function. The entire network of S2, S3, and S4 is end-to-end, and the training and testing process does not need to be terminated from input to output.

[0048] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An unsupervised visible light and infrared bidirectional cross-modal pedestrian search method, characterized in that: The following steps are involved: Step 1: Collect visible light and infrared query pedestrian images and scene image data respectively, and create a visible light-infrared bidirectional cross-modal pedestrian search dataset suitable for unsupervised methods; Step 2: Design a modality-adaptive dynamic visual Transformer network as a feature extractor, with the input being the visible and infrared gallery scene images and the query pedestrian images, and the output being the feature map of the corresponding modality; Step 3: Design a query-guided unsupervised pedestrian proposal generation module, input the feature maps of the gallery scene image and the query pedestrian image into the module at the same time, and obtain the predicted scene pedestrian feature map after processing; Step 4: Design a bidirectional cross-modal matching module, process the feature map of the query pedestrian image and the predicted scene pedestrian feature map through the pooling layer and the modality-adaptive dynamic visual Transformer, and input them into the bidirectional cross-modal matching loss function, and perform network optimization in an unsupervised manner; The bidirectional cross-modal matching module includes a pooling layer, a modality-adaptive dynamic visual transformer, and a bidirectional cross-modal matching loss function; the input of the module designed in step 4 is the predicted pedestrian feature map output by step 3 and the query pedestrian feature map output by step 2; the two sets of feature maps are respectively input to the bidirectional cross-modal matching loss function after passing through the pooling layer and the modality-adaptive dynamic visual transformer to optimize the network; The defined bidirectional cross-modal matching loss function is as follows, Among them, '·' is the inner product operation; τ1 and τ2 are hyperparameters and τ1, τ2>0, which are temperature coefficients that control the softness of the probability distribution and are automatically learned during the training process; x i Refers to the predicted pedestrian features of the i-th gallery scene image in a batch after step 3; q i and q j Refers to the features obtained after step 2 of the i-th and j-th query pedestrian images in a batch, and j≠i; in each training, 2N scene images and 2N query pedestrian images are selected respectively; in each batch, the total number of scene images in the infrared modality library and the total number of scene images in the visible light modality library are the same, which is N. Similarly, the total number of query pedestrian images in the visible light modality and the total number of query pedestrian images in the infrared modality are the same, which is N; when i∈[0,N-1], x i is the predicted pedestrian feature of the scene image in the visible light modality library, i∈[N,2N-1], x i is the predicted pedestrian feature of the infrared modality library scene image; when j∈[0,N-1], q i and q j is the feature of the pedestrian image queried in the infrared mode; when j∈[N,2N-1], q i and q j Query the features of pedestrian images for visible light modality; In step 2, step 3, and step 4, the entire network is end-to-end, and the training and testing process does not need to be terminated from input to output.

2. The unsupervised visible light and infrared bidirectional cross-modal pedestrian search method according to claim 1 is characterized by: The modality-adaptive dynamic visual Transformer network designed in step 2 is composed of stacked modality-adaptive dynamic visual Transformers; the modality-adaptive dynamic visual Transformer includes a switchable normalization layer, a multi-head attention layer and a 1X1 dynamic convolution layer; its input is a combination of linear embedding and modality embedding, which can adaptively select the normalization method according to the different modalities and dynamically adjust the structure of the linear mapping part.

3. The unsupervised visible light and infrared bidirectional cross-modal pedestrian search method according to claim 1 is characterized by: The query-guided unsupervised pedestrian suggestion generation module designed in step 3 includes a switchable normalization layer, a query-guided attention layer, and an unsupervised pedestrian suggestion box layer; In the query-guided attention layer, the gallery scene image feature map obtained in step 2 is weighted by different weight matrices before being input into the convolution operation, and then pixel-by-pixel dot product is performed and softmax is calculated; then, the query pedestrian feature map obtained in step 2 is used as the convolution kernel, and a convolution operation is performed on the processed gallery scene image feature map to obtain the query-guided attention map; The unsupervised pedestrian proposal layer obtains the predicted pedestrian feature map in the scene image based on the query-guided attention map and the gallery scene image feature map obtained in step 2.