A pedestrian re-identification method based on clothing change
By employing clothing region localization and adaptive color suppression methods, combined with multilayer backdistillation and cross-current triplet loss, the robustness problem of pedestrian re-identification under clothing changes is solved, achieving high-precision and high-robust pedestrian recognition results, which are suitable for smart security and traffic monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU DIANZI UNIV
- Filing Date
- 2026-06-10
- Publication Date
- 2026-07-10
AI Technical Summary
Existing pedestrian re-identification methods show a significant decline in recognition performance when clothing changes, and their robustness is insufficient to meet practical needs. Traditional methods rely too heavily on clothing appearance features and are prone to failure. Posture and gait features are easily affected by the environment. Data augmentation methods are costly and have poor generalization ability, and cannot output stable and robust identity features under drastic clothing changes.
We adopt a technical approach that combines clothing region localization, adaptive color suppression, image refinement, two-stream multi-layer feature distillation, and cross-stream triplet alignment. Through adaptive Gaussian blurring and piecewise saturation suppression, we construct an adaptive suppression and cross-stream consistency learning framework for clothing regions. We also enhance feature learning by using multi-layer backdistillation and guided cross-stream triplet loss.
It significantly improves pedestrian re-identification performance in clothing-changing scenarios. By preserving stable identity-related features, it enhances recognition accuracy and robustness, achieving high precision, high real-time performance, and high practicality. It is suitable for complex scenarios such as smart security and traffic monitoring.
Smart Images

