Pedestrian re-identification method, device and equipment adapted to clothing change

By using contrastive learning and data enhancement methods, a pedestrian re-identification network model is trained to solve the problem of low pedestrian recognition accuracy under clothing changes, and achieve high-accuracy clothing-independent feature extraction and identity recognition.

CN120656202APending Publication Date: 2025-09-16TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410287720.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-13
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing pedestrian recognition technology has low accuracy in scenarios with changing clothing, and it is difficult to effectively extract clothing-independent consistency features, resulting in inaccurate recognition results.

Method used

A contrastive learning-based method is adopted to train the pedestrian re-identification network model. The clothing-independent features are extracted by combining the convolutional network and the mean network. The model is optimized through data enhancement and contrastive learning loss function, and the pedestrian feature memory library is stored to improve recognition accuracy.

Benefits of technology

The accuracy of pedestrian recognition is significantly improved by about 15% in scenarios where clothing changes, making recognition independent of changes in pedestrian clothing and ensuring highly accurate identity recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120656202A_ABST
    Figure CN120656202A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image recognition, and discloses a pedestrian re-recognition method, device and equipment adapting to clothing changes, and the method comprises the steps: obtaining a pedestrian image, carrying out the re-recognition of the pedestrian image through a trained pedestrian re-recognition network model, and determining a recognition result; wherein the trained pedestrian re-identification network model is obtained by training according to a training set, and the training set is a pedestrian image data set. According to the invention, the problem of low accuracy of pedestrian re-identification in the scene of pedestrian clothing change is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to a pedestrian re-identification method, device and equipment that adapts to clothing changes. Background Art

[0002] Pedestrian identity recognition refers to the cross-camera matching of pedestrian images in urban surveillance scenarios, matching newly collected pedestrian images to existing pedestrian images in the image library, and thus determining the pedestrian's identity. This technology has broad application prospects in the fields of intelligent security and missing people. Existing pedestrian identity recognition technology is heavily dependent on the pedestrian's clothing. When the pedestrian's clothing changes, for example, the suspect deliberately changes his clothes to avoid surveillance, the accuracy drops significantly. The present invention proposes a pedestrian recognition method and device for clothing-variable situations, which extracts clothing-independent consistency features (such as face, hairstyle, body shape, etc.) based on comparative learning, and effectively improves the accuracy of pedestrian recognition in scenes with clothing changes.

[0003] Existing research on pedestrian recognition relies on clothing texture information, with limited research on clothing-variable pedestrian identification. Existing methods have achieved good results for clothing-invariant pedestrian identification, but performance degrades significantly when clothing-variable is involved. Clothing variations in pedestrian recognition are a major bottleneck for this technology's application. The few existing methods for clothing-variable pedestrian identification struggle to extract discriminative identity features, resulting in insufficient recognition accuracy.

[0004] Current person re-identification technologies mostly rely on clothing texture information. While they achieve good performance in short, non-clothing-changing scenarios, performance degrades significantly in scenarios where clothing changes. In practical applications, it's necessary to account for clothing changes in some scenarios, such as long-term recognition (several days) and counter-detection of suspects in security scenarios.

[0005] Currently, there are only a few methods for person re-identification in scenes with variable clothing, and these methods do not achieve good results. For example, some work emphasizes the facial area in pedestrian images to improve recognition accuracy, but facial information is not always visible in person re-identification (for example, in the back view). Some work uses human silhouettes or body masks as input to model human posture information, but posture information itself lacks discriminative power and is severely affected by posture changes. Summary of the Invention

[0006] The present invention provides a pedestrian re-identification method, device and equipment that adapt to clothing changes, solving the problem of low pedestrian re-identification accuracy in scenarios where pedestrian clothing changes.

[0007] A pedestrian re-identification method that adapts to clothing changes, comprising:

[0008] Obtain a pedestrian image, and re-identify the pedestrian image using a trained pedestrian re-identification network model to determine a recognition result;

[0009] The trained person re-identification network model is obtained by training based on a training set, which is a pedestrian image dataset.

