A person re-identification method based on weakly supervised human collaborative segmentation
Through the pedestrian re-identification method based on weakly supervised human body collaborative segmentation, the pseudo-pixel-level tag is used to obtain pseudo-pixel-level tags, and the pedestrian re-identification is guided to align at the pixel level, solving the problem of degradation of pedestrian re-identification performance under the occlusion problem, achieving higher robustness and efficiency.
Patent Information
- Application Number
- CN202111263138.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-10-28
AI Technical Summary
The existing pedestrian re-identification methods have deteriorated performance under occlusion, and rely on pre-trained segmentation or human analytical models, and cannot effectively utilize data sets with image-level labels.
The pedestrian re-identification method based on weakly supervised human body collaborative segmentation is adopted. By constructing a weakly supervised human body collaborative segmentation network and a multi-task network, only image-level tags are used to obtain the pseudo-pixel-level tags of pedestrian images, and pedestrian re-identification is guided to effectively align at the pixel level.
It effectively solves the occlusion problem, improves the robustness of pedestrian re-identification in actual scenarios, and does not require additional models to obtain semantic information, and only uses image-level labels for segmentation.
Smart Images

Figure CN114049531B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision, and in particular to a pedestrian re-identification method based on weakly supervised human collaborative segmentation. Background Art
[0002] In real-world scenarios, occlusion problems often occur. For example, in a crowd scene, the target pedestrian may be occluded by unrelated pedestrians. Most current person re-identification methods do not consider the occlusion problem. Although these methods show excellent performance on the complete person re-identification dataset, their performance will drop significantly in real-world scenarios.
[0003] In order to solve the occlusion problem, some alignment-based methods have been proposed. Among the alignment-based methods, pixel-level alignment is the most sophisticated alignment method. However, most of the pedestrian re-identification methods based on pixel-level alignment rely on pre-trained segmentation or human parsing models to obtain additional semantic information. However, the existing pedestrian re-identification datasets only contain image-level labels, but no pixel-level labels. These semantic models are trained on datasets manually annotated with pixel-level labels and inferred on pedestrian re-identification datasets. Due to cross-domain and occlusion problems, the above methods have limited improvement on occluded pedestrian re-identification datasets. Based on this, the present invention provides a human collaborative segmentation network based on weak supervision that only uses image-level labels to obtain the semantic information of pedestrian images, thereby guiding pedestrian re-identification to effectively align at the pixel level, which can better solve the occlusion problem. Summary of the invention
[0004] In order to solve the occlusion problem that often occurs in real scenes, that is, to effectively align the features of pedestrian images and improve the robustness to occlusion, the present invention provides a pedestrian re-identification method based on weakly supervised human body collaborative segmentation.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] A pedestrian re-identification method based on weakly supervised human collaborative segmentation includes the following steps:
[0007] 1) Construct a weakly supervised human collaborative segmentation network, and send the pedestrian images of the same identity as a batch into the weakly supervised human collaborative segmentation network to obtain the pseudo pixel-level labels corresponding to the pedestrian images;
[0008] 2) Construct a multi-task network framework including a backbone network, a person re-identification sub-network and a human segmentation sub-network, and feed pedestrian images and pseudo-pixel-level labels into the multi-task network to obtain image features, foreground features and human body part features;
[0009] 3) Alternately train the human collaborative segmentation network and the multi-task network to obtain the optimal pseudo-pixel-level labels and multi-task network model. Send the pedestrian images in the test set into the multi-task network, and only use foreground features and partial human features to calculate the distance between images and perform pedestrian feature matching.
[0010] The step 1) specifically comprises the following steps:
[0011] 11) In order to obtain pixel-level labels of pedestrian images with only image-level labels, a weakly supervised human collaborative segmentation network is constructed. The network consists of an encoder and a decoder. The encoder is a classification network pre-trained on ImageNet, and the decoder is a constructed full convolutional neural network. The decoder consists of three basic blocks and a prediction layer. The basic block consists of a convolution layer with a convolution kernel of 3×3 size, a batch normalization (BN) layer, and a nonlinear activation function (ReLU). The prediction layer is a convolution layer with a convolution kernel of 1×1. The number of convolution kernels in this convolution layer is the number of categories predicted by the segmentation network, denoted by C′.
[0012] 12) The pedestrian image group of the same identity with size h×w is recorded as Where N is the number of images in the image group, and i and j are the positions of the pixel in the kth image. X is fed into the human collaborative segmentation network, and the output is a prediction map of size h / 4×w / 4×C′, where the prediction vector corresponding to each pixel is 1×1×C′. Using the argmax function, the pseudo category of each pixel is obtained.
[0013] 13) In order to utilize the existing consistency information in pedestrian images, three consistency loss functions are constructed. ① Local space consistency loss: In the local space, adjacent pixels should have the same label. In order to ensure the local spatial consistency of the segmentation result, the present invention maximizes the similarity between the prediction vector of the central pixel and the neighboring pixels in an R×R window. The specific formula is as follows:
[0014]
[0015] in is the prediction vector of the center pixel, y s (s=1,…,S) is the prediction vector of the neighboring pixels in the R×R area, ‖·‖ p is the p-norm. In the present invention, R is set to 3.
[0016] ② Language consistency loss: Pixels with the same semantics for the same pedestrian under different camera perspectives should be predicted as the same label. The human body area of the same pedestrian under different camera perspectives is unchanged, and the segmentation network will assign pixels with the same coloring and texture to the same label. Based on the above, the present invention will maximize the prediction vector of pixels with the same semantics between different images. The specific formula is as follows:
[0017]
[0018] Where M is the number of all pixels in the image group with the same identity, y is the prediction vector for the pixel, and pl is the pseudo-label obtained by passing the prediction vector through the argmax function.
[0019] ③ Background consistency loss: The background of pedestrian images with the same identity should be predicted as the same label. Since the backgrounds of different images are different, semantic consistency loss cannot guarantee background consistency. Under different camera perspectives, the lighting and posture of pedestrians vary greatly. Under the same camera, except for the background deviation, the changes of pedestrians are very small, that is, the similarity within the camera perspective. Based on the similarity within the camera perspective, the present invention maximizes the similarity of the prediction vectors of adjacent images under the same camera perspective. The specific formula is as follows:
[0020]
[0021] in is the prediction vector of the kth image, k1 and k2 are adjacent images under the same camera perspective. In summary, the optimization objective function of the Human Co-parsing Network (HCNet) is:
[0022] L HCNet =L sem +λ L L local +λ B L back
[0023] where λ L and λ B To balance the weight.
[0024] 14) Initialize the parameters in the encoder with the parameters pre-trained on ImageNet, initialize the parameters in the decoder with Kaiming uniform, output the prediction vector through the human collaborative segmentation network, calculate the objective function, and update the parameters in the decoder through back propagation. Repeat the above steps until the number of pseudo labels output by the human collaborative segmentation network is less than the designed minimum number of labels m L .
[0025] 15) Since there are no real pixel-level labels, in order to output the specific category represented by the pseudo-label, a label redistribution based on the center prior is constructed. In pedestrian images, the foreground, i.e., pedestrians and their personal belongings, is generally located in the center of the image, while the background is located at the edge of the image, i.e., the center prior. Based on the center prior, the pseudo-label is divided into foreground and background, and then divided into C-1 categories according to the average height of all pixels of each category of pseudo-labels in the foreground. The reallocated labels are used as the pseudo-true labels of the human body parsing subnetwork of the multi-task network.
[0026] The step 2) constructs a multi-task network, specifically comprising the following steps:
[0027] 21) Construct a multi-task network architecture. The backbone network has the same encoder as the human collaborative segmentation network, and the weights are shared. The human parsing network is a convolutional layer with a convolution kernel size of 1×1 and a number of convolution kernels C. The input of the pedestrian re-identification sub-network is the deep features output by the backbone network and the semantic information output by the human collaborative segmentation network. The pedestrian re-identification sub-network divides the deep features into image features, foreground features, and human body part features according to the semantic information, and finally sends the image features, foreground features, and human body part features to three different classifiers to obtain image prediction vectors, foreground prediction vectors, and human body part prediction vectors.
[0028] 22) Construct the multi-task network objective function. Use the cross entropy loss to calculate the loss between the predicted pixel vector of the human body parsing subnetwork and the pseudo label output by the human body collaborative segmentation network, denoted as L parsing The loss between the image prediction vector and the true pedestrian label is calculated using triplet loss and softmax cross entropy loss, denoted as L Image The loss between the foreground prediction vector and the true pedestrian label is calculated using the softmax cross entropy loss, denoted as L Fore The loss between the human part prediction vector and the true pedestrian label is denoted as L using the softmax cross entropy loss. Parts In summary, the optimization objective function of the multi-task network is:
[0029] L=L Im e +L Fore +L Parts +λ hp L parsing
[0030] where λ hp To balance the weight.
[0031] The specific steps in step 3) are as follows:
[0032] 31) Alternately train the human collaborative segmentation network and the multi-task network. When training the entire framework, each iteration is divided into two steps. First, the human collaborative segmentation network is trained to obtain pixel-level pseudo labels of pedestrian images, and then the pixel-level pseudo labels are used to guide the learning of the multi-task network. Alternate training is performed to obtain the optimal model.
[0033] 32) In the inference phase, only the multi-task network is used. For an image pair (x 1 ,x 2 ), the present invention only uses foreground features and human body features to calculate the distance, and the specific formula is as follows:
[0034]
[0035] Where cos(·) is the cosine distance, P i =1 if part i is the visible part of the image pair, otherwise it is 0, and SV≤C-1 is the number of shared visible parts. After calculating the distance, the person re-identification results are sorted and output.
[0036] Compared with the prior art, the present invention has the following advantages:
[0037] 1. The present invention does not need to use additional models to obtain semantic information in pedestrian images. It only uses image-level labels in the pedestrian re-identification dataset to build a weakly supervised semantic segmentation model to obtain pseudo-pixel-level labels of pedestrian images.
[0038] 2. The present invention mines three consistency attributes in human images and their corresponding human parsed images and encodes them into three loss functions, so that the semantic segmentation model learns the three consistencies, thereby producing better pedestrian image segmentation results.
[0039] 3. The present invention proposes a framework for alternating training of two networks. The multi-task network refines parameters to make the differences between features with different semantics greater, so that the human collaborative segmentation network produces better segmentation results to guide the pedestrian re-identification sub-network to perform feature alignment at the pixel level.
[0040] 4. The present invention provides a pedestrian re-identification system that is robust to occlusion problems and has greater application value in real scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 The system flow chart of the method of the present invention is shown in FIG.
[0042] Figure 2 The pedestrian image segmentation results generated by the present invention are compared with those of other methods. DETAILED DESCRIPTION
[0043] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0044] Example:
[0045] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the following embodiments are described in detail. Figure 1 It should be understood that the specific embodiments described herein are only used to explain the present invention, but not to limit the present invention.
[0046] Step 1: Data preprocessing. Read the training set in the person re-identification dataset into the memory and perform preprocessing. The specific implementation is as follows:
[0047] The pedestrian images in the training set are read into memory using the Python programming language. Normalization is first performed, that is, the pixel values are converted to a mean of 0 and a variance of 1. Random erasing, boundary expansion and other operations are then used for data enhancement. Finally, the images are converted into a data format supported by the Pytorch deep learning framework.
[0048] Step 2: Construct a weakly supervised human collaborative segmentation network, and send the pedestrian images of the same identity as a batch into the weakly supervised human collaborative segmentation network to obtain the pseudo-pixel-level labels corresponding to the pedestrian images.
[0049] The specific implementation is as follows:
[0050] (1) In order to obtain pixel-level labels for pedestrian images with only image-level labels, a weakly supervised human collaborative segmentation network is constructed. The network consists of an encoder and a decoder. The encoder is a classification network pre-trained on ImageNet, and the decoder is a constructed fully convolutional neural network. The decoder consists of three basic blocks and a prediction layer. The basic block consists of a convolution layer with a convolution kernel of 3×3 size, a batch normalization (BN) layer, and a nonlinear activation function (ReLU). The prediction layer is a convolution layer with a convolution kernel of 1×1. The number of convolution kernels in this convolution layer is the number of categories predicted by the segmentation network, denoted by C. ′ =32.
[0051] (2) The image group of pedestrians with the same identity and size of 256×128 is recorded as Where N is the number of images in the image group, and i and j are the positions of the pixel in the kth image. X is fed into the human collaborative segmentation network, and the output is a prediction map of size 256 / 4×128 / 4×32, where the prediction vector corresponding to each pixel is 1×1×32. Using the argmax function, the pseudo category of each pixel is obtained.
[0052] (3) In order to utilize the existing consistency information in pedestrian images, three consistency loss functions are constructed.
[0053] ①Local spatial consistency loss: In the local space, adjacent pixels should have the same label. In order to ensure the local spatial consistency of the segmentation result, the present invention maximizes the similarity between the prediction vector of the central pixel and the neighboring pixels in an R×R window. The specific formula is as follows:
[0054]
[0055] in is the prediction vector of the center pixel, y s (s=1,…,S) is the prediction vector of the neighboring pixels in the R×R area, ‖·‖ p is the p-norm. In the present invention, R is set to 3.
[0056] ② Language consistency loss: Pixels with the same semantics for the same pedestrian under different camera perspectives should be predicted as the same label. The human body area of the same pedestrian under different camera perspectives is unchanged, and the segmentation network will assign pixels with the same coloring and texture to the same label. Based on the above, the present invention will maximize the prediction vector of pixels with the same semantics between different images. The specific formula is as follows:
[0057]
[0058] Where M is the number of all pixels in the image group with the same identity, y is the prediction vector for the pixel, and pl is the pseudo-label obtained by passing the prediction vector through the argmax function.
[0059] ③ Background consistency loss: The background of pedestrian images with the same identity should be predicted as the same label. Since the backgrounds of different images are different, semantic consistency loss cannot guarantee background consistency. Under different camera perspectives, the lighting and posture of pedestrians vary greatly. Under the same camera, except for the background deviation, the changes of pedestrians are very small, that is, the similarity within the camera perspective. Based on the similarity within the camera perspective, the present invention maximizes the similarity of the prediction vectors of adjacent images under the same camera perspective. The specific formula is as follows:
[0060]
[0061] in is the prediction vector of the kth image, k1 and k2 are adjacent images under the same camera perspective. In summary, the optimization objective function of the Human Co-parsing Network (HCNet) is:
[0062] L HCNet =L sem +2*Llocal +L back
[0063] (4) Initialize the parameters in the encoder with the parameters pre-trained on ImageNet, initialize the parameters in the decoder with Kaiming uniform, output the prediction vector through the human collaborative segmentation network, calculate the objective function, and update the parameters in the decoder through back propagation. Repeat the above steps until the number of pseudo labels output by the human collaborative segmentation network is less than the designed minimum number of labels m L =18.
[0064] (5) Since there are no real pixel-level labels, in order to output the specific category represented by the pseudo-label, a label redistribution based on the center prior is constructed. In pedestrian images, the foreground, i.e., pedestrians and their personal belongings, is generally located in the center of the image, while the background is located at the edge of the image, i.e., the center prior. Based on the center prior, the pseudo-labels are divided into foreground and background, and then divided into C-1 categories according to the average height of all pixels of each category of pseudo-labels in the foreground. The reallocated labels are used as the pseudo-true labels of the human body parsing subnetwork of the multi-task network, and the visualization is as follows Figure 2 (Among them, (a) occluded image, (b) complete image): Segmentation visualization of the human body collaborative segmentation network (grayscale display).
[0065] Step 3: Build a multi-task network framework including the backbone network, the pedestrian re-identification sub-network and the human body segmentation sub-network, and send the pedestrian image and pseudo pixel-level labels into the multi-task network to obtain image features, foreground features and human body part features;
[0066] The specific implementation is as follows:
[0067] (1) Construct a multi-task network architecture. The backbone network has the same encoder as the human collaborative segmentation network, and the weights are shared. The human parsing network is a convolutional layer with a kernel size of 1×1 and 4 kernels. The input of the person re-identification sub-network is the deep features output by the backbone network and the semantic information output by the human collaborative segmentation network. The person re-identification sub-network divides the deep features into image features, foreground features, and human part features based on the semantic information. Finally, the image features, foreground features, and human part features are sent to three different classifiers to obtain the image prediction vector, foreground prediction vector, and human part prediction vector.
[0068] (2) Construct the multi-task network objective function. Use the cross entropy loss to calculate the loss between the predicted pixel vector of the human body parsing subnetwork and the pseudo label output by the human body collaborative segmentation network, denoted as L parsing The loss between the image prediction vector and the true pedestrian label is calculated using triplet loss and softmax cross entropy loss, denoted as L ImageThe loss between the foreground prediction vector and the true pedestrian label is calculated using the softmax cross entropy loss, denoted as L Fore The loss between the human part prediction vector and the true pedestrian label is denoted as L using the softmax cross entropy loss. Parts In summary, the optimization objective function of the multi-task network is:
[0069] L=L Image +L Fore +L Parts +0.1*L parsing
[0070] Step 4: Alternately train the human collaborative segmentation network and the multi-task network to obtain the optimal pseudo-pixel-level label and multi-task network model, send the pedestrian images in the test set to the multi-task network, and only use foreground features and partial human features to calculate the distance between images and perform pedestrian feature matching.
[0071] The specific implementation is as follows:
[0072] (1) Alternately train the human collaborative segmentation network and the multi-task network. When training the entire framework, each iteration is divided into two steps. First, the human collaborative segmentation network is trained to obtain pixel-level pseudo labels of pedestrian images. Then, the pixel-level pseudo labels are used to guide the learning of the multi-task network. Alternate training is performed to obtain the optimal model.
[0073] (2) In the inference phase, only the multi-task network is used. For an image pair (x 1 ,x 2 ), the present invention only uses foreground features and human body features to calculate the distance, and the specific formula is as follows:
[0074]
[0075] Where cos(·) is the cosine distance, P i =1 if part i is the visible part of the image pair, otherwise it is 0, and SV≤C-1 is the number of shared visible parts. After calculating the distance, the person re-identification results are sorted and output.
[0076] (3) The Rank-1 and mean average precision (mAP) indicators are used to evaluate the performance of the present invention. The comparison results with the most advanced methods on two occluded pedestrian re-identification datasets are shown in the following table:
[0077] method Rank-1 mAP PCB 42.6 33.7 PGFA 51.4 37.3 HONet 55.1 43.8 ISP 62.8 52.3 The present invention 65.6 54.8
Claims
1. A pedestrian re-identification method based on weakly supervised human collaborative segmentation, characterized in that: The following steps are involved: 1) Construct a weakly supervised human collaborative segmentation network, and send the pedestrian images of the same identity as a batch into the weakly supervised human collaborative segmentation network to obtain the pseudo pixel-level labels corresponding to the pedestrian images; 2) Construct a multi-task network framework: including a backbone network, a person re-identification sub-network and a human segmentation sub-network. Send pedestrian images and pseudo-pixel-level labels into the multi-task network to obtain image features, foreground features and human body part features; 3) Alternately train the human collaborative segmentation network and the multi-task network to obtain the optimal pseudo pixel-level label and multi-task network model, send the pedestrian images in the test set to the multi-task network, and only use the foreground features and partial features of the human body to calculate the distance between images and perform pedestrian feature matching; The step 1) specifically comprises the following steps: 11) In order to obtain pixel-level labels of pedestrian images with only image-level labels, a weakly supervised human collaborative segmentation network is constructed: The network consists of an encoder and a decoder. The encoder is a classification network pre-trained on ImageNet, and the decoder is a constructed fully convolutional neural network. The decoder consists of three basic blocks and a prediction layer. The basic block consists of a convolution layer with a convolution kernel of 3×3, a batch normalization (BN) layer, and a nonlinear activation function (ReLU). The prediction layer is a convolution layer with a convolution kernel of 1×1. The number of convolution kernels in this convolution layer is the number of categories predicted by the segmentation network, denoted by C′. 12) The pedestrian image group of the same identity with size h×w is recorded as Where N is the number of images in the image group, i and j are the positions of the pixel in the kth image; X is fed into the human collaborative segmentation network, and a prediction map of size h / 4×w / 4×C′ is output, where the prediction vector corresponding to each pixel is 1×1×C′; the argmax function is used to obtain the pseudo category of each pixel 13) In order to utilize the existing consistency information in pedestrian images, three consistency loss functions are constructed: ①Local spatial consistency loss: In the local space, adjacent pixels should have the same label; in order to ensure the local spatial consistency of the segmentation result, the similarity between the prediction vector of the central pixel and the neighboring pixels in an R×R window is maximized. The specific formula is as follows: in is the prediction vector of the center pixel, y s (s=1,…,S) is the prediction vector of the neighboring pixels in the R×R area, ‖·‖ p is the p-norm; R is set to 3; ② Language consistency loss: Pixels with the same semantics for the same pedestrian under different camera perspectives should be predicted as the same label; the human body area of the same pedestrian under different camera perspectives is unchanged, and the segmentation network will assign pixels with the same coloring and texture to the same label; Based on the above, the prediction vector of pixels with the same semantics between different images will be maximized. The specific formula is as follows: Where M is the number of all pixels in the image group with the same identity, y is the prediction vector of the pixel, and pl is the pseudo-label obtained by passing the prediction vector through the argmax function; ③ Background consistency loss: The background of the same identity pedestrian image should be predicted as the same label; since the backgrounds of different images are different, semantic consistency loss cannot guarantee background consistency; under different camera perspectives, the illumination and posture of pedestrians vary greatly; under the same camera, except for the background deviation, the changes of pedestrians are very small, that is, the similarity within the camera perspective; based on the similarity within the camera perspective, the similarity of the prediction vectors of adjacent images under the same camera perspective is maximized. The specific formula is as follows: in is the prediction vector of the kth image, k1 and k2 are adjacent images from the same camera perspective; In summary, the optimization objective function of the Human Co-parsing Network (HCNet) is: L HCNet =L sem +λ L L local +λ B L back where λ L and λ B To balance the weight; 14) Initialize the parameters in the encoder with the parameters pre-trained on ImageNet, initialize the parameters in the decoder with Kaiming uniform, output the prediction vector through the human collaborative segmentation network, calculate the objective function, and update the parameters in the decoder through back propagation; repeat the above steps until the number of pseudo labels output by the human collaborative segmentation network is less than the designed minimum number of labels m L ; 15) Since there are no real pixel-level labels, in order to output the specific category represented by the pseudo-label, a label redistribution based on the center prior is constructed; in pedestrian images, the foreground, i.e., pedestrians and their personal belongings, are generally located in the center of the image, while the background is located at the edge of the image, i.e., the center prior; based on the center prior, the pseudo-labels are divided into foreground and background, and then divided into C-1 categories according to the average height of all pixels of each type of pseudo-label in the foreground; the redistributed labels are used as the pseudo-true labels of the human body parsing subnetwork of the multi-task network; The step 2) constructs a multi-task network, specifically comprising the following steps: 21) Construct a multi-task network architecture: the backbone network and the human collaborative segmentation network have the same encoder and share weights; the human parsing network is a convolutional layer with a convolution kernel size of 1×1 and a number of convolution kernels of C; the input of the pedestrian re-identification sub-network is the deep features output by the backbone network and the semantic information output by the human collaborative segmentation network; the pedestrian re-identification sub-network divides the deep features into image features, foreground features and human body part features according to the semantic information, and finally sends the image features, foreground features and human body part features to three different classifiers to obtain image prediction vectors, foreground prediction vectors and human body part prediction vectors; 22) Construct a multi-task network objective function: Use the cross entropy loss to calculate the loss between the predicted pixel vector of the human body parsing subnetwork and the pseudo label output by the human body collaborative segmentation network, denoted as L parsing ; Use triplet loss and softmax cross entropy loss to calculate the loss between the image prediction vector and the true pedestrian label, denoted as L Image ; Use the softmax cross entropy loss to calculate the loss between the foreground prediction vector and the true pedestrian label, denoted as L Fore ; Use softmax cross entropy loss to calculate the loss between the human body part prediction vector and the true pedestrian label, denoted as L Parts ; In summary, the optimization objective function of the multi-task network is: L=L Image +L Fore +L Parts +λ hp L parsing where λ hp To balance the weight; The specific steps in step 3) are as follows: 31) Alternate training of human collaborative segmentation network and multi-task network: When training the entire framework, each iteration is divided into two steps. First, the human collaborative segmentation network is trained to obtain pixel-level pseudo labels of pedestrian images, and then the pixel-level pseudo labels are used to guide the learning of the multi-task network. Alternate training is performed to obtain the optimal model. 32) In the inference stage, only the multi-task network is used: for the image pair (X1, x2), the foreground features and the human body part features are used to calculate the distance. The specific formula is as follows: Where cos(·) is the cosine distance, P i =1 if part i is the visible part of the image pair, otherwise it is 0, SV≤C-1 is the number of shared visible parts; after calculating the distance, the pedestrian re-identification results are sorted and output.