Zero-sample pedestrian re-identification method and system in dark light environment

Through the combination of the dark-light image synthesis network and the Retinex decomposition network, image pairs are generated and processed, and the accuracy and stability of pedestrian re-identification in zero-sample dark-light environments are solved, and high-accuracy recognition in dark-light environments is achieved .

CN119314204AActive Publication Date: 2025-01-14BEIJING BOYANG JUTIAN TECHNOLOGY DEVELOPMENT CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411359167.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-14
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

The prior art is difficult to realize pedestrian re-identification in a dark light environment under zero sample situation, especially in the absence of dark light image training data, the recognition accuracy and model generalization ability are insufficient.

Method used

The dark-light image synthesis network is used to generate dark-light image pairs with good lighting images, and the features are extracted through the feature encoder and reflective layer transposed convolutional decoder, and the network is used to decompose the images into reflection and lighting components, and then the reflection components are exchanged and then re-exchanged. Synthesize images, encode and decode them multiple times, and calculate the loss function to optimize network parameters.

Benefits of technology

It improves the accuracy and stability of pedestrian re-identification in dark light environments, and can effectively identify pedestrian images without relying on dark light environments, improving adaptability and practicality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119314204A_ABST
    Figure CN119314204A_ABST
Patent Text Reader

Abstract

The invention discloses a zero-sample pedestrian re-identification method and system in a dark light environment, and relates to the technical field of computer vision. The method comprises the following steps: generating a dark light image without illumination to obtain an image pair 1; extracting features of the image pair 1 through a feature encoder to obtain features; the features are processed by a reflection layer transposition convolution decoder to obtain a decoding result, and the features are processed by a re-identification network to obtain a re-identification result; respectively decomposing the image in the image pair 1 into a reflection component and an illumination component; exchanging the reflection component of the image pair 1, and re-synthesizing the exchanged reflection component with the original illumination component to obtain an image pair 2; enabling the image pair 2 to pass through a feature encoder and a reflecting layer transposition convolution decoder to obtain a decoding result; calculating a loss function according to a decoding result and a re-identification result of the image pair 1 and a decoding result of the image pair 2; adjusting network parameters of the re-identification network according to the loss function for optimization; according to the invention, the accuracy of re-identification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision technology, and in particular relates to a zero-sample pedestrian re-identification method and system in a dark light environment. Background Art

[0002] With the rapid development of cities and people's increasing attention to safety needs, pedestrian re-identification technology has become increasingly important in the fields of video surveillance, intelligent traffic management, and security systems. Traditional pedestrian re-identification technology usually relies on a well-lit environment, under which the camera can capture clear images, making the pedestrian recognition process more accurate. However, in low-light environments, such as at night, in dimly lit rooms, and in underground parking lots, pedestrian images are often blurred, making existing pedestrian re-identification methods difficult to cope with.

[0003] In order to solve the challenge of pedestrian recognition in low-light environments, dark-light environment pedestrian re-identification technology has been developed in recent years. These technologies usually rely on training datasets containing dark-light images and improve recognition accuracy through specific image enhancement and processing methods. However, in practical applications, it is often impossible to obtain enough dark-light images for training. This leads to the situation that there are only images with good lighting in the training set, and there is a lack of zero samples of dark-light images, which makes pedestrian re-identification technology face greater challenges.

[0004] Zero-sample dark-light pedestrian re-identification technology aims to solve this problem, that is, to achieve effective recognition of pedestrians in low-light environments without dark-light images as training samples. The core of this technology is how to use images collected only under good lighting conditions, through algorithm design and network model optimization, so that the recognition system can adapt to low-light conditions and accurately identify pedestrians. The development of this method has broad application prospects, especially in scenarios where it is difficult to obtain dark-light images, such as all-weather monitoring systems, nighttime pedestrian detection in intelligent traffic management, etc.