[0010] In one embodiment of the present invention, training the pedestrian re-identification network model specifically includes: obtaining a pedestrian image dataset and preprocessing the pedestrian image dataset; step A, extracting samples from the preprocessed pedestrian image dataset as training data; step B, training the pedestrian re-identification network model based on the training data; iteratively executing steps A and B until the pedestrian re-identification network model converges.

[0011] In one embodiment of the present invention, the training of the pedestrian re-identification network model based on the training data specifically includes: using the extracted training data as the original image to perform data enhancement through random clothing transformation to obtain a unified pedestrian transformed image as an enhanced image; inputting the original image and the enhanced image into the pedestrian re-identification network model for training; the pedestrian re-identification network model includes a convolutional network model and a mean network model; during the training process, determining the contrastive learning loss based on the convolutional network model and the mean network model, and updating the convolutional network model according to the contrastive learning loss; updating the features extracted from the current batch of training data into the pedestrian feature memory library; and updating the mean network model according to the time series average formula.

[0012] In one embodiment of the present invention, the extracted training data is used as the original image for data enhancement through random clothing transformation, which specifically includes: using the extracted training data as the original image; for each image in the original image, randomly selecting one from multiple data enhancement modes in a uniformly distributed manner for data enhancement; and executing corresponding data enhancement steps according to the randomly selected data enhancement mode to obtain an enhanced image as an enhanced image.

[0013] In an embodiment of the present invention, the multiple data enhancement modes include: block enhancement, inverse enhancement, and random change enhancement.

[0014] In one embodiment of the present invention, the corresponding data enhancement step is performed according to the randomly selected data enhancement mode, specifically including: if the randomly selected data enhancement mode is block, the clothing part in the input pedestrian image is directly set to black to erase the clothing-related information; if the randomly selected data enhancement mode is inverse, the RGB value of the clothing part of the input pedestrian image is inverted; if the randomly selected data enhancement mode is random change, based on a pre-built clothing image template library, a top image and a bottom image are randomly extracted from the clothing image template library, and then the top and bottom of the input pedestrian image are respectively sampled and mapped at the pixel level using images in the corresponding clothing image template library.

[0015] In one embodiment of the present invention, determining the loss of contrastive learning specifically includes: determining the loss of contrastive learning according to the following formula

[0016]

[0017] Among them, f θ (.) represents the convolutional network model; represents the mean network model; τ is the temperature coefficient, which is used to adjust the weights between different negative samples; x a is the anchor point sample, x p is the positive sample in the same batch, x c is the negative sample in the feature memory bank; S a It is the sample set in the feature memory bank that has the same ID as the anchor sample.

[0018] In one embodiment of the present invention, updating the mean network model according to the time series average formula specifically includes: updating the mean network model according to the following formula:

[0019]

[0020] Where m is the momentum hyperparameter, represents the updated mean network model, represents the mean network model before updating, and θ is the convolutional network model.

[0021] A pedestrian re-identification device that adapts to clothing changes, comprising:

[0022] A pedestrian re-identification module is used to obtain pedestrian images, re-identify the pedestrian images using a trained pedestrian re-identification network model, and determine the recognition result;

[0023] The trained person re-identification network model is obtained by training based on a training set, which is a pedestrian image dataset.

[0024] In one embodiment of the present invention, it also includes: a pedestrian image preprocessing module, which is used to obtain a pedestrian image dataset and preprocess the pedestrian image dataset; an iterative training module, which is used to iteratively execute steps A and B until the pedestrian re-identification network model converges; wherein, step A, extracts samples from the preprocessed pedestrian image dataset as training data; step B, trains the pedestrian re-identification network model based on the training data.

[0025] In one embodiment of the present invention, the pedestrian image preprocessing module includes: a pedestrian posture perception submodule, which is used to obtain the corresponding human body key points and human body part segmentation information in each pedestrian image, cluster the point coordinates according to the point coordinates, and obtain posture information; a positive sample screening submodule, which is used to screen positive sample pairs in the pedestrian image dataset according to posture consistency constraints.

