Pedestrian re-identification method in clothes changing scene
By introducing an adaptive graph channel attention module, a multi-order gated aggregation convolution module and an improved triple loss function pedestrian re-identification model, the problem of feature extraction difficulties in dress changing scenarios is solved, and the accuracy and robustness of pedestrian re-identification are improved.
Patent Information
- Application Number
- CN202510525479.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-12
AI Technical Summary
In the changing scene of clothing appearance, traditional pedestrian re-identification method has difficulty in feature extraction and information capture, and the accuracy rate has decreased. The existing improvement solutions have problems such as lack of global spatial correlation modeling and insufficient robustness of clothing changes.
The dress-changing pedestrian re-identification model based on graph channel attention and gated aggregation convolution is adopted. The adaptive graph channel attention module (AGA), multi-order gated aggregation convolution module (MOGA) and improved triple loss function (ITL) are enhanced.
This improves the accuracy and robustness of pedestrian re-identification in the background of changing clothes, and enhances the model's discrimination ability and consistency of pedestrians with the same identity.
Smart Images

Figure CN120472530A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning technology, and in particular to a method for pedestrian re-identification in a clothing-changing scenario. Background Art
[0002] Person Re-identification (ReID), a core technology in the fields of intelligent security and video analysis, aims to associate the identity of specific pedestrians through cross-camera retrieval. Traditional methods rely primarily on matching surface features (such as clothing color, texture, and accessories) with spatiotemporal correlation information, and have achieved significant results in scenarios such as shopping mall security and urban surveillance. However, in application scenarios involving clothing changes (such as fitting room security and dress code supervision in special industries), traditional person Re-ID methods face challenges in feature extraction and information capture due to the significant changes in clothing appearance. Specifically, surface features such as clothing texture and color fail to function, ultimately leading to a significant decrease in pedestrian recognition accuracy.
[0003] Existing improvement plans can be divided into three categories:
[0004] 1. Biometric enhancement methods: This approach uses auxiliary features such as gait recognition and body contour matching to supplement appearance information. However, this approach is limited by the low resolution of surveillance videos and interference from posture changes.
[0005] 2. Cross-modal learning strategy: Combining infrared imaging or 3D skeleton data to build multimodal features requires specific hardware support and poses data privacy risks;
[0006] 3. Feature decoupling algorithm: attempts to separate identity-related / irrelevant features, but has insufficient generalization ability for drastic changes in clothing and is easily affected by background noise.
[0007] It is worth noting that the above-mentioned solutions still suffer from the lack of global spatial correlation modeling and insufficient feature robustness under drastic clothing changes. This makes it difficult to form local focus features, leading to confusion between identity-related features (such as body shape and gait) and clothing noise. This is particularly limited by the fact that feature matching ambiguity occurs in cross-view scenarios. To address these issues, this paper proposes a method for clothing-changing person re-identification based on graph channel attention and gated aggregate convolution. Summary of the Invention
[0008] The purpose of this invention is to provide a pedestrian re-identification model based on graph channel attention and gated aggregate convolution to solve the problems raised in the above background technology. It includes: pedestrian re-identification dataset under clothing change background and AMGA-ResNet50 model
[0009] The dataset for person re-identification in clothing-changing backgrounds uses three public datasets: PRCC, Celeb-reID, and DeepChange.
[0010] (1) Celeb-reID is a dataset dedicated to clothing-changing ReID. It contains 34,186 street-style images of 1,052 celebrities, 70% of which have significant clothing differences. The dataset is divided into 20,208 images (632 people) and 13,978 images (420 people) respectively (test set). The test set is further split into a query set of 2,972 images and a gallery set of 11,006 images. It specifically includes rear-view samples to enhance cross-view recognition challenges.
[0011] (2) The PRCC dataset contains 33,698 images of 221 identities, captured by three indoor cameras. For pedestrians in the images, the clothes of the images from cameras A and B remain unchanged, but the clothes of the images from camera C have changed significantly.
[0012] (3) DeepChange is a long-term clothing change ReID benchmark dataset, covering 178,407 images of 1,121 people, simulating real long-term clothing / environment changes over a span of more than 12 months (159 images per person), providing multi-dimensional annotations (gender / clothing attributes + timestamps), and supporting clothing invariant feature mining and long-term identity association analysis.
[0013] The AMGA-ResNet50 module includes an adaptive graph channel attention module (AGA), a multi-order gated aggregation convolution module (MOGA) and an improved triplet loss function (ITL).
[0014] The AGA module consists of two parts: a feature mapping layer consisting of two linear embedding functions Fr and Fr' and an adaptive graph convolution module (AGCM).
[0015] The MOGA module consists of four-stage Moga modules and a bottleneck module, and the Moga module consists of spatial and channel aggregation modules.
[0016] The method for pedestrian re-identification in a clothing-changing context provided by the present invention includes:
[0017] Preprocess the pictures of the clothing-changing background as the data set of the model, build a ResNet50 network for pedestrian re-identification under the clothing-changing background, input the pedestrian re-identification dataset into the ResNet50 network for training, and input the pedestrian images to be detected into the trained ResNet50 network for pedestrian re-identification.
[0018] Among them, the datasets for preprocessing clothing-changing background images as models include: Celeb-reID, PRCC, and a large-scale clothing-changing dataset Deepchange.
[0019] The pedestrian images are randomly flipped, padded, cropped, and erased for data augmentation to obtain the final image data.
[0020] Furthermore, the random horizontal flipping includes:
[0021] The input image is flipped horizontally with a 50% probability, swapping pixel positions along the vertical axis of the image. Efficient geometric transformations are implemented using OpenCV. After flipping, the original image size is maintained, and the coordinates of key human body points (if labeled) are mapped simultaneously.
[0022] Furthermore, the padding and random cropping include:
[0023] The image is expanded to 110% of its original size using zero-pixel padding to avoid loss of significant information. A 384×192 pixel region is then randomly cropped based on a uniform distribution to simulate the multi-scale nature of surveillance scenarios. When a human bounding box is detected, the cropped region is prioritized to fully cover the torso from the neck to the hips, enhancing the robustness of biometric feature extraction.
[0024] Furthermore, the random erasure includes:
[0025] Generate a random rectangular mask, then call the Albumentations library to perform pixel block erasing operations. Finally, by pre-detecting the human head area, dynamically avoid the key features of the eyes, nose and mouth.
[0026] Furthermore, the AMGA-ResNet50 model for person re-identification under clothing-changing backgrounds was constructed, including:
[0027] A novel adaptive graph channel attention module (AGA), a multi-order gated aggregation convolution module (MOGA), and an improved triplet loss function (ITL) are constructed. The improved model includes:
[0028] Using the pre-trained ResNet50 as the backbone network, the feature map resolution is retained by adjusting the downsampling step size of layer4 (last stride=1), and the terminal global pooling layer and the fully connected layer are removed to avoid the loss of spatial details. Average and maximum pooling are introduced after layer3 and layer4 respectively, and local details and global semantic features are integrated at different feature levels to enhance the expression ability. The feature vector F1 is generated by superposition processing. In the feature processing stage, F1 is first input into AGA, and the channel dependency is modeled by graph convolution to generate feature F2. At the same time, after the hierarchical feature interaction processing of MOGA, the feature F3 is output. In order to enhance feature diversity and optimize computational efficiency, a parallel feature fusion strategy is adopted to realize the nonlinear fusion of F2 and F3 by element-by-element multiplication. Finally, in the training stage, identity loss (Lid) and improved triple loss (LITL ) and regularized cross entropy loss (L LS ) Iteratively optimizes feature classification.
[0029] Furthermore, the adaptive graph channel attention module AGA is introduced after the backbone of the original ResNet50 network, including:
[0030] First, the global average pooling operation converts the dimension of the feature map to C×1×1, where C represents the number of channels, which is also the number of feature points in the AGA. Subsequently, the feature map layer uses a linear mapping function to improve the representation capability, where W is a learnable weight matrix. This process can be achieved with a 1×1 convolution kernel. To simplify the model, the two convolutional layers are replaced with a bottleneck structure, compressing the parameters from C×C to C×(C / r), and reducing the size of the adjacency matrix to (C / r)×(C / r). On this basis, AGCM calculates the weight of each feature point using the C×C dimensional adjacency matrix and maps the obtained weight back to the original feature map as the channel weight. This mapping process is similar to the aforementioned linear embedding function.
[0031] Furthermore, the backbone of the original ResNet50 network is also introduced in parallel with the multi-order gated aggregation network module MOGA, including:
[0032] A four-stage MOGA module is designed. In each stage i, the input image or feature is first resized and mapped to a Ci-dimensional space by an embedding system. The embedded features then enter the MOGA module, which consists of spatial and channel aggregation modules to further aggregate contextual information. The final output stage completes the classification task through global average pooling (GAP) and a linear layer.
[0033] Furthermore, spatial and channel aggregation modules include:
[0034] The spatial aggregation module analyzes the positional relationships of various body parts (such as head, shoulders, and legs) in pedestrian images to extract cross-regional correlated features (such as body outline), mitigating local interference caused by clothing changes. The channel aggregation module dynamically weights different feature channels (such as color, texture, and shape) to enhance the representation weight of identity-related features and suppress interference from clothing-related features. Together, these two modules enable robust modeling of human identity features.
[0035] Furthermore, during the training phase, the triplet loss function (ITL) is improved, including:
[0036] By combining the absolute distance between positive pairs with the triplet loss of difficult samples, the similarity between positive pairs is further improved, allowing different images of the same person to maintain a small distance despite clothing changes. This effectively addresses the clothing variation issue in re-identification of people who have changed clothes, improves the model's ability to distinguish and maintain consistency between people with the same identity, and enhances the accuracy and robustness of re-identification.
[0037] The present invention improves upon the original ResNet50 model by introducing an adaptive graph channel attention module, a multi-order gated aggregate convolution module, and an improved triplet loss function (ITL). Through these improvements, the present invention enhances the model's feature extraction and information capture capabilities, improving the model's accuracy in person re-identification under clothing-changing conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is the structure diagram of the original ResNet50 network provided in this manual;
[0039] Figure 2 This is the overall framework diagram provided in this manual;
[0040] Figure 3 This is the structure diagram of the Adaptive Graph Channel Attention Module (AGA) provided in this specification;
[0041] Figure 4 This is the structure diagram of the multi-order gated aggregation convolutional network module (MOGA) provided in this manual;
[0042] Figure 5 This is the channel aggregation module structure diagram provided in this manual. Specific implementation methods
[0043] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. However, it should be understood that the scope of protection of the present invention is not limited by the specific embodiments. Based on the embodiments of the present invention, all other embodiments obtained by professionals in this field without conducting innovative work should be included in the scope of protection of the present invention. Example
[0044] A method for pedestrian re-identification in a clothing-changing background comprises the following steps:
[0045] Step 1: Establish and enhance the pedestrian image dataset in the context of changing clothes
[0046] Within the deep learning-driven computer vision research framework, algorithm training performance is significantly correlated with data quality. To achieve reliable model performance in complex scenarios, the training process relies on massive and diverse image and video data resources, especially sample sets containing rich scene complexity. This type of high-quality data can effectively support deep networks in multi-level feature learning, thereby ensuring that the model has excellent generalization and robustness. It is worth noting that in actual application scenarios, the original data often suffers from insufficient complexity in clothing changes, which makes data augmentation technology a key optimization strategy in the construction of clothing change pedestrian re-identification models.
[0047] Step 1.1: Establishment of a dataset for pedestrian re-identification with changed clothing background
[0048] The pedestrian image dataset in the context of changing clothes requires that the pictures include elements with clothing-changing interference, complex background, and uncertain lighting intensity. In this invention, the publicly available clothing-changing pedestrian datasets PRCC, Celeb-reID, and DeepChange are used as datasets for model training.
[0049] Celeb-reID is a dataset collected from celebrity street photos, containing 34,186 images of 1,052 individuals. It is divided into training, gallery, and query sets, and is specifically designed for re-identification of individuals with clothing changes. The clothing of the same individual in this dataset varies significantly, with over 70% of the images displaying different clothing styles, though some instances of repeated clothing are also present. The training set uses 632 individuals, comprising 20,208 images; the test set contains 420 individuals, totaling 13,978 images. In the test set, 2,972 images are used as the query set, and 11,006 images are used in the gallery set. Furthermore, the Celeb-reID dataset includes partial rear-view images, further increasing the challenge and diversity of person identification. The PRCC dataset contains 33,698 images of 221 individuals, captured by three indoor cameras. For each individual in the image, the clothing remains unchanged in the images from cameras A and B, but changes are evident in the images from camera C. The DeepChange dataset focuses on the issue of clothing changes in long-term scenarios. This dataset contains 178,407 images of 1,121 individuals, spanning over 12 months, simulating the long-term changes in clothing, appearance, and environment experienced by pedestrians in the real world. Each individual has an average of 159 images, and clothing changes significantly. Furthermore, the dataset includes detailed annotations, such as pedestrian attributes (gender, age, clothing type, etc.) and timestamps, to support long-term tracking and the study of clothing-invariant features. However, there is no guarantee that clothing changes will be consistent in every image, so data augmentation is used to strengthen the dataset. The specific steps are as follows:
[0050] In the data augmentation pipeline, the input image is first probabilistically flipped horizontally (with a 50% probability of triggering), mirrored using OpenCV, and the associated human keypoint annotation coordinates are simultaneously updated. To adapt to multi-scale surveillance scenarios, a zero-pixel padding strategy is used to expand the image to form a buffer region. Subsequently, a 384×192 pixel valid region is randomly cropped based on a uniform distribution. Specifically, when a human bounding box is detected, the cropping algorithm prioritizes the integrity of the core anatomical structures from the cervical segment (C7) to the hip (L5) to enhance the robustness of feature extraction. Furthermore, a random pixel erasing mechanism is introduced, using the Albumentations library to generate a rectangular mask region. Simultaneously, facial keypoints are detected in real time, dynamically avoiding sensitive biometric areas such as the eyes, nose, and mouth to ensure the integrity of identity-related information.
[0051] Step 2: Build an improved AMGA-ResNet50 model for pedestrian re-identification in clothing-changing backgrounds
[0052] Step 2.1. Original ResNet50 model
[0053] ResNet50 is a convolutional neural network composed of 50 layers of residual networks. It uses the idea of residual learning. This structure helps it overcome the common gradient vanishing or exploding problems in deep networks during training. Figure 1 As shown in the figure, it consists of five main convolutional layers. The first layer uses a 7x7 convolution kernel for convolution, followed by batch normalization and ReLU activation, and then reduces the size of the feature map through maximum pooling. The second layer contains two residual blocks, each of which is composed of multiple convolutional layers, batch normalization and ReLU activation functions. These residual blocks realize direct information transfer through jump connections (residual connections), thereby alleviating the gradient disappearance problem in deep networks and making the network easier to train. The next three, four, and five layers are similar to the second layer, but the number of residual blocks is different. Finally, after the fifth layer of residual blocks, the network adds operations such as average pooling in the fully connected layer and finally outputs the classification result.
[0054] Step 2.2: Improved AMGA-ResNet50 model
[0055] Compared with traditional ReID re-identification methods, the clothing-changing pedestrian ReID method faces the challenges of different clothing and posture changes of pedestrians, which makes the model susceptible to interference when obtaining clothing-changing features and capturing key information, thereby reducing the recognition accuracy. Therefore, the model's ability to extract features in the context of clothing-changing is the key to improving recognition accuracy. The present invention improves the ResNet50 model by introducing a clothing-changing pedestrian re-identification model (AMGA-ResNet50) that integrates multi-order gated aggregate convolution and adaptive graph channel attention to improve its feature extraction capability. The overall framework of the model is shown in the figure below. Figure 2 shown.
[0056] Step 2.2.1: Introduce the AGA model after the backbone network of AMGA-ResNet50
[0057] In the task of clothing-changing pedestrian re-identification, due to problems such as clothing changes, cross-viewpoint challenges, data scarcity and computational complexity, feature acquisition is more difficult than traditional pedestrian re-identification, which makes feature processing and enhancement more challenging. To this end, the present invention designs an AGA module, which can be integrated into the feature map after any convolutional layer and directly process features through natural language operations. Its architecture is as follows Figure 3 As shown, the formula is as follows.
[0058] y=x·sigmoid(F r '(ReLU(G(F r (GAP(x)),A))))
[0059] X=Fr(GAP(x))
[0060] where · represents broadcast element-wise multiplication, sigmoid represents the activation function, and Fr(·) and Fr'(·) represent the embedding functions, forming a bottleneck structure. G is the proposed AGCM, where X represents the input, GAP represents the global average pooling operation, and A is the adjacency matrix representing feature relationships.
[0061] The AGA module applies the graph convolution method to the task of focusing on clothing-changing channels for the first time. It regards each channel as a feature vertex and constructs the relationship between channels through the adjacency matrix to achieve non-local feature operations, thereby optimizing the representation of fine-grained features in the feature graph. In addition, an adaptive graph is proposed that can more effectively adapt to multi-level network structures by learning topological relationships end-to-end.
[0062] Step 2.2.2: Introduce the MOGA model in parallel after the backbone network of AMGA-ResNet50
[0063] Most attention models extract local texture information through convolutional layers and output feature maps based on the channel dimension. The output feature maps generated by each convolution kernel focus only on local details. Although there are mechanisms to adjust channel weights to emphasize or suppress certain texture features, this approach still has limitations in integrating global information, causing the model to have difficulty capturing global spatial information.
[0064] The present invention designs a four-stage MOGA module, such as Figure 4 As shown. In each stage i, the input image or feature is first adjusted in resolution by the embedding system and mapped to the Ci-dimensional space. Assuming the input resolution is H×W, the feature resolutions of the four stages are H / 4×W / 4, H / 8×W / 8, H / 16×W / 16, and H / 32×W / 32, respectively. Subsequently, the embedded features enter the Moga module, which consists of spatial and channel aggregation modules for further aggregation of contextual information. The final output stage completes the classification task through global average pooling (GAP) and a linear layer. In addition, bottleneck modules are chosen at the outputs of the four levels to reduce network complexity.
[0065] In order to solve the multi-order channel reallocation problem, existing methods usually rely on two linear projections to mix channels. However, due to information redundancy and cross-channel problems, a large number of parameter adjustments are required, resulting in low computational efficiency. To this end, an efficient channel aggregation module (CA) is introduced, such as Figure 5 As shown, it is used to adaptively redistribute channel features in the high-dimensional latent space, and its calculation formula is shown below.
[0066] Y=GELU(DW 3×3 (Conv 1×1 (Norm(X))))
[0067] Among them, GELU is an activation function, Norm(X) represents the normalization layer processing, and further, the expressions of CA(X) and GELU(X) are as follows:
[0068] CA(X)=X+y c ·((X-GELU(XWr))
[0069]
[0070] Where yc is the channel scaling factor initialized to zero. It redistributes channel features through complementary interactions. X is the input, tanh is the hyperbolic tangent function, The introduction of and other constants makes this function have characteristics similar to Gaussian distribution.
[0071] Step 2.2.3: Introduce the improved triplet loss function (ITL)
[0072] The model of the present invention has three loss functions applied in the training phase, namely identity classification loss, label regularized cross entropy loss and improved triple loss function.
[0073] Identity classification loss is achieved by training the model to correctly identify or classify the identity or category corresponding to the input data. Cross-entropy loss is generally used for calculation. The formula for calculating cross-entropy loss is as follows:
[0074]
[0075] Among them: Pi represents the identity prediction logic of class i, y represents the identity label, qi is the encoding of the true label, for category i, when the sample belongs to this category, q i =1; otherwise, q i =0, N represents the number of samples.
[0076] Triplet loss is a loss function used for metric learning. It simultaneously optimizes the embedding distances between anchor samples, positive samples, and negative samples, making the embedding spaces of samples of the same class closer and the embedding spaces of samples of different classes farther apart. Its core goal is to ensure that the distance between the anchor point and the positive sample is smaller than the distance between the anchor point and the negative sample, and introduces a preset margin. The calculation formula is as follows:
[0077] L tri =(d a,p -d a,n +α) +
[0078] Where: d a,p and d a,n are the feature distances of positive sample pairs and negative sample pairs, α is the interval threshold, (z) + =max(z,0).
[0079] However, traditional triplet loss relies too much on random samples, which can easily lead to excessive clustering of simple sample pairs, thereby reducing training efficiency and model discrimination ability. To address this, we introduce the hard sample triplet loss, which allows the model to focus on discovering and optimizing the most difficult sample pairs to distinguish during training, thereby improving the model's convergence speed and feature discrimination ability.
[0080] At the same time, in the re-identification scenario of pedestrians changing clothes, clothing changes serve as the main interference information. Relying solely on the difficult sample triple loss is still difficult to ensure the consistency of the model when processing positive sample pairs (i.e., the same pedestrian in different clothes), resulting in insufficient robustness. To this end, this paper further improves the triple loss (ITL) by combining the absolute distance of the positive sample pairs with the difficult sample triple loss to further improve the similarity of the positive sample pairs, so that different images of the same pedestrian can still maintain a small distance under clothing changes. This effectively solves the clothing change problem in the re-identification of pedestrians changing clothes, improves the model's ability to distinguish and maintain consistency for pedestrians with the same identity, and enhances the accuracy and robustness of re-identification. Its calculation formula is as follows:
[0081]
[0082] Among them, ω m is the weight of the absolute distance of the positive sample, which is set to 0.8; d| a,p | is the absolute distance between positive sample pairs; P and K represent the number of pedestrians and images randomly selected in each training batch, respectively; α is set to 0.4.
[0083] In addition, to address the overfitting phenomenon that occurs in the model during training, label smoothing regularized cross entropy loss is introduced. By smoothing the traditional hard labels, label dependence is reduced, overconfidence of the model is avoided, and overfitting and class imbalance are alleviated. The calculation formula is as follows:
[0084]
[0085] Where: σ is the hyperparameter of label smoothing, which is set to 0.1 in this paper, c is the number of categories, and y j is the actual label value, for the correct category, y j =1; other categories y j =0. is the probability output by the model.
[0086] This paper uses the above three loss functions for training. In the early training stage, the model tends to learn easily recognizable identity information by distinguishing simple samples (same identity and clothing). However, the modules and functions proposed in this paper are designed to help the model learn complex identity features. If introduced too early, the model may fall into a local optimum. Therefore, a phased training strategy is adopted: first, only the identity classification loss (Lid) is used for supervision. After the model has initially learned and mastered complex identity features, the improved triplet loss (L ITL ) and label smoothing regularized cross entropy loss (L LS ), helping the model learn more robust identity features. The overall loss function is as follows:
[0087] L=λ1L id +λ2L ITL +λ3L LS
[0088] Wherein, λ is the weight coefficient of each loss function, and the present invention sets it to λ1=λ2=λ3=1.
[0089] Parts or structures not specifically described in the present invention may adopt existing technologies or existing products and will not be described in detail here.
[0090] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A pedestrian re-identification method in a clothing-changing scenario, characterized in that: include: Pedestrian images in clothing-changing scenes are preprocessed as the data set of the model. Based on the ResNet50 network, a model for pedestrian re-identification in clothing-changing scenes is improved and constructed. The preprocessed images are input into the improved model (AMGA-ResNet50) for training, and the clothing-changing pedestrian images to be queried are input into the improved model for pedestrian re-identification. Among them, the pre-processed pedestrian images in the clothing-changing scene as a dataset include: (1) A dataset of pedestrian images of people changing clothes that is publicly available on the Internet is selected as the experimental dataset of the present invention; (2) Data enhancement is performed on pedestrian images by performing random horizontal flipping, padding, random cropping, and random erasing operations on the pedestrian images to obtain the final image data; (3) The final dataset is input into the improved ResNet50 network for training. After the training is completed, the image to be queried is input into the AMGA-ResNet50 model for pedestrian re-identification after changing clothes.
2. The pedestrian re-identification method in the clothing-changing scenario according to claim 1 is characterized in that: The selected data set includes: (1) We selected the Celeb-reID dataset, a dataset of pedestrians changing clothes in celebrity street photos, as the dataset for this experiment. This dataset contains 34,186 images of 1,052 identities and is specifically constructed for pedestrian re-identification research. The data features significant clothing variations for the same pedestrian (>70% different clothing styles, with a small amount of repetition) and covers a range of rear-view angles to enhance recognition challenges. (2) The PRCC dataset captured by three indoor cameras is selected as the second dataset of this experiment. The PRCC dataset contains 33,698 images of 221 identities. For the pedestrians in the images, the clothes of the images of cameras A and B have not changed, but the clothes of the images of camera C have changed significantly. (3) The DeepChange dataset was selected as the third dataset for this experiment. This dataset focuses on the problem of clothing changes in long-term scenarios. It contains 178,407 images of 1,121 identities, spanning more than 12 months, simulating the long-term changes in pedestrian clothing, appearance, and environment in the real world. Each pedestrian has an average of 159 images, and clothing changes significantly. In addition, the dataset also contains detailed annotation information, such as pedestrian attributes (gender, age, top type, etc.) and timestamps, which supports the study of long-term tracking and clothing invariant features.
3. The pedestrian re-identification method in the clothing-changing scenario according to claim 1 is characterized in that: The random horizontal flipping, padding, random cropping and random erasing include: First, a 50% probability of horizontal flipping is applied, and keypoint coordinates are updated simultaneously. After expanding the image with zero padding, a 384×192 region is randomly cropped. When detecting a person, the key areas from the neck (C7) to the hip (L5) are prioritized. Pixel erasure is implemented using the Albumentals library, and facial landmarks are dynamically detected, avoiding the sensitive areas of the eyes, nose, and mouth to protect identity information.
4. The pedestrian re-identification method in the clothing-changing scenario according to claim 1 is characterized in that: The improved AMGA-ResNet50 model includes: A ResNet50 network is constructed, which includes an improved adaptive graph channel attention module (AGA), a multi-order gated aggregation convolution module (MOGA), and an improved triplet loss function (ITL). The improved ResNet50 network includes: Using the pre-trained ResNet50 as the backbone network, the feature map resolution is retained by adjusting the downsampling step size of layer4 (last stride=1), and the terminal global pooling layer and the fully connected layer are removed to avoid the loss of spatial details. Average and maximum pooling are introduced after layer3 and layer4 respectively, and local details and global semantic features are integrated at different feature levels to enhance the expression ability. The feature vector F1 is generated by superposition processing. In the feature processing stage, F1 is first input into AGA, and the channel dependency is modeled by graph convolution to generate feature F2. At the same time, after the hierarchical feature interaction processing of MOGA, the feature F3 is output. In order to enhance feature diversity and optimize computational efficiency, a parallel feature fusion strategy is adopted to realize the nonlinear fusion of F2 and F3 by element-by-element multiplication. Finally, in the training stage, identity loss (Lid) and improved triple loss (L ITL ) and regularized cross entropy loss (L LS ) Iteratively optimizes feature classification.
5. The method for re-identifying pedestrians who change clothes according to claim 1, characterized in that: The adaptive graph channel attention module AGA is introduced after the backbone of the original ResNet50 network, including: First, global average pooling is used to convert the feature map into C×1×1 (C is the number of channels, corresponding to the number of AGA feature points), and then linear mapping (1×1 convolution) of the learnable weight matrix W is performed. The bottleneck structure is used to convert the parameters from C 2 Compress to C 2 / r, the size of the adjacency matrix is simultaneously reduced to (C / r) 2 AGCM through C 2 The adjacency matrix calculates the feature point weights and maps them to the original feature map as channel weights (similar to the linear embedding process).
6. The method for re-identifying pedestrians changing clothes according to claim 1, characterized in that: The backbone of the original ResNet50 network is also introduced in parallel with the multi-stage gated aggregation network module MOGA, including: A four-stage MOGA module is designed. In each stage i, the input image or feature is first resized and mapped to a Ci-dimensional space by an embedding system. The embedded features then enter the MOGA module, which consists of spatial and channel aggregation modules to further aggregate contextual information. The final output stage completes the classification task through global average pooling (GAP) and a linear layer.
7. The method for re-identifying pedestrians changing clothes according to claim 1, characterized in that: The space and channel aggregation module includes: The spatial aggregation module extracts cross-domain correlation features (such as body shape) by analyzing the spatial relationships between key body parts, mitigating interference from clothing changes. The channel aggregation module dynamically weights color, texture, and shape feature channels to enhance identity features such as gait and suppress clothing interference. These two modules work together to optimize the robustness of identity feature modeling.
8. The method for re-identifying pedestrians changing clothes according to claim 1, characterized in that: The improved triplet loss function (ITL) in the training phase includes: By combining the absolute distance of positive pairs with the hard triplet loss, a constraint on the absolute distance of positive pairs is added to the traditional hard triplet loss. This further improves the similarity of positive pairs, ensuring that different images of the same person maintain a small distance despite clothing changes. This improves the accuracy of re-identification of people who have changed clothing.
Citation Information
Cited By
Clothes changing pedestrian re-identification method, system and device and storage medium
CN121482831A
A pedestrian re-identification method based on clothing change
CN122369072A