[0005] Currently, existing pedestrian re-identification methods in dark light environments usually rely on multimodal data, such as combining visible light and infrared images, to improve recognition accuracy in low-light conditions. However, these methods are not only complex in data acquisition, but also difficult to promote in practical applications. Pedestrian re-identification technology in dark light environments with zero samples is still in the preliminary research stage, and there is no mature commercial solution. Therefore, developing a pedestrian re-identification technology based on training only with well-lit images, which can maintain high accuracy in dark light conditions, has become a major challenge and hot spot in current technology research and development.

[0006] Similarly, no patents related to zero-sample pedestrian re-identification technology in dark light environments have been found. Some patents, such as a frame extraction pedestrian retrieval method based on YOLOv5s and staged regularized joint pedestrian re-identification with publication number CN118522039A, have made significant progress by combining pedestrian re-identification algorithms and target detection technologies. However, in the application scenarios of pedestrian re-identification in dark light environments, there are still many problems to be solved, such as image quality degradation under low light conditions, reduced accuracy of pedestrian feature extraction, and insufficient model generalization ability. The pedestrian re-identification method and device based on attention mechanism and feature fusion strategy with publication number CN118470752A improves the accuracy of pedestrian re-identification by introducing attention mechanism and multimodal feature fusion strategy. However, this type of method still relies on large-scale annotated data sets and is difficult to cope with pedestrian recognition under zero-sample conditions. Existing methods do not involve pedestrian re-identification through zero samples and in dark light environments.

[0007] The present invention proposes a zero-sample pedestrian re-identification method and system in a dark-light environment, thereby solving the current problem of pedestrian re-identification in a dark-light environment. Summary of the invention

[0008] The purpose of the present invention is to provide a zero-sample pedestrian re-identification method and system in a dark-light environment, so as to solve the problems raised in the above background technology that the existing technology of pedestrian re-identification in a dark-light environment lacks research on the zero-sample situation.

[0009] To achieve the above object, the present invention adopts the following technical solutions:

[0010] A first aspect of the present invention provides a zero-sample pedestrian re-identification method in a dark environment, comprising the following steps:

[0011] S1, using a dark-light image synthesis network to process the image with good illumination to generate a dark-light image with missing illumination, and combining the image with good illumination and the dark-light image with missing illumination to obtain image pair 1;

[0012] S2, extract features from image pair 1 through a feature encoder to obtain features;

[0013] S3, processing the features through the reflection layer transposed convolution decoder to obtain a decoding result, and processing the features through the re-identification network to obtain a re-identification result;

[0014] S4, using the Retinex decomposition network to decompose the image in the image pair 1 into a reflection component and an illumination component respectively;

[0015] S5, exchanging the reflection components of the image pair 1, and recombining the exchanged reflection components with the original illumination components to obtain the image pair 2;

[0016] S6, processing the image pair 2 through a feature encoder to obtain features, and decoding the features through a reflection layer transposed convolution decoder to obtain a decoding result;

[0017] S7, calculate the loss function according to the decoding result and re-identification result of image pair 1 and the decoding result of image pair 2, the loss function includes the decoding loss Reconstruction loss Reflection layer loss Triplet loss and cross entropy loss

[0018] S8. Adjust the network parameters of the re-identification network for optimization according to the loss function.

[0019] Preferably, the image pair 1 (I1, I2) obtained in S1 is as follows:

[0020] I2=DarkISP(I1)

[0021] Among them, I1 is an image with good lighting, I2 is a dark-light image with missing lighting, and DarkISP is a dark-light image synthesis network; images with the same nature but different lighting information are set as a pair, called image pair 1 (I1, I2).

[0022] Furthermore, the dark-light image synthesis network generates a dark-light image with missing illumination, as follows:

[0023] Read the image img with good lighting and perform inverse tone mapping on the image as shown in the following formula;

[0024] img1=0.5-sin(arcsin(1.0-2.0×img) / 3.0)

[0025] Perform inverse Gamma correction on the image as shown below;

[0026] img2=max(img1,∈)γ

[0027] Among them, the Gamma value γ is randomly selected within the preset range;

[0028] Convert the image from the standard sRGB color space to the camera's RGB color space as shown below;

[0029] img3=apply_ccm(img2,rgb2cam)