[0026] In one embodiment of the present invention, the iterative training module includes: a clothing transformation feature enhancement submodule, which is used to transform the clothing part of the original image based on human body part segmentation information, and generate an image of the same pedestrian in the original image after the clothing is changed, as an enhanced image; the original image is the image before image enhancement; a pedestrian feature convolutional network submodule, which is used to extract the consistent identity features of pedestrians from pedestrian images through a convolutional neural network; a mean network submodule, which is used to update parameters based on the time-series average of the convolutional network model; a contrastive learning submodule, which is used to constrain the convolutional network model to focus on the consistent identity features under clothing changes based on a pair-wise contrastive learning supervision model, by increasing the metric between negative sample pairs whose clothing similarity meets the preset range and reducing the metric between positive sample pairs with different clothing but the same posture; a pedestrian feature memory submodule, which is used to store the consistent identity features of pedestrians generated in the iteration.

[0027] A pedestrian re-identification device that adapts to clothing changes, comprising:

[0028] at least one processor; and,

[0029] A memory connected to the at least one processor via a bus; wherein,

[0030] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed to implement the method as described in any one of the above embodiments.

[0031] A non-volatile storage medium stores computer-executable instructions, wherein the computer-executable instructions are executed by a processor to implement the method described in any one of the above embodiments.

[0032] The present invention provides a pedestrian re-identification method, device and equipment that adapt to changes in clothing, which includes at least the following beneficial effects: through the pedestrian re-identification method provided by the present invention, pedestrian identity recognition does not depend on the pedestrian's clothing. When the pedestrian's clothing changes, the same pedestrian can still be identified with high accuracy, effectively improving the accuracy of pedestrian recognition in scenarios where clothing changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0034] Figure 1 A schematic diagram of the steps of a pedestrian re-identification model training method that adapts to clothing changes provided by an embodiment of the present invention;

[0035] Figure 2 A flow chart of a method for training based on pedestrian images provided in an embodiment of the present invention;

[0036] Figure 3 A schematic diagram of the steps of a pedestrian re-identification method adapted to clothing changes provided by an embodiment of the present invention;

[0037] Figure 4 A schematic diagram of a pedestrian re-identification device that adapts to clothing changes provided by an embodiment of the present invention;

[0038] Figure 5 A schematic diagram of a pedestrian re-identification device that adapts to clothing changes provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0040] It should be noted that, it is explicitly and implicitly understood by those skilled in the art that the embodiments described in the present invention can be combined with other embodiments without conflict. Unless otherwise defined, the technical terms or scientific terms involved in the present invention should have the usual meanings understood by people with ordinary skills in the technical field to which the present invention belongs. The words "one", "a", "a", "the" and the like involved in the present invention do not indicate a quantity limitation and can represent the singular or plural. The terms "include", "comprise", "have" and any variations thereof involved in the present invention are intended to cover non-exclusive inclusions; the terms "first", "second", "third" and the like involved in the present invention are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0041] The present invention proposes a pedestrian re-identification method, device, and apparatus that adapt to clothing changes, which are described in detail below.

[0042] Before using the pedestrian re-identification network model, it needs to be trained. Figure 1 The following steps are provided as a diagram of the training steps for the person re-identification network model:

[0043] S110: Obtain a pedestrian image dataset and preprocess the pedestrian image dataset.

[0044] Specifically, the obtained pedestrian image dataset is preprocessed according to step 1.

[0045] Step 1: Obtain the human body key points and body part segmentation information corresponding to each pedestrian image. Perform three-category K-means clustering on the coordinates of the human body key points to obtain the pedestrian pose (front, side, back).

[0046] S120: Extract samples from the preprocessed pedestrian image dataset as training data.

[0047] Specifically, samples are drawn according to step 2.

[0048] Step 2: Extract a batch of samples from the preprocessed pedestrian image dataset as training data.

[0049] S130: Train the person re-identification network model according to the training data.

[0050] In one embodiment of the present invention, a person re-identification network model is trained based on training data, specifically including: performing data enhancement on the extracted training data as the original image through random clothing transformation to obtain a uniformly transformed image of the pedestrian as an enhanced image; inputting the original image and the enhanced image into the person re-identification network model for training; the person re-identification network model includes a convolutional network model and a mean network model; during the training process, determining a contrastive learning loss based on the convolutional network model and the mean network model, and updating the convolutional network model based on the contrastive learning loss; updating the features extracted from the current batch of training data into a pedestrian feature memory library; and updating the mean network model based on a time series average formula.