Figure CN122369072A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and deep learning, and in particular to a pedestrian re-identification method based on clothing changes, which aims to improve the accuracy and robustness of pedestrian re-identification by mining potential identity information in clothing areas. Background Technology
[0002] Pedestrian re-identification is an important research direction in computer vision and deep learning, aiming to accurately identify and match the same pedestrian across different camera perspectives. It has broad application prospects in areas such as smart security, intelligent transportation, and public area monitoring. With the rapid development of deep learning technology, pedestrian re-identification methods based on convolutional neural networks and visual Transformers have achieved significant performance improvements on standard datasets. However, when these methods are applied to long-term pedestrian re-identification scenarios where clothing changes, the recognition effect drops significantly, and the robustness fails to meet practical engineering requirements.
[0003] The existing technology has the following main shortcomings:
[0004] First, traditional pedestrian re-identification methods rely excessively on appearance features such as color and texture of clothing areas. In short-term, same-clothing identification scenarios, such features can support basic matching requirements; however, in long-term, cross-time, and cross-scenario monitoring, pedestrians frequently change their clothing, and features based on clothing appearance are prone to failure, causing the model to be unable to stably distinguish pedestrian identities and severely limiting the recognition accuracy in clothing-changing scenarios.
[0005] Second, existing methods for re-identifying pedestrians in different clothing generally employ the approach of simply ignoring or forcibly erasing clothing areas. Most solutions guide the model to ignore clothing areas or directly process the pixels in clothing areas through color overlay or pixel elimination to reduce interference from clothing changes. However, this approach directly loses stable clues related to identity, such as structure, contour, and posture, in the clothing area, resulting in missing identity information and making it difficult for the model to achieve the accuracy required for practical applications.
[0006] Third, methods based on posture, gait, and key body parts lack stability and are easily affected by the environment. Some methods attempt to improve robustness by relying on relatively stable areas such as posture, gait, head, or limbs, but these features are easily affected by changes in viewpoint, posture shift, occlusion, and background interference, resulting in a significant decrease in reliability. At the same time, key body parts are often obscured by clothing, leading to incomplete and inaccurate feature extraction and limiting recognition performance.
[0007] Fourth, methods based on data augmentation and feature reorganization are costly and prone to overfitting. These methods rely on large-scale, finely labeled data, have complex training processes and high data processing costs, and cannot fundamentally suppress interfering information unrelated to identity, such as clothing color and texture. The models are still prone to fitting to variable appearance features and have poor generalization ability in clothing-changing scenarios.
[0008] In summary, existing technologies cannot achieve an effective balance between reducing the interference of clothing appearance and retaining identity clues in clothing areas. They are also unable to output stable and robust identity features under conditions of drastic changes in clothing. As a result, the accuracy, generalization and practicality of pedestrian re-identification after clothing change cannot meet the needs of practical applications, which has become a key technical problem that urgently needs to be solved in this field. Summary of the Invention
[0009] The purpose of this invention is to overcome the shortcomings of existing technologies and propose a pedestrian re-identification method based on clothing changes. It adopts an overall technical approach of clothing region localization, adaptive color suppression, image refinement, two-stream multi-layer feature distillation, and cross-stream triplet alignment. It constructs a clothing region adaptive suppression and cross-stream consistency learning framework, which retains stable identity-related features while weakening the interference of clothing appearance. It strengthens feature learning through multi-layer backdistillation and further aligns identity features using cross-stream triplet loss, which significantly improves the pedestrian re-identification performance in clothing change scenarios.
[0010] To achieve the above objectives, the technical solution specifically adopted by the present invention is as follows:
[0011] A pedestrian re-identification method based on clothing changes includes the following steps:
[0012] Step 1: Perform image analysis on the input raw RGB image to determine the clothing area and non-clothing area in the image, generate a binary mask to distinguish the clothing area and non-clothing area, and then obtain the color complexity of the clothing area based on the hue channel value and saturation channel value of the pixels in the clothing area.
[0013] Step 2: Based on the color complexity and a preset complexity threshold, Gaussian blur parameters are adaptively determined to perform Gaussian blur processing on the clothing area; then, based on the saturation value of the clothing area and a preset saturation threshold, a piecewise function is used to suppress the saturation of the clothing area, resulting in a color-suppressed image of the clothing area.
[0014] Step 3: Fuse the color-suppressed clothing area image with the non-clothing area of the original RGB image to obtain a refined image;
[0015] Step 4: Input the original RGB image and the refined image into the same backbone network to extract two multi-layer features. Normalize and calculate the affinity of the two features to construct a multi-layer backdistillation loss.
[0016] Step 5: Using the original RGB image features as anchor points and the refined image features as positive and negative samples, construct a guided cross-current triplet loss. Combine the multi-layer backdistillation loss and the guided cross-current triplet loss to train the model and complete the pedestrian re-identification in the dressing scene.
[0017] Preferably, image analysis is performed using a pre-trained SCHP model, where pixels with a value of 1 in the binary mask belong to the clothing area, and pixels with a value of 0 belong to the non-clothing area.
[0018] Preferably, in step 1, the hue channel variance and saturation channel variance are calculated based on the hue channel values and saturation channel values of the pixels within the clothing area, and the color complexity of the clothing area is obtained by combining the weighting coefficients.
[0019] Preferably, the color complexity is obtained by multiplying the variance of the hue channel by the first weighting coefficient, and adding the product of the variance of the saturation channel by the second weighting coefficient. The values of the first weighting coefficient and the second weighting coefficient are both in the range of 0 to 1, and the sum of the two is 1.
[0020] Preferably, in step 2, for color complexity within the complexity threshold, Gaussian blurring is performed using the first Gaussian blur parameter; otherwise, Gaussian blurring is performed using the second Gaussian blur parameter.
[0021] Preferably, the first Gaussian blur parameter is obtained by adding the difference between the minimum convolution kernel size and the maximum convolution kernel size, multiplying by the difference between the color complexity and the minimum color complexity, and then dividing by the difference between the highest color complexity and the lowest color complexity.
[0022] The second Gaussian blur parameter is obtained by multiplying the minimum standard deviation by the difference between the maximum and minimum standard deviations, multiplying by the difference between the color complexity and the minimum color complexity, and then dividing by the difference between the highest and lowest color complexity.
[0023] Preferably, in step 2, the saturation over-limit is first determined based on the difference between the current pixel's saturation and a preset saturation threshold, and a transition parameter is set. When the saturation over-limit is less than or equal to zero, no saturation suppression is performed. When the saturation over-limit is greater than zero and less than or equal to the preset transition parameter, saturation is smoothly suppressed based on an exponential decay function. When the saturation over-limit is greater than the preset transition parameter, saturation is enhanced and suppressed based on a function containing a quadratic term.
[0024] Preferably, in step 3, the method for fusing to obtain the refined image is as follows: multiplying the non-clothing area with the original RGB image pixel by pixel, and adding the clothing area multiplied pixel by pixel with the color-suppressed clothing area image.
[0025] Preferably, in step 4, the original RGB image and the refined image are respectively input into the same Transformer backbone network to extract multi-layer features and form student flow features and teacher flow features respectively.
[0026] The student flow features and teacher flow features are normalized respectively. The positive affinity matrix and negative affinity matrix are calculated based on the normalized features. The positive loss is calculated based on the positive affinity matrix and the negative loss is calculated based on the negative affinity matrix. The negative loss is weighted and scaled and then combined with the positive loss to obtain the distillation loss. The distillation loss is then weighted and summed according to the weights of different feature layers to obtain the multi-layer reverse distillation loss.
[0027] Preferably, the feature layers selected for the Transformer backbone network include layer 3, layer 12, and layer 24.
[0028] Preferably, the positive affinity matrix is obtained by multiplying the reciprocal of the temperature coefficient by the teacher flow characteristic and then by the transpose of the student flow characteristic; the negative affinity matrix is obtained by multiplying the reciprocal of the temperature coefficient by the student flow characteristic and then by the transpose of the student flow characteristic.
[0029] Preferably, in step 5, anchor features are selected from the feature stream corresponding to the original RGB image, positive sample features with the same identity as the anchor features and negative sample features with different identities are selected from the feature stream corresponding to the refined image, the Euclidean distance between the anchor features and the positive sample features and the Euclidean distance between the anchor features and the negative sample features are calculated, and the guided cross-flow triplet loss is calculated by combining the hinge function and the margin parameter.
[0030] The model was trained using multi-layer reverse distillation loss and guided cross-flow triplet loss to complete the re-identification of pedestrians changing clothes.
[0031] This invention has the following characteristics and beneficial effects:
[0032] This invention employs a region-aware clothing adaptive suppression mechanism, which dynamically adjusts Gaussian blur parameters and segmented saturation suppression strategies based on the color complexity of the clothing region. While weakening irrelevant interferences such as clothing color and texture, it fully preserves stable features such as structure, outline, and posture that are strongly related to identity within the clothing region, thus avoiding the loss of identity information and balancing clothing interference suppression and identity clue preservation from the root.
[0033] This invention proposes a multi-layer backdistillation module, which constructs a dual-stream framework with refined images as the teacher stream and original images as the student stream. It achieves positive alignment and negative constraints among the multi-layer features of Transformer, guiding the model to actively learn stable identity representations independent of clothing, getting rid of excessive dependence on clothing appearance features, and significantly improving the robustness of feature learning in clothing change scenarios.
[0034] This invention designs a guided cross-flow triplet loss to achieve precise alignment of the feature spaces of the original flow and the refined flow, bringing the distance between features of the same identity closer and widening the distance between features of different identities further, enhancing the consistency of features between the two flows and the ability to distinguish identities, and further improving the matching accuracy and stability of pedestrian re-identification under clothing change conditions.
[0035] This invention forms a complete CR-ReID framework, transforming the clothing region from an "interference source" into an "information source," realizing a paradigm upgrade from passive suppression to active mining of identity clues. Without increasing additional computational overhead and memory usage, it achieves advanced performance on multiple public clothing-changing datasets such as PRCC, LTCC, Celeb-reID-light, and LaST, combining high accuracy, high real-time performance, and high practicality.
[0036] This invention automatically analyzes clothing areas during the training phase and only requires the input of the original image during the inference phase, without the need for additional annotation or manual intervention. It is convenient to use, highly generalizable, and can be directly adapted to real and complex scenarios such as smart security and traffic monitoring, demonstrating excellent engineering implementation capabilities and application value. Attached Figure Description
[0037] Figure 1 This is a flowchart of the clothing region suppression and cross-flow consistency learning method for pedestrian re-identification in clothing changing according to the present invention.
[0038] Figure 2 This is an overall training block diagram of the region-aware clothing inhibition module in this invention.
[0039] Figure 3 This is a network structure diagram of the multilayer reverse distillation module of the present invention;
[0040] Figure 4 This is a diagram of the guided cross-flow triplet loss architecture. Detailed Implementation
[0041] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other.
[0042] Example 1
[0043] A pedestrian re-identification method based on clothing changes, such as Figures 1-4 As shown, it includes the following steps:
[0044] Step 1: Perform image parsing on the input raw RGB image to determine the clothing area and non-clothing area in the image, and generate a binary mask to distinguish the clothing area and non-clothing area.
[0045] Specifically, firstly, based on the input original RGB image, this embodiment uses a pre-trained model to perform image parsing to obtain the clothing area and background area in the image. Let the original input RGB image be... ,in and This represents the height and width of the input image. To accurately locate the clothing area, a binary mask is used in this embodiment. Each element Corresponding position in the image The pixel at that location. If a pixel belongs to the clothing area, then... If the pixel is not in the clothing area or the background area, then Therefore, the pixel set 𝑃 of the clothing area can be defined as:
[0046]
[0047] The mask It provides precise positioning of the clothing area for subsequent steps, effectively separating the clothing area from the background area.
[0048] Furthermore, the color complexity of the clothing area is obtained based on the hue and saturation channel values of the pixels within the clothing area.
[0049] Specifically, based on the clothing area in the image, this embodiment calculates the color complexity of that area. Specifically, in this embodiment, hue is first calculated. Channels and saturation The channel values are used to estimate the color complexity of the clothing area.
[0050] In this embodiment, for the hue channel and saturation First, calculate the mean of the channels, then calculate their variance, using the following formula:
[0051] ,
[0052] ,
[0053] ,
[0054] The color complexity The calculation formula is as follows:
[0055] ,
[0056] in, and These are their weighting coefficients, where and This represents the weighting coefficients, while also satisfying the constraints. + =1.
[0057] In this example and All values are set to 0.5. To combine the characteristics of the hue and saturation channels, color complexity is calculated by assigning different weighting coefficients to quantify the degree of interference in color variation and texture richness of the clothing area.
[0058] Step 2: Based on the color complexity and a preset complexity threshold, Gaussian blurring is applied to the clothing area by adaptively determining the Gaussian blur parameters.
[0059] Specifically, for colors with complexity within the complexity threshold, Gaussian blurring is performed using the first Gaussian blur parameter; otherwise, Gaussian blurring is performed using the second Gaussian blur parameter.
[0060] The first Gaussian blur parameter is obtained by adding the difference between the minimum and maximum convolution kernel sizes, multiplying it by the difference between the color complexity and the minimum color complexity, and then dividing by the difference between the highest and lowest color complexity. The expression is as follows:
[0061] ;
[0062] The second Gaussian blur parameter is obtained by multiplying the minimum standard deviation by the difference between the maximum and minimum standard deviations, multiplying by the difference between the color complexity and the minimum color complexity, and then dividing by the difference between the highest and lowest color complexity. The expression is as follows:
[0063] ;
[0064] in,[ ] represents the threshold range of color complexity, [ , ]and[ ] represent the size range of the Gaussian blur convolution kernel and the range of the standard deviation of the Gaussian distribution, respectively.
[0065] Then, based on the saturation values of the clothing area and a preset saturation threshold, a piecewise function is used to suppress the saturation of the clothing area in the Gaussian blurred image, resulting in a color-suppressed image of the clothing area. ,
[0066] Specifically, firstly, the saturation over-limit is determined based on the difference between the current pixel's saturation and a preset saturation threshold, and a transition parameter is set. When the saturation over-limit is less than or equal to zero, no saturation suppression is performed. When the saturation over-limit is greater than zero and less than or equal to the preset transition parameter, saturation is smoothly suppressed based on an exponential decay function. When the saturation over-limit is greater than the preset transition parameter, saturation is enhanced and suppressed based on a function containing a quadratic term.
[0067] The segmented processing method is as follows: a saturation suppression function is used based on the degree of saturation exceeding the limit. Let the saturation of the current pixel be... The preset saturation threshold is The superscalar is defined as:
[0068]
[0069] when When the pixel saturation does not exceed the threshold, no suppression processing is performed; when... This indicates that the saturation exceeds the threshold but does not exceed the transition range, and an exponential decay function is used. Perform smoothing suppression; when This indicates that the saturation exceeds the threshold, and a quadratic term is used. Achieve enhanced suppression. Saturation suppression function. The formula is as follows:
[0070] ,
[0071] in This represents a uniform suppression coefficient used to control the intensity of attenuation. This is the transition parameter of the piecewise function, used to divide the smooth suppression interval and the enhanced suppression interval. It can be adaptively set according to the saturation distribution of the dataset and determined based on the statistical distribution of saturation overscalar in the training data, thereby achieving dynamic adjustment for different scenarios.
[0072] Step 3: Fuse the color-suppressed clothing area image with the non-clothing area of the original RGB image to obtain a refined image. The expression is as follows:
[0073] ;
[0074] Among them, symbols This indicates that an element-wise multiplication operation is applied to each pixel location in the image. After processing, the color information and detailed texture features in the clothing area are significantly reduced. This processing can effectively reduce the interference of color changes or the complexity of details on the re-identification task, and improve the model's accuracy in recognizing identity information.
[0075] Step 4: Input the original RGB image and the refined image into the same backbone network to extract two multi-layer features. Normalize and calculate the affinity of the two features to construct a multi-layer back-distillation loss.
[0076] Specifically, a refined image stream was obtained. Then, firstly, a Transformer-based backbone network EVA02-large is used to analyze the original image. Extract multi-layer features, denoted as student flow. At the same time, refined images that suppress clothing-related cues will be used. Inputting into the same backbone network yields teacher flow. in, The index indicates the layer where the feature resides; in this embodiment, features from layers 3, 12, and 24 are selected for distillation. The features from both streams are normalized to obtain the teacher stream features. and characteristics of student flow Subsequently, in this embodiment, starting from the first... Two affinity matrices are calculated from the normalized teacher and student features extracted by the Transformer layer. The positive affinity matrix... Measure the scaled cosine similarity between teacher and student features. Negative affinity matrix. The algorithm captures the scaled cosine similarity between student features. For each anchor feature in the teacher stream, its positive sample corresponds to a feature at the same spatial location in the student stream, while all other features are treated as negative samples. A positive loss is then calculated. and negative loss guidance Simultaneously, the negative loss is weighted and scaled to obtain the distillation loss. The contribution of each layer is determined by a weight. Scaling is performed to obtain the multilayer reverse distillation loss. .
[0077] Among them, the characteristics of student flow Characteristics of teacher flow The normalization formula is as follows:
[0078] ,
[0079] in, This represents the Euclidean norm, which measures the magnitude of eigenvectors. The positive affinity matrix is calculated after normalization. and negative affinity matrix The formula is as follows:
[0080] ,
[0081] in It is the temperature coefficient.
[0082] After obtaining the positive and negative affinity matrices, calculate the positive loss function. and negative loss function The calculation formula is as follows:
[0083] ,
[0084] ,
[0085] Distillation loss obtained after weight scaling of negative loss The formula is as follows:
[0086] ,
[0087] in, This is the scaling factor. Finally, since each layer contributes differently to the final classification, the contribution of each layer is weighted. The final multilayer backdistillation loss after scaling is shown below:
[0088] .
[0089] Step 5: Using the original RGB image features as anchor points and the refined image features as positive and negative samples, construct a guided cross-current triplet loss. Combine the multi-layer backdistillation loss and the guided cross-current triplet loss to train the model and complete the pedestrian re-identification in the dressing scene.
[0090] Specifically, anchor features are selected from the feature stream corresponding to the original RGB image, and positive sample features with the same identity as the anchor features and negative sample features with different identities are selected from the feature stream corresponding to the refined image. The Euclidean distance between the anchor features and the positive sample features is then calculated. Euclidean distance between anchor features and negative sample features The guided crossflow triplet loss is calculated by combining the hinge function and the margin parameter. ;
[0091] ,
[0092] ,
[0093] in, Indicates the first Anchor point features of each sample in the original flow This represents a positive sample feature from the refining stream, which shares the same identity as the anchor point. This represents a negative sample feature from the refining stream, which belongs to a different identity.
[0094] Based on these distances, the first The triplet loss for a sample can be defined as:
[0095] ,
[0096] in, Represents the hinge function. It is a margin used to ensure the minimum interval between positive and negative sample pairs. Therefore, the global cross-current triplet loss is calculated by applying all... The average of the samples is calculated as follows:
[0097] ,
[0098] By introducing guided cross-flow triplet loss, features in the refined flow and the original flow can be effectively aligned, while enhancing the consistency and discriminative power of the learned representations, thereby improving performance.
[0099] Finally, based on the losses from multi-layer reverse distillation With guided cross-current triplet The loss function is used to train the model and complete the re-identification of pedestrians changing clothes.
[0100] Example 2
[0101] This embodiment provides an electronic device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program stored in the memory and performs the steps of the method described in any of the above embodiments.
[0102] In another aspect, embodiments of the present invention also provide a computer program product, including the steps of the methods described in the above embodiments.
[0103] Comparative Example
[0104] Table 1 shows a comparison of the performance of this invention in pedestrian re-identification under clothing changes with other existing methods. To verify that the algorithm can effectively suppress color interference while retaining stable identity recognition cues, this invention was tested on four datasets: PRCC, LTCC, Celeb-ReID-light, and LaST. The experimental platform consisted of an NVIDIA RTX 4080 GPU and an Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz. The Rank-1 (first matching rate) of the model on the PRCC, LTCC, Celeb-ReID-light, and LaST datasets were 71.1%, 53.1%, 72.2%, and 80.1%, respectively, and the mAP (mean average accuracy) was 66.9%, 27.1%, 52.8%, and 41.3%, respectively. This demonstrates that CR-ReID exhibits superior identity recognition performance under clothing change scenarios of varying complexity. Furthermore, the model design does not incur additional GPU memory overhead and does not increase computational burden. Furthermore, CR-ReID maintains high real-time performance on both GPUs and CPUs, thus ensuring the model's efficiency in practical applications.
[0105] Table 1 is a comparison chart of the performance of the present invention on four public datasets (PRCC, LTCC, Celeb-reID-light, LaST) for pedestrian re-identification while changing clothes, and other existing methods.
[0106]
[0107] This invention proposes a dual-stream collaborative framework, CR-ReID, for person re-identification under clothing changes. It overcomes the limitation of traditional methods that "suppressing clothing leads to identity loss" by innovatively constructing a dual-module collaborative mechanism of "region-aware clothing suppression" and "multi-level reverse distillation," achieving accurate preservation and in-depth mining of deep identity clues within clothing regions. Through adaptive Gaussian blurring and color saturation suppression strategies, it effectively weakens surface-level interference attributes such as color and style, preventing the model from being misled by appearance disguises. Simultaneously, leveraging cross-level reverse knowledge transfer, it extracts and strengthens stable identity signals such as human structure and posture contours from multi-scale features, enabling the model to possess the essential discriminative ability to "recognize people through clothing." Furthermore, it introduces guided cross-stream triplet loss to achieve semantic alignment between the main stream and the suppression stream during the training phase, ensuring high consistency of features across both streams in the identity space, significantly improving the model's recognition accuracy and robustness in complex clothing change scenarios. This method represents a paradigm shift from "adversarial clothing changes" to "identity mining using clothing information," demonstrating significant technological advancement and practical application value.
[0108] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A pedestrian re-identification method based on clothing changes, characterized in that, Includes the following steps: Step 1: Perform image analysis on the input raw RGB image to determine the clothing area and non-clothing area in the image, generate a binary mask to distinguish the clothing area and non-clothing area, and then obtain the color complexity of the clothing area based on the hue channel value and saturation channel value of the pixels in the clothing area. Step 2: Based on the color complexity and a preset complexity threshold, Gaussian blurring is applied to the clothing area by adaptively determining the Gaussian blurring parameters. Then, based on the saturation value of the clothing area and a preset saturation threshold, the Gaussian blurred image is subjected to saturation suppression processing of the clothing area using a piecewise function, resulting in a color-suppressed image of the clothing area. Step 3: Fuse the color-suppressed clothing area image with the non-clothing area of the original RGB image to obtain a refined image; Step 4: Input the original RGB image and the refined image into the same backbone network to extract two multi-layer features. Normalize and calculate the affinity of the two features to construct a multi-layer backdistillation loss. Step 5: Using the original RGB image features as anchor points and the refined image features as positive and negative samples, construct a guided cross-current triplet loss. Combine the multi-layer backdistillation loss and the guided cross-current triplet loss to train the model and complete the pedestrian re-identification in the dressing scene.
2. The method according to claim 1, characterized in that, Image analysis is performed using a pre-trained SCHP model. In the binary mask, pixels with a value of 1 belong to the clothing area, and pixels with a value of 0 belong to the non-clothing area.
3. The method according to claim 1, characterized in that, In step 1, the hue channel variance and saturation channel variance are calculated based on the hue channel values and saturation channel values of the pixels within the clothing area, and the color complexity of the clothing area is obtained by combining the weighting coefficients.
4. The method according to claim 3, characterized in that, Color complexity is obtained by multiplying the variance of the hue channel by the first weighting coefficient, and adding the product of the variance of the saturation channel by the second weighting coefficient. The values of the first weighting coefficient and the second weighting coefficient are both in the range of 0 to 1, and their sum is 1.
5. The method according to claim 1, characterized in that, In step 2, for colors with complexity within the complexity threshold, Gaussian blurring is performed using the first Gaussian blur parameter; otherwise, Gaussian blurring is performed using the second Gaussian blur parameter.
6. The method according to claim 5, characterized in that, The first Gaussian blur parameter is obtained by adding the difference between the minimum convolution kernel size and the maximum convolution kernel size, multiplying it by the difference between the color complexity and the minimum color complexity, and then dividing it by the difference between the highest color complexity and the lowest color complexity. The second Gaussian blur parameter is obtained by multiplying the minimum standard deviation by the difference between the maximum and minimum standard deviations, multiplying by the difference between the color complexity and the minimum color complexity, and then dividing by the difference between the highest and lowest color complexity.
7. The method according to claim 1, characterized in that, In step 2, the saturation over-limit amount is first determined based on the difference between the current pixel's saturation and the preset saturation threshold, and transition parameters are set; when the saturation over-limit amount is less than or equal to zero, no saturation suppression processing is performed. When the saturation overscalar is greater than zero and less than or equal to a preset transition parameter, the saturation is smoothed and suppressed based on an exponential decay function; when the saturation overscalar is greater than the preset transition parameter, the saturation is enhanced and suppressed based on a function containing a quadratic term.
8. The method according to claim 1, characterized in that, In step 3, the method for fusing to obtain the refined image is as follows: multiplying the non-clothing area with the original RGB image pixel by pixel, and adding the clothing area multiplied pixel by pixel with the color-suppressed clothing area image.
9. The method according to claim 1, characterized in that, In step 4, the original RGB image and the refined image are respectively input into the same Transformer backbone network to extract multi-layer features and form student flow features and teacher flow features respectively. The student flow features and teacher flow features are normalized respectively. Positive affinity matrix and negative affinity matrix are calculated based on the normalized features. Positive loss is calculated based on the positive affinity matrix and negative loss is calculated based on the negative affinity matrix. The negative loss is weighted and scaled and then combined with the positive loss to obtain the distillation loss. The distillation loss is then weighted and summed according to the weights of different feature layers to obtain the multi-layer reverse distillation loss.
10. The method according to claim 9, characterized in that, The feature layers selected for the Transformer backbone network include layer 3, layer 12, and layer 24.
11. The method according to claim 9, characterized in that, The positive affinity matrix is obtained by multiplying the reciprocal of the temperature coefficient by the teacher flow characteristic and then by the transpose of the student flow characteristic; the negative affinity matrix is obtained by multiplying the reciprocal of the temperature coefficient by the student flow characteristic and then by the transpose of the student flow characteristic.
12. The method according to claim 11, characterized in that, In step 5, anchor features are selected from the feature stream corresponding to the original RGB image, and positive sample features with the same identity as the anchor features and negative sample features with different identities are selected from the feature stream corresponding to the refined image. The Euclidean distance between the anchor features and the positive sample features, and the Euclidean distance between the anchor features and the negative sample features are calculated. The guided cross-flow triplet loss is calculated by combining the hinge function and the margin parameter. The model was trained using multi-layer reverse distillation loss and guided cross-flow triplet loss to complete the re-identification of pedestrians changing clothes.