[0030] The apply_ccm function is used to linearly transform the color channel of each pixel of the input image with the specified color correction matrix, thereby realizing the conversion of the color space;

[0031] Perform inverse white balance adjustment on the image as shown below;

[0032] img4=img3×gains1

[0033] Among them, gains1 is the gain factor of the three channels of the image;

[0034] Adjust the overall brightness of the image as shown in the following formula;

[0035] img5=img4×darkness

[0036] Among them, darkness is the darkness coefficient;

[0037] Add noise to the image as shown below;

[0038] img6=img5+noise1+noise2

[0039] Among them, noise1 is the shooting noise, and noise2 is the quantization noise;

[0040] Adjust the white balance of the image again, as shown in the following formula;

[0041] img7=img6×gains2

[0042] Among them, gains2 is the gain factor of the three channels of the image;

[0043] Convert the image from the camera's RGB color space back to the standard sRGB color space as shown below;

[0044] img8=apply_ccm(img7,rgb2cam)

[0045] Perform Gamma correction on the image as shown below;

[0046]

[0047] Through the above steps, the dark-light image synthesis network synthesizes the well-illuminated image img, i.e., I1, into an illumination-deficient dark-light image img9, i.e., I2, having low-light characteristics.

[0048] Preferably, S2 is specifically as follows:

[0049] F i =FeatureEncoder(I i )

[0050] Among them, Feature Encoder is the feature encoder, I i is the image pair 1 (I1, I2), Fi It is the feature output by the feature encoder.

[0051] Preferably, S3 is specifically as follows:

[0052]

[0053] F = ReIDNet (F i )

[0054] Among them, TransConvRefDecoder is the reflection layer transposed convolution decoder, and ReIDNet is the re-identification network; The decoding result for image pair 1 is F is the re-identification result.

[0055] Further, the reflection layer transposed convolution decoder processes to obtain a decoding result, which is as follows:

[0056] The encoder encoding result is input into Conv3 and activated by ReLU function, as shown in the following formula;

[0057] DF1 = ReLU (Conv3 (Feat))

[0058] Among them, Feat is the output result of the feature encoder;

[0059] The output result DF1 of the convolution layer Conv3 is input into the transposed convolution layer TransConv and activated by the Sigmoid function, as shown in the following formula;

[0060]

[0061] in, is the decoding result obtained after decoding, that is, the reflection component

[0062] Preferably, in S4, the image pair 1 is decomposed using a Retinex decomposition network, and the image I1 is decomposed into R1 and L1. Similarly, the image I2 is decomposed into R2 and L2, as follows:

[0063] R i ,L i =RetinexDecomNet(I i )

[0064] Among them, Retinex DecomNet is the Retinex decomposition network, R i is the reflection component with reflection information, L i is the illumination component with illumination information;

[0065] Furthermore, the Retinex decomposition network performs image decomposition as follows:

[0066] Perform maximum channel expansion processing on the input image Img, extract the maximum channel input_max of the input image, and then concatenate it with the original image to generate an image input_img containing more information; as shown in the following formula;

[0067] input_max=torch.max(Img,dim=1)[0]

[0068] input_img=torch.cat((input_max,Img),dim=1)

[0069] Perform shallow feature extraction on the expanded image and obtain preliminary features feats0 through the convolution layer net1_conv0; as shown in the following formula;

[0070] feats0=net1_conv0(input_img)

[0071] Through the combination of multiple convolutional layers and activation functions net1_convs, the preliminary features are deeply extracted to generate advanced features featss; as shown in the following formula;

[0072] featss = net1_convs(feats0)

[0073] Among them, the structure of net1_convs is composed of five stacks of convolutional layers and ReLU activation functions;

[0074] Reconstruct the high-level features and apply the convolution layer net1_recon to convert the high-level features into the output channel image outs; as shown in the following formula;

[0075] outs = net1_recon(featss)

[0076] Use sigmoid to normalize the output channel image to generate the reflection component R and the illumination component L; as shown in the following formula;

[0077] R=sigmoid(outs[:,0:3,∶,∶])