[0051] In one embodiment of the present invention, the extracted training data is used as the original image for data enhancement through random clothing transformation, specifically including: using the extracted training data as the original image; for each image in the original image, randomly selecting one from multiple data enhancement modes in a uniformly distributed manner for data enhancement; executing corresponding data enhancement steps according to the randomly selected data enhancement mode to obtain an enhanced image as the enhanced image.

[0052] In one embodiment of the present invention, the multiple data enhancement modes include: block enhancement, inverse enhancement, and random change enhancement.

[0053] In one embodiment of the present invention, corresponding data enhancement steps are performed according to the randomly selected data enhancement mode, specifically including: if the randomly selected data enhancement mode is block, the clothing part in the input pedestrian image is directly set to black to erase the clothing-related information; if the randomly selected data enhancement mode is inverse, the RGB value of the clothing part of the input pedestrian image is inverted; if the randomly selected data enhancement mode is random change, based on a pre-built clothing image template library, a top image and a bottom image are randomly extracted from the clothing image template library, and then the top and bottom of the input pedestrian image are respectively sampled and mapped at the pixel level using images in the corresponding clothing image template library.

[0054] Specifically, data enhancement is performed according to step 3.

[0055] Step 3: Perform data augmentation on the extracted data by random clothing transformation to obtain the transformed image of the same person.

[0056] Step 3.1: For each input image, randomly select a data augmentation mode in a uniformly distributed manner, namely block, inverse, and random change. The corresponding modes jump to steps 3.2.1, 3.2.2, and 3.2.3 respectively.

[0057] Step 3.2.1: Directly blacken the clothing part of the input pedestrian image to erase clothing-related information.

[0058] Step 3.2.2: Invert the RGB values ​​of the clothing part of the input pedestrian image.

[0059] Step 3.2.3: Build a clothing image template library in advance, randomly extract a top image and a bottom image from the image template library, and then use the corresponding images in the clothing image template library to perform pixel-level sampling and mapping on the top and bottom of the input pedestrian image.

[0060] Step 3.3: Input the images before and after clothing transformation data augmentation into the model network for subsequent contrastive learning.

[0061] In one embodiment of the present invention, determining the loss of contrastive learning specifically includes: determining the loss of contrastive learning according to the following formula

[0062]

[0063] Among them, f θ (.) represents the convolutional network model; represents the mean network model; τ is the temperature coefficient, which is used to adjust the weights between different negative samples; x a is the anchor point sample, x p is the positive sample in the same batch, x c is the negative sample in the feature memory bank; S a It is the sample set in the feature memory bank that has the same ID as the anchor sample.

[0064] In one embodiment of the present invention, updating the mean network model according to the time series average formula specifically includes: updating the mean network model according to the following formula:

[0065]

[0066] Where m is the momentum hyperparameter, represents the updated mean network model, represents the mean network model before updating, and θ is the convolutional network model.

[0067] Specifically, after data augmentation, model training is performed according to the following steps.

[0068] Step 4: Input the original images of the current iteration batch and the enhanced images after data augmentation into the network for training.

[0069] Step 5: Calculate the loss of contrastive learning, the formula is:

[0070]

[0071] Among them, f θ (.)and They represent the conventional pedestrian feature convolution model and the mean network model respectively, τ is the temperature coefficient, which is used to adjust the weights between different negative samples, and x a ,x p ,x c They are anchor samples, positive samples in the same batch and negative samples in the memory bank, S a It is the sample set in the feature memory bank that has the same ID as the anchor sample.

[0072] Step 6: Update the convolutional network model by contrastive learning loss.

[0073] Step 7: Update the features extracted from the current data batch into the pedestrian feature memory library.

[0074] Step 8: Update the mean network model according to the time series average formula: Among them, m is the momentum hyperparameter. It should be noted that, and They are the same concept and both represent the mean network model. Different symbols are used here to distinguish the mean network model before and after the update.

[0075] S140: Iterate S120 and S130 until the person re-identification network model converges.

[0076] Specifically, perform model iteration according to step 9.

[0077] Step 9: Iterate steps 2 to 8 until the model converges.

[0078] Figure 2The figure shows a flowchart of the training method for a person re-identification network model. Pedestrian images are acquired and identified using different IDs. Positive samples with pose constraints and random clothing transformations are performed based on the pedestrian images. A convolutional network model is then used to obtain anchor samples and positive samples. Based on the pedestrian images, random clothing transformations, and convolutionally encoded data, a mean network model is used to update features into a feature memory. Comparative learning is performed using the data in the feature memory, anchor samples, and positive samples to calculate the loss function. The person re-identification network model is then updated based on the optimization of the loss function.

[0079] The above scheme is the training step of the pedestrian re-identification network model. After the pedestrian re-identification network model training is completed, it can be put into practical application. Figure 3 A schematic diagram of the steps of a pedestrian re-identification method adapted to clothing changes provided by an embodiment of the present invention. Figure 3 The illustrated method for pedestrian re-identification that adapts to clothing changes can be performed by a pedestrian re-identification device that adapts to clothing changes. The pedestrian re-identification device that adapts to clothing changes can be installed on a server. For example, the server can be a physical server including an independent host, a virtual server hosted by a host cluster, a cloud server, etc., and the embodiments of the present invention are not limited to this. The method for pedestrian re-identification that adapts to clothing changes can include the following steps:

[0080] S310: Obtain a pedestrian image, and re-identify the pedestrian image using a trained pedestrian re-identification network model to determine a recognition result.

[0081] Among them, the trained pedestrian re-identification network model is trained based on the training set, and the training set is a pedestrian image dataset.

[0082] The present invention is further described below using an example of an application scenario for identifying personnel in an airport VIP lounge.

[0083] Take the implementation of person recognition in an airport VIP lounge as an example. Considering that people may take off their coats in the lounge, a pedestrian re-identification algorithm that is robust to clothing changes is required.

[0084] Model training phase:

[0085] 1. Pre-training is performed on a large-scale academic dataset, following the specific steps of the method proposed in this invention.

[0086] 2. Collect a batch of pedestrian data corresponding to the airport VIP lounge scene, use random clothing transformation to construct sample pairs of the same pedestrians changing clothes, and use the contrastive learning method proposed in this paper to fine-tune the model network.

[0087] Testing phase:

[0088] 3. When a passenger enters the lounge, a full-body image of the passenger is recorded. Multiple cameras shoot from different perspectives, continuously capturing several frames to construct a portrait set of the passenger.

[0089] 4. Match the passenger portrait set with the passenger's registration time and other information.

[0090] 5. Collect all the passengers’ portraits and merge them into a portrait library.

[0091] 6. Continue to compare the people in the lounge with the images in the portrait library, and identify them based on the similarity of the features extracted by the model.

[0092] 7. Perform subsequent actions based on the recognition results, such as reminding passengers when they are about to check in.

[0093] 8. Timely carry out the depot operation for passengers who have boarded the plane to avoid misidentification of the images of passengers who have left.

[0094] 9. Repeat steps 3 to 8 to achieve continuous real-time application.

[0095] This paper proposes a clothing-independent and consistent pedestrian feature extraction method based on contrastive learning. By constraining the metrics between sample pairs, the model network focuses on information such as the face, head, exposed parts of the limbs, and body shape. It also proposes a data augmentation method to provide more clothing change sample pairs to promote model learning, effectively improving the accuracy of pedestrian re-identification in clothing change scenarios, with an estimated increase of 15%. The reasons for this improvement are as follows:

[0096] 1. This paper proposes a novel contrastive learning method for re-identification of people who have changed clothing. Compared to existing methods, this method incorporates a pedestrian feature memory to store historical sample information, enabling the model to see more difficult negative samples with similar clothing, thereby better eliminating interference from clothing-related information. Furthermore, pose-based constraints are applied when selecting positive samples, ensuring that pairs of positive samples have consistent features such as recognizable facial and body shapes.