[0078] L=sigmoid(outs[:,3:4,∶,∶])

[0079] Through the above steps, the input image is decomposed into a reflection image R and an illumination image L.

[0080] Preferably, the image pair 2 (I′1, I′2) obtained in S5 is specifically as follows:

[0081] (R1,L1),(R2,L2)→(R2,L1),(R1,L2)

[0082] I′1=R2·L1

[0083] I′2=R1·L2.

[0084] Preferably, the decoding results R′1 and R′2 obtained in S6 are as follows:

[0085] F′ i =FeatureEncoder(I′ i )

[0086] R′ i =TransConvRefDecoder(F′ i )

[0087] Among them, I′ i is the image pair 2 (I′1, I′2), F′ i is the feature output by the feature encoder, R′ i Decoding results R′1 and R′2 are obtained for image pair 2.

[0088] Preferably, the loss function in S7 is as follows:

[0089]

[0090] Among them, In, MSE represents mean square error, and SSIM represents structural similarity index measure;

[0091] exist In , MAE represents the mean absolute error, and (R, R′) represents (R1, R′2) or (R2, R′1) respectively.

[0092] A second aspect of the present invention provides a zero-sample pedestrian re-identification system in a dark environment, comprising:

[0093] Dark-light image synthesis network, used to generate dark-light images with missing illumination;

[0094] The feature encoder, which includes two convolutional layers, is used to encode image features;

[0095] The reflection layer transposed convolution decoder is used to decode the encoded features;

[0096] Retinex decomposition network, used to decompose image pairs into illumination components and reflectance components;

[0097] The pedestrian re-identification network uses a re-identification network with the VGG16 network as the backbone to obtain pedestrian re-identification results in images.

[0098] Compared with the prior art, the present invention has the following beneficial effects:

[0099] (1) The present invention automatically generates dark-light images to form image pairs with good illumination and image pairs without illumination; and the image pairs are passed through two branch networks: one is to extract features through a feature encoder and then input them into a reflective layer transposed convolution decoder and a re-identification network at the same time, the reflective layer transposed convolution decoder obtains a decoding result, and the re-identification network obtains a re-identification result; the other is to extract the illumination component and the reflection component through a Retinex decomposition network, and resynthesize a new image pair after exchanging the reflection component of the image pair, and then input the new image pair into the feature encoder and the reflective layer transposed convolution decoder again to obtain a new decoding result. A variety of loss functions are calculated based on the decoding results, and these loss functions enable the network to better learn features and improve the accuracy of re-identification. In view of the fact that there are few pedestrian re-identification methods designed for dark-light images in the prior art, the present invention proposes a more novel solution that is specifically suitable for pedestrian re-identification in dark-light environments.

[0100] (2) The network training of the present invention does not need to rely on pedestrian images in dark light environments, which enables the network to perform re-identification reasoning directly on dark light images, thereby improving adaptability and practicality. The present invention can effectively simulate the image characteristics under dark light conditions through the dark light image synthesis network, and generate realistic low-light images under different lighting conditions.

[0101] (2) With reference to the Retinex theory, the present invention designs a new reflection layer transposed convolutional decoding module, which greatly improves the stability and accuracy of the network when decoding reflection information. BRIEF DESCRIPTION OF THE DRAWINGS

[0102] Figure 1 It is a flowchart of the method for pedestrian re-identification in a dark environment with zero sample in the present invention;

[0103] Figure 2 It is the overall structural block diagram of the zero-sample pedestrian re-identification system in a dark light environment of the present invention. DETAILED DESCRIPTION

[0104] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0105] Embodiment 1:

[0106] See also Figure 1 ,The zero-sample pedestrian re-identification method in dark light environment is specifically implemented as follows:

[0107] Step S110, using a dark-light image synthesis network (DarkISP) to process the input image with good illumination, and generate an image pair 1 (I1, I2) with good illumination and image with missing illumination.

[0108] like Figure 2 As shown in the DarkISP module, in this embodiment:

[0109] Step S110-1, reading an image img with good illumination;