[0097] 2. Data augmentation using random clothing transformations effectively addresses the issue of insufficient training samples for clothing changes. Using a variety of pedestrian image transformation patterns ensures rich and diverse training data. Furthermore, the transformed images have different clothing but the same other identity features, ensuring that each training image can be matched with a corresponding positive example during comparative learning, improving the effectiveness of model learning.

[0098] The above is a pedestrian re-identification method that adapts to clothing changes provided by an embodiment of the present invention. Based on the same inventive idea, an embodiment of the present invention also provides a corresponding pedestrian re-identification device that adapts to clothing changes, such as Figure 4Shown, including:

[0099] A pedestrian re-identification device that adapts to clothing changes, comprising:

[0100] A pedestrian re-identification module 410 is used to obtain a pedestrian image, re-identify the pedestrian image using a trained pedestrian re-identification network model, and determine a recognition result;

[0101] Among them, the trained pedestrian re-identification network model is trained based on the training set, and the training set is a pedestrian image dataset.

[0102] In one embodiment of the present invention, the pedestrian re-identification device that adapts to clothing changes also includes: a pedestrian image preprocessing module 420, which is used to obtain a pedestrian image dataset and preprocess the pedestrian image dataset; an iterative training module 430, which is used to iteratively execute steps A and B until the pedestrian re-identification network model converges; wherein, step A is to extract samples from the preprocessed pedestrian image dataset as training data; step B is to train the pedestrian re-identification network model based on the training data.

[0103] In one embodiment of the present invention, the pedestrian image preprocessing module 420 includes: a pedestrian posture perception submodule 4202, which is used to obtain the corresponding human body key points and human body part segmentation information in each pedestrian image, cluster according to the point coordinates, and obtain posture information; a positive sample screening submodule 4204, which is used to screen positive sample pairs in the pedestrian image dataset according to posture consistency constraints.

[0104] In one embodiment of the present invention, the iterative training module 430 includes: a clothing transformation feature enhancement submodule 4302, which is used to transform the clothing part of the original image based on human body part segmentation information, and generate an image of the same pedestrian in the original image after the clothing is changed, as an enhanced image; the original image is the image before image enhancement; a pedestrian feature convolutional network submodule 4304, which is used to extract the consistent identity features of pedestrians from pedestrian images through a convolutional neural network; a mean network submodule 4306, which is used to update parameters based on the time-series average of the convolutional network model; a contrastive learning submodule 4308, which is used to constrain the convolutional network model to focus on the consistent identity features under clothing changes based on a pair-wise contrastive learning supervision model based on pair-wise combination, by increasing the metric between negative sample pairs whose clothing similarity meets the preset range and reducing the metric between positive sample pairs with different clothing but the same posture; a pedestrian feature memory submodule 4310, which is used to store the consistent identity features of pedestrians generated in the iteration.

[0105] Specifically, this embodiment provides a pedestrian re-identification device for extracting consistent identity features independent of clothing, which consists of a pedestrian posture perception submodule, a positive sample screening submodule, a clothing transformation feature enhancement submodule, a pedestrian feature convolutional network submodule, a mean network submodule, a contrastive learning submodule, and a pedestrian feature memory submodule.

[0106] Pedestrian posture perception submodule: Clustering is performed based on the coordinates of key points of the human body to obtain posture information (front, side, back).

[0107] Positive sample screening submodule: Considering that pedestrian images with clothing changes require consistent postures to learn information such as face and body shape, posture consistency constraints are used to screen positive sample pairs.

[0108] Clothing Transformation Feature Enhancement Submodule: Based on the body part segmentation results, the clothing portion of the original image is transformed to generate images of the same person with different clothing. The goal is to generate richer clothing variations to address data scarcity while ensuring that positive sample pairs with consistent identity features are found during training.

[0109] The pedestrian feature convolutional network submodule uses a convolutional neural network to extract consistent identity features of pedestrians for subsequent feature similarity calculation and pedestrian matching. The goal of feature extraction is to design a model learning method that focuses on identity features unrelated to clothing, such as the face, head shape, hairstyle, body shape, and exposed limbs.