[0110] Step S110-2, perform inverse tone mapping on the image to restore the image that has been tone mapped to a near RAW format, as shown in formula (1);

[0111] img1=0.5-sin(arcsin(1.0-2.0×img) / 3.0)(1)

[0112] Step S110-3, perform an inverse gamma correction operation on the image to restore it to a linear illumination space. The gamma value γ is randomly selected within a preset range, as shown in formula (2);

[0113] img2=max(img1,∈) γ (2)

[0114] Step S110-4, after completing the inverse gamma correction, apply the color correction matrix (CCM) to convert the image from the standard sRGB color space to the camera's RGB color space (cRGB), as shown in formula (3);

[0115] img3=apply_ccm(img2,rgb2cam)(3)

[0116] The apply_ccm function is used to linearly transform the color channel of each pixel of the input image with the specified color correction matrix to achieve the color space conversion. The rgb2cam matrix converts the standard display colors to the colors actually captured by the camera sensor to simulate the real shooting process.

[0117] Step S110-5, after the inverse processing is completed, the image is subjected to inverse white balance adjustment. By applying the corresponding gain value, the gain coefficients (gains1) of the red and blue channels of the image are adjusted. As shown in formula (4);

[0118] img4=img3×gains1(4)

[0119] Among them, gains1 is the gain matrix (or vector) used to perform the white balance operation. It is a three-channel gain factor used to adjust the brightness of the red, green, and blue channels in the image to simulate the effect of white balance.

[0120] Step S110-6, adjusting the overall brightness of the image to simulate the brightness attenuation in a low light environment by randomly selecting a darkness coefficient, as shown in formula (5);

[0121] img5=img4×darkness(5)

[0122] Step S110-7, in order to get closer to the real low-light image quality, shooting noise (noise1) is added to the image, and quantization noise (noise2) is added to simulate the slight distortion in the image digitization process, as shown in formula (6);

[0123] img6=img5+noise1+noise2(6)

[0124] Step S110-8, in order to simulate the color performance of the actual captured image, the image is again white-balanced by adjusting the gain coefficients (gains2) of the red and blue channels by applying corresponding gain values, as shown in formula (7);

[0125] img7=img6×gains2(7)

[0126] Step S110-9, after restoring the white balance, applying an inverse CCM operation to convert the image from the camera's RGB color space (cRGB) back to the standard sRGB color space, as shown in formula (8);

[0127] img8=apply_ccm(img7,rgb2cam)(8)

[0128] Step S110-10: Finally, perform gamma correction to adjust the image to a visualized linear illumination space. The final gamma correction is shown in formula (9).

[0129]

[0130] Through the above steps, the input image img with sufficient illumination, that is, I1, is synthesized into an image img9 with low-light characteristics, that is, I2. The low-light image degradation network can effectively simulate the image characteristics under dark light conditions, generate realistic low-light images under different lighting conditions, and provide richer and more realistic input data for model training.

[0131] Step S120, extract features from the image pair 1 through a feature encoder to obtain features.

[0132] like Figure 2 As shown in the Feature Encoder module, in this embodiment:

[0133] Step S120-1, input the image I into the convolution layer Conv1, as shown in formula (10), where the input is 3 channels, the output is 64 channels, and the convolution kernel size is 3;

[0134] F1=Conv1(I)(10)

[0135] Step S120-2, input the output result of the convolution layer Conv1 to the convolution layer Conv2, as shown in formula (11), where the input is 64 channels, the output is 64 channels, the convolution kernel size is 3, and Feat is the encoder input result;

[0136] Feat = Conv2(F1)(11)

[0137] Image decomposition is regarded as a low-level task, and the low-level information of the image can be efficiently encoded through only two convolutional layers, thus laying a solid foundation for the subsequent decoding of reflection information.

[0138] Step S130: Input the feature into the reflection layer transposed convolution decoder (TransConvRefDecoder) to obtain the decoding result At the same time, the features are also input into the re-identification network to obtain the re-identification results;

[0139] like Figure 2 The module shown in TransConvRefDecoder, in this embodiment specifically:

[0140] Step S130-1, input the encoder encoding result into Conv3 and pass it through the ReLU activation function, as shown in formula (12), where the input is 64 channels, the output is 64 channels, and the convolution kernel size is 3;

[0141] DF1 = ReLU(Conv3(Feat))(12)

[0142] Step S130-2, input the output result of the convolution layer Conv3 into the transposed convolution layer TransConv, and pass through the Sigmoid activation function, as shown in formula (13), where the input is 64 channels, the output is 3 channels, and the convolution kernel size is 3;

[0143]

[0144] The decoded reflection components are

[0145] Step S130-3, input the encoding result of the encoder into the re-identification network with the VGG16 network as the backbone, as shown in formula (14), where F is the output result of the network.

[0146] F=VGG16(Feat)(14)

[0147] The transposed convolution layer is a layer that can learn the optimal upsampling method, which optimizes the weights through back-propagation to adapt to specific data characteristics. This means that the network can more effectively learn how to reconstruct high-resolution reflection components, thereby potentially improving the detail and accuracy of the final image and significantly improving image quality.

[0148] Step S140, using a Retinex decomposition network (Retinex DecomNet) to decompose the image pair into reflection components R1, R2 and illumination components L1, L2;

[0149] like Figure 2 The modules shown in Retinex DecomNet are specifically:

[0150] Step S140-1, performing maximum channel expansion processing on the input image Img, extracting the maximum channel input_max of the input image, and then concatenating it with the original image to generate an image input_img containing more information, as shown in formulas (15) and (16);

[0151] input_max=torch.max(Img,dim=1)[0](15)

[0152] input_img=torch.cat((input_max,Img),dim=1)(16)

[0153] Step S140-2, perform shallow feature extraction on the expanded image, and obtain preliminary features feats0 through the convolution layer net1_conv0, as shown in formula (17), which has 4 input channels, 64 output channels, and a convolution kernel size of 9;

[0154] feats0=net1_conv0(input_img)(17)

[0155] Step S140-3, further performing deep extraction of preliminary features through a combination of multiple convolutional layers and activation functions net1_convs to generate advanced features featss, as shown in formula (18);

[0156] featss=net1_convs(feats0)(18)

[0157] Among them, the structure of net1_convs is composed of five stacks of convolutional layers and ReLU activation functions, with 64 input and output channels and a convolution kernel size of 3;

[0158] Step S140-4, reconstructing the high-level features, applying the convolution layer net1_recon to convert the high-level features into an output channel image outs, as shown in formula (19), which has 64 input channels, 4 output channels, and a convolution kernel size of 3;

[0159] outs = net1_recon (featss) (19)

[0160] Step S140-5, use sigmoid to normalize the output image to generate the reflection component R and the illumination component L. The reflection image contains color information of three channels, while the illumination image contains light intensity information of a single channel, as shown in formulas (20) and (21);

[0161] R=sigmoid(outs[:,0:3,∶,∶])(20)

[0162] L=sigmoid(outs[:,3:4,∶,∶])(21)

[0163] Through the above steps, the input image is decomposed into a reflection image R and an illumination image L. The network can effectively extract illumination information and reflection information from the input image, providing rich feature data for subsequent image enhancement or restoration tasks.

[0164] Therefore, the reflection component and illumination component obtained by the image I1 are R1 and L1; the reflection component and illumination component obtained by the image I2 are R2 and L2.

[0165] Step S150, after exchanging the reflection components of the image pair 1, a new image pair 2 (I1′, I2′) is synthesized again;

[0166] As shown in the Interchange section of FIG5 , in this embodiment, specifically:

[0167] Step S150-1, swap R1 and R2 decomposed from images I1 and I2, as shown in formula (22).

[0168] (R1,L1),(R2,L2)→(R2,L1),(R1,L2)(22)

[0169] Step S150-2, synthesize the exchanged R and L components again to form a new image, as shown in formulas (23) and (24);

[0170] I′1=R2·L1(23)

[0171] I′2=R1·L2(24)

[0172] After exchanging the reflected components, they are re-fused into a new image, providing specific image data for subsequent image decomposition.