[0110] Mean network submodule: By averaging the time series of conventional convolutional networks instead of updating parameters based on loss function learning, the features extracted by the model are made more stable and used for building a feature memory library.

[0111] Contrastive learning submodule: Based on the pair-wise contrastive learning supervision model, by increasing the metric between negative sample pairs with similar clothing and reducing the metric between positive sample pairs with different clothing but the same posture, the model is constrained to focus on consistent identity features under clothing changes.

[0112] Pedestrian feature memory submodule: The consistent identity features of pedestrians stored in previous iterations enable the network model to perform cross-batch learning and ensure that difficult negative sample pairs with similar clothing are obtained.

[0113] The embodiment of the present invention also provides a corresponding pedestrian re-identification device that adapts to clothing changes, such as Figure 5 Shown, including:

[0114] At least one processor 502 (processor), a communication interface 504 (Communications Interface), a memory 506 (Memory) and a communication bus 508; wherein the processor 502, the communication interface 504, and the memory 506 communicate with each other via the communication bus 508; the processor 502 can call the logic instructions stored in the memory 506 to enable at least one processor 502 to execute the steps of the above embodiments.

[0115] Based on the same idea, some embodiments of the present invention also provide a medium corresponding to the above method.

[0116] Some embodiments of the present invention provide a storage medium storing computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the steps of the above embodiments.

[0117] On the other hand, an embodiment of the present application also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the steps of a pedestrian re-identification method that adapts to clothing changes provided in the above embodiments.

[0118] The various embodiments of the present invention are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device, medium, and program product embodiments are generally similar to the method embodiments, so their descriptions are simplified. For relevant portions, refer to the descriptions of the method embodiments.

[0119] The devices, media, and program products provided in the embodiments of the present invention correspond one-to-one to the methods. Therefore, the devices, media, and program products also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices, media, and program products will not be repeated here.

[0120] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, commodity, or method comprising the element.

[0121] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail above using general descriptions and specific embodiments, it will be apparent to those skilled in the art that modifications or improvements may be made based on the present invention. Therefore, such modifications or improvements made without departing from the spirit of the present invention are intended to fall within the scope of protection claimed in the present invention.

Claims

1. A pedestrian re-identification method that adapts to clothing changes, characterized by: include: Obtain a pedestrian image, and re-identify the pedestrian image using a trained pedestrian re-identification network model to determine a recognition result; The trained person re-identification network model is obtained by training based on a training set, which is a pedestrian image dataset.

2. The pedestrian re-identification method adapting to clothing changes according to claim 1 is characterized in that: Training the person re-identification network model specifically includes: Acquire a pedestrian image dataset, and preprocess the pedestrian image dataset; Step A: extract samples from the preprocessed pedestrian image dataset as training data; Step B: training the person re-identification network model based on the training data; Steps A and B are iteratively performed until the person re-identification network model converges.

3. The pedestrian re-identification method adapting to clothing changes according to claim 2 is characterized in that: The training of the person re-identification network model according to the training data specifically includes: The extracted training data is used as the original image and data is enhanced by random clothing transformation to obtain the uniform pedestrian transformed image as the enhanced image; Inputting the original image and the enhanced image into a person re-identification network model for training; the person re-identification network model includes a convolutional network model and a mean network model; During the training process, determining a contrastive learning loss based on the convolutional network model and the mean network model, and updating the convolutional network model according to the contrastive learning loss; Update the features extracted from the current batch of training data into the pedestrian feature memory library; The mean network model is updated according to the time series average formula.

4. The pedestrian re-identification method adapting to clothing changes according to claim 3 is characterized in that: The extracted training data is used as the original image to perform data augmentation through random clothing transformation, specifically including: The extracted training data is used as the original image; For each of the original images, randomly select one of the multiple data augmentation modes for data augmentation in a uniformly distributed manner; The corresponding data enhancement step is performed according to the randomly selected data enhancement mode to obtain an enhanced image as the enhanced image.