[0173] Step S160, input the image pair 2 into the feature encoder, and then decode it through the reflection layer transposed convolution decoder to obtain R′1, R′2;

[0174] like Figure 2 As shown in the Feature Encoder and TransConvRefDecoder below, in this embodiment:

[0175] Step S160-1, input the resynthesized image into Feature Encoder for encoding, as shown in formula (25), and the implementation method of Feature Encoder is consistent with that described in step S120;

[0176] F i v = FeatureEncoder(I i ′)(25)

[0177] Step S160-2, input the encoded features into TransConvRefDecoder for decoding, as shown in formula (26), and the implementation method of TransConvRefDecoder is consistent with that described in step S130.

[0178] R′ i =TransConvRefDecoder(F i ′)(26)

[0179] After encoding and decoding, the results are R′1, R′2.

[0180] Step S170, calculating various loss functions based on the decoding results to improve the accuracy of the re-identification network, including decoding loss Reconstruction loss Reflection layer loss Triplet loss and cross entropy loss

[0181] like Figure 2 As shown, in this embodiment, specifically:

[0182] Step S170-1, calculate the loss function according to the series of results obtained above, as shown in formulas (27)(28)(29)(30)(31).

[0183]

[0184] exist In, MSE represents mean square error, and SSIM represents structural similarity index measure;

[0185] exist In , MAE represents the mean absolute error, and (R, R′) represents (R1, R′2) or (R2, R′1) respectively.

[0186] During the network training process, the performance of the model can be significantly improved by limiting and gradually reducing the amplitude of the loss function calculation value.

[0187] The above description is only used to help understand the method of the present invention and its core essence, but the protection scope of the present invention is not limited thereto. For those skilled in the art in the art, equivalent replacement or change according to the technical solution and inventive concept of the present invention within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A zero-sample pedestrian re-identification method in a dark environment, characterized in that: The following steps are involved: S1, using a dark-light image synthesis network to process the image with good illumination to generate a dark-light image with missing illumination, and combining the image with good illumination and the dark-light image with missing illumination to obtain image pair 1; S2, extract features from image pair 1 through a feature encoder to obtain features; S3, processing the features through the reflection layer transposed convolution decoder to obtain a decoding result, and processing the features through the re-identification network to obtain a re-identification result; S4, using the Retinex decomposition network to decompose the image in the image pair 1 into a reflection component and an illumination component respectively; S5, exchanging the reflection components of the image pair 1, and recombining the exchanged reflection components with the original illumination components to obtain the image pair 2; S6, processing the image pair 2 through a feature encoder to obtain features, and decoding the features through a reflection layer transposed convolution decoder to obtain a decoding result; S7, calculate the loss function according to the decoding result and re-identification result of image pair 1 and the decoding result of image pair 2, the loss function includes the decoding loss Reconstruction loss Reflection layer loss Triplet loss and cross entropy loss S8. Adjust the network parameters of the re-identification network for optimization according to the loss function.

2. The zero-sample pedestrian re-identification method in a dark environment according to claim 1, characterized in that: The image pair 1 (I1, I2) is obtained in S1, which is as follows: I2=DarkISP(I1) Among them, I1 is an image with good illumination, I2 is a dark image with missing illumination, and DarkISP is a dark image synthesis network; The dark-light image synthesis network generates a dark-light image with missing illumination, as follows: The well-illuminated image is processed in sequence with inverse tone mapping, inverse gamma correction, conversion from the standard sRGB color space to the camera's RGB color space, inverse white balance adjustment, brightness adjustment, noise addition, white balance adjustment again, conversion from the camera's RGB color space back to the standard sRGB color space, and gamma correction to obtain a dark-light image with low-light characteristics.

3. The zero-sample pedestrian re-identification method in a dark environment according to claim 2, characterized in that: The S2 is specifically as follows: F i =FeatureEncoder(I i ) Among them, Feature Encoder is the feature encoder, I i is the image pair 1 (I1, I2), F i It is the feature output by the feature encoder.