5. The pedestrian re-identification method adapting to clothing changes according to claim 4 is characterized in that: The multiple data enhancement modes include: Block enhancement, inverse enhancement and random change enhancement.

6. The pedestrian re-identification method adapting to clothing changes according to claim 5 is characterized in that: The step of performing corresponding data enhancement according to the randomly selected data enhancement mode specifically includes: If the randomly selected data augmentation mode is block, the clothing part of the input pedestrian image is directly set to black to erase the clothing related information; If the randomly selected data augmentation mode is inverse, the RGB value of the clothing part of the input pedestrian image is inverted; If the randomly selected data augmentation mode is random change, based on the pre-built clothing image template library, a top image and a bottom image are randomly extracted from the clothing image template library, and then the top and bottom of the input pedestrian image are respectively pixel-level sampled and mapped using the images in the corresponding clothing image template library.

7. The pedestrian re-identification method adapting to clothing changes according to claim 3 is characterized in that: Determine the loss for contrastive learning, specifically including: The loss of contrastive learning is determined according to the following formula Among them, f θ (.) represents the convolutional network model; represents the mean network model; τ is the temperature coefficient, which is used to adjust the weights between different negative samples; x a is the anchor point sample, x p is the positive sample in the same batch, x c is the negative sample in the feature memory bank; S a It is the sample set in the feature memory bank that has the same ID as the anchor sample.

8. The pedestrian re-identification method adapting to clothing changes according to claim 3 is characterized in that: Updating the mean network model according to the time series average formula specifically includes: The mean network model is updated according to the following formula: Where m is the momentum hyperparameter, represents the updated mean network model, represents the mean network model before updating, and θ is the convolutional network model.

9. A pedestrian re-identification device that adapts to clothing changes, characterized in that: include: A pedestrian re-identification module is used to obtain pedestrian images, re-identify the pedestrian images using a trained pedestrian re-identification network model, and determine the recognition result; The trained person re-identification network model is obtained by training based on a training set, which is a pedestrian image dataset.

10. The pedestrian re-identification device capable of adapting to clothing changes according to claim 9, characterized in that: Also includes: A pedestrian image preprocessing module is used to obtain a pedestrian image dataset and preprocess the pedestrian image dataset; The iterative training module is used to iteratively execute steps A and B until the pedestrian re-identification network model converges; wherein, Step A: extract samples from the preprocessed pedestrian image dataset as training data; Step B: training the person re-identification network model based on the training data.

11. The pedestrian re-identification device capable of adapting to clothing changes according to claim 10, characterized in that: The pedestrian image preprocessing module includes: The pedestrian posture perception submodule is used to obtain the corresponding human body key points and human body part segmentation information in each pedestrian image, cluster the human body key point coordinates, and obtain posture information; The positive sample screening submodule is used to screen positive sample pairs in the pedestrian image dataset according to the posture consistency constraint.

12. The pedestrian re-identification device adapting to clothing changes according to claim 10, characterized in that: The iterative training module includes: The clothing transformation feature enhancement submodule is used to transform the clothing part of the original image based on the human body part segmentation information, and generate an image of the same pedestrian in the original image after the clothing is changed as an enhanced image; the original image is the image before image enhancement; The pedestrian feature convolutional network submodule is used to extract the consistent identity features of pedestrians from pedestrian images through a convolutional neural network; The mean network submodule is used to update parameters based on the temporal average of the convolutional network model; The contrastive learning submodule is used to supervise the pairwise contrastive learning model. By increasing the metric between negative sample pairs whose clothing similarity falls within a preset range and decreasing the metric between positive sample pairs with different clothing but the same pose, the convolutional network model is constrained to focus on consistent identity features under clothing changes. The pedestrian feature memory submodule is used to store the consistent identity features of pedestrians generated in the iteration.

13. A pedestrian re-identification device that adapts to clothing changes, characterized in that: include: at least one processor; as well as, A memory connected to the at least one processor via a bus; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed to implement the method according to any one of claims 1 to 8.

14. A non-volatile storage medium storing computer-executable instructions, characterized in that: The computer-executable instructions are executed by a processor to implement the method according to any one of claims 1 to 8.