4. The zero-sample pedestrian re-identification method in a dark environment according to claim 3, characterized in that: The S3 is as follows: F=ReIDNet(F i ) Among them, TransConvRefDecoder is the reflection layer transposed convolution decoder, and ReIDNet is the re-identification network; The decoding result for image pair 1 is F is the re-identification result.

5. The zero-sample pedestrian re-identification method in a dark environment according to claim 4, characterized in that: The reflected layer transposed convolution decoder processes to obtain a decoding result, which is as follows: The encoder encoding result is input into Conv3 and activated by ReLU function, as shown in the following formula; DF1 = ReLU(Conv3(Feat)) Among them, Feat is the output result of the feature encoder; The output result DF1 of the convolution layer Conv3 is input into the transposed convolution layer TransConv and activated by the Sigmoid function, as shown in the following formula; in, is the decoding result obtained after decoding, that is, the reflection component 6. The zero-sample pedestrian re-identification method in a dark environment according to claim 4, characterized in that: In S4, the image pair 1 is decomposed using the Retinex decomposition network, and the image I1 is decomposed into R1 and L1. Similarly, the image I2 is decomposed into R2 and L2, as follows: R i ,IT i =RetinexDecomNet(I i ) Among them, Retinex DecomNet is the Retinex decomposition network, R i is the reflection component with reflection information, L i is the illumination component with illumination information; The Retinex decomposition network performs image decomposition as follows: Perform maximum channel expansion processing on the input image Img, extract the maximum channel input_max of the input image, concatenate it with the original image, and generate an image input_img containing more information; Perform shallow feature extraction on the expanded image and obtain preliminary features through the convolution layer net1_conv0; perform deep extraction of preliminary features through a combination of multiple convolution layers and activation functions net1_convs to generate advanced features; The high-level features are reconstructed and the convolution layer net1_recon is applied to convert the high-level features into the output channel image; the output channel image is normalized using sigmoid to generate the reflection component R and the illumination component L.

7. The zero-sample pedestrian re-identification method in a dark environment according to claim 6, characterized in that: The image pair 2 (I1′, I2′) is obtained in S5, which is as follows: (R1,L1),(R2,L2)→(R2,L1),(R1,L2) I′1=R2·L1 I′2=R1·L2.

8. The zero-sample pedestrian re-identification method in a dark environment according to claim 7, characterized in that: The decoding results R′1 and R′2 are obtained in S6, which are as follows: F i ′=FeatureEncoder(I i ′) R′ i =TransConvRefDecoder(F i ′) Among them, I′ i is the image pair 2 (I′1, I′2), F′ i is the feature output by the feature encoder, R′ i Decoding results R′1 and R′2 are obtained for image pair 2.

9. The zero-sample pedestrian re-identification method in a dark environment according to claim 8, characterized in that: The loss function in S7 is as follows: Among them, In, MSE represents mean square error, and SSIM represents structural similarity index measure; exist In , MAE represents the mean absolute error, and (R, R′) represents (R1, R′2) or (R2, R′1) respectively.

10. A zero-sample pedestrian re-identification system in a dark environment applied to any of the methods described in claims 1-9, characterized in that: include: Dark-light image synthesis network, used to generate dark-light images with missing illumination; The feature encoder, which includes two convolutional layers, is used to encode image features; The reflection layer transposed convolution decoder is used to decode the encoded features; Retinex decomposition network, used to decompose image pairs into illumination components and reflectance components; The pedestrian re-identification network is a re-identification network with the VGG16 network as the backbone, which is used to obtain pedestrian re-identification results in images.

Citation Information

Patent Citations

  • Pedestrian re-identification method and device based on attention mechanism and feature fusion strategy

    CN118470752A

  • Frame extraction pedestrian retrieval method based on YOLOv5s and staged regular combined pedestrian re-identification

    CN118522039A

  • Non-uniform low-illumination image enhancement method and system under zero reference sample

    CN116645296A

  • TranReID-based pedestrian re-identification method and system in dark light environment

    CN117541985A

  • Efficient ultra-low illumination video segmentation method and device based on edge detection prompt

    CN117994510A