Pedestrian re-identification method and system

Through adaptive segmentation of human body parts and image super-resolution technology, the problem of insufficient utilization of low-quality images in pedestrian re-identification is solved, the recognition accuracy and robustness are improved, and the accuracy of pedestrian re-identification is improved by adapting to changes in different postures and viewing angles. .

CN118609055APending Publication Date: 2024-09-06SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410784363.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Low-quality images in existing pedestrian re-identification methods cannot be effectively utilized, resulting in low accuracy and poor robustness, and the inability to fully mine local information about pedestrians, resulting in low recognition accuracy.

Method used

Using methods based on adaptive segmentation of human body parts and image super-resolution, high and low quality images are screened through the image quality evaluation network, and global and local features are extracted using key point detection and dual local collaborative feature extraction networks, and then identified after fusion.

Benefits of technology

It improves the accuracy and robustness of pedestrian re-identification, can better adapt to changes in different postures and viewing angles, fully utilizes local detail information of high-quality images, and improves the quality of low-quality images through knowledge distillation technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609055A
    Figure CN118609055A
Patent Text Reader

Abstract

The invention belongs to the technical field of pedestrian re-identification, particularly relates to a pedestrian re-identification method and system, and aims to perform quality evaluation on pedestrian images based on preset conditions and screen out high-quality and low-quality images. For a high-quality image, an advanced key point detection technology is applied, key points of a pedestrian body are accurately positioned, and the pedestrian is adaptively segmented into a plurality of parts according to the key points, so that subsequent finer feature extraction and recognition are facilitated. And for the low-quality image, the quality of the low-quality image is improved through an image super-resolution technology based on knowledge distillation, and then the same processing step as that of the high-quality image is carried out. According to the method, the pedestrians in the monitoring video are efficiently identified, the information utilization is improved through image quality improvement and part self-adaptive segmentation, redundant low-quality pictures are utilized, local information of each pedestrian image is fully utilized, and the identification accuracy and robustness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of pedestrian re-identification, and specifically relates to a pedestrian re-identification method and system, and more particularly to a pedestrian re-identification method and system based on adaptive human body part segmentation and image super-resolution. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Pedestrian re-identification refers to the use of computer vision technology to continuously track and identify pedestrians in surveillance videos across cameras and time. Its principle is based on feature extraction and matching. By extracting features such as pedestrians' body shape and clothing, pedestrian identities can be associated between different cameras. It plays an important role in the fields of intelligent transportation, security monitoring, and smart factories, helping to improve urban management efficiency and ensure public safety.

[0004] With the continuous development of deep learning and computer vision technology, pedestrian re-identification has also made certain improvements in accuracy and efficiency with the help of technologies such as multi-scale feature fusion and cross-modal matching.

[0005] According to the inventors' understanding, the commonly used methods do not use convolutional neural networks or Transformer models to adopt supervised training to obtain a model with the ability to extract discriminative features for pedestrian re-identification. The performance of supervised pedestrian re-identification depends on the quality of the data. However, the number of high-resolution pedestrian images currently used for pedestrian re-identification is limited. There are problems such as low image resolution, occlusion, and high similarity during the training process. In addition, the model extracts global features of the entire image. The loss of local information will cause the global features to fail and the local information of pedestrians cannot be fully utilized. As a result, the existing pedestrian re-identification systems are generally low in accuracy and prone to overfitting, making them difficult to apply to real-world scenarios.

[0006] In order to solve the problem of limited high-quality images, the general method is to manually screen massive images or use machine annotation to expand the data set. However, manual screening and annotation are costly and inefficient, while machine annotation has poor accuracy and cannot fully utilize the huge low-quality pedestrian image resources.

[0007] In order to solve the problem of being unable to utilize local information of pedestrians, pedestrian images are generally divided into several parts. However, this method still cannot fully connect the various parts of the pedestrians, resulting in insufficient mining of pedestrian information and limited recognition in complex scenes.

[0008] In summary, since low-quality pedestrian images cannot be effectively utilized in existing pedestrian re-identification methods, the local information of pedestrians cannot be fully mined, resulting in low accuracy and poor robustness of pedestrian re-identification. Summary of the invention

[0009] In order to solve the above problems, the present invention proposes a pedestrian re-identification method and system, which can make full use of local detail information in high-quality images and optimize the quality of low-quality images, thereby improving the accuracy and robustness of pedestrian re-identification.

[0010] According to some embodiments, the present invention adopts the following technical solutions:

[0011] A pedestrian re-identification method comprises the following steps:

[0012] Acquire surveillance video, and extract video images from the surveillance video;

[0013] Perform pedestrian detection on the video image to obtain a pedestrian detection frame image;

[0014] Track the target trajectory of pedestrians in the pedestrian detection frame image to obtain a continuous image sequence of the target pedestrian;

[0015] Performing image quality evaluation on the image sequence, and based on the quality evaluation result, dividing the image sequence into first quality images and second quality images, wherein the image quality of the first quality images is higher than the image quality of the second quality images;

[0016] performing image super-resolution processing on the second quality image;

[0017] Performing human body key point detection on the first quality image and the processed second quality image to obtain a human body key point detection result;

[0018] Based on the human key point detection results, part adaptive segmentation is performed, global features and local features are extracted, and the two parts of features are fused to obtain the final pedestrian re-identification result.

[0019] As an optional implementation, the specific process of performing pedestrian detection on a video image and obtaining a pedestrian detection frame image includes: performing pedestrian detection on a video image using a target detection algorithm to obtain a number of pedestrian detection frames, each of which contains the position, category and confidence score of the target pedestrian.

[0020] As an optional implementation, the specific process of tracking the pedestrian target trajectory of the pedestrian detection frame image includes: using a multi-target tracking algorithm to track multiple pedestrians in the surveillance video and save their trajectories and identity information; and during the tracking process, the detected pedestrian detection frame image is classified into a first confidence level and a second confidence level, the confidence level of the first confidence level is higher than the second confidence level. When matching the pedestrian detection frame image, the pedestrian detection frame image of the first confidence level is first matched with the existing trajectory. If the match fails, a second match is performed using the second confidence level.

[0021] As a further step, when using a multi-target tracking algorithm to track multiple pedestrians in a surveillance video, the position of the tracking trajectory of the current frame in the next frame is predicted by Gaussian mixture model filtering, and the Hungarian algorithm is used to find the optimal match to track the images of each pedestrian in the complete video.

[0022] As an optional implementation, the specific process of performing image quality evaluation on the image sequence includes:

[0023] An image quality evaluation network is used to evaluate the quality of the screened full-body pedestrian detection frame images, obtain the quality score of each screened pedestrian detection frame image, and set a score threshold. According to the comparison result between the quality score and the threshold, the first quality image and the second quality image are divided.

[0024] As a further implementation, the image quality assessment network includes a pedestrian feature extraction network and a quality regression prediction module, wherein:

[0025] The pedestrian feature extraction network includes a residual neural network, a convolutional block attention module and a multi-layer perceptron network, wherein the residual neural network is used to extract feature maps, the convolutional block attention module is used to generate a one-dimensional channel attention feature map and a two-dimensional spatial attention feature map based on the extracted feature maps, and the multi-layer perceptron network is used to learn channel attention weights for the two attention feature maps, and then perform aggregation weighting and channel attention weight constraints;

[0026] The quality regression prediction module includes two fully connected layers. A BN normalization layer and a ReLU activation function layer are connected after the first fully connected layer, and the output is connected to the second fully connected layer. A Sigmoid activation function is set after the second fully connected layer.

[0027] As an optional implementation manner, the specific process of performing image super-resolution processing on the second quality image includes performing image super-resolution processing on the second quality image using an image super-resolution algorithm based on knowledge distillation;

[0028] The image super-resolution algorithm based on knowledge distillation includes a teacher network and a student network, and the teacher network and the student network are pre-trained with knowledge distillation, and the loss function of the knowledge distillation training includes perceptual loss, adversarial loss and feature matching loss, and the weights of the three losses are adjustable.

[0029] As an optional implementation, the specific process of performing human key point detection on the first quality image and the processed second quality image includes: selecting the left shoulder, right shoulder, left hip, right hip, left knee, right knee, left ankle and right ankle as important key points for image segmentation, and setting the key point visibility parameters according to the prediction score threshold of the important key points, calculating the visibility of each important key point, and locating the head, chest, waist, thigh, calf and foot in the pedestrian image.

[0030] As an optional implementation, the process of performing adaptive segmentation based on the key point detection results of the human body and extracting global features includes:

[0031] The global feature extraction network is used to introduce perceptual global spatial attention, stack the node features themselves and the pairwise relationships between nodes to capture the attention weights of the feature nodes, and obtain global features with global structural information and local appearance information based on attention weighting. The global features of pedestrians are obtained by average pooling.

[0032] As an optional implementation, the process of performing adaptive segmentation based on the human body key point detection results and extracting local features includes: using a dual local collaborative feature extraction network to obtain and fuse local features with spatial information and semantic information from the image level and feature level respectively to assist the global feature in representation learning;

[0033] The dual local collaborative feature extraction network includes two parallel branches, the first branch is a component-associated dual local collaborative feature extraction network, which extracts independent component features from the image level and performs feature-level segmentation on the global features according to the key point detection results;

[0034] The second branch is the component association module. For each component, its relationship aggregation matrix is ​​calculated in turn, and a convolution operation is performed on each component and the relationship aggregation matrix to strengthen the feature representation of each component, obtain the corresponding features, and merge the two to obtain the component association features of each component feature.

[0035] A pedestrian re-identification system, comprising:

[0036] The video preprocessing module is configured to obtain the surveillance video and extract the video image from the surveillance video;

[0037] A pedestrian detection module is configured to perform pedestrian detection on the video image to obtain a pedestrian detection frame image;

[0038] A pedestrian target trajectory tracking module is configured to track the pedestrian target trajectory on the pedestrian detection frame image to obtain a continuous image sequence of the target pedestrian;

[0039] an image quality evaluation module, configured to perform image quality evaluation on the image sequence, and based on the quality evaluation result, divide the image sequence into first quality images and second quality images, wherein the image quality of the first quality images is higher than the image quality of the second quality images;

[0040] An image super-resolution processing module, configured to perform image super-resolution processing on the second quality image;

[0041] A human key point detection module is configured to perform human key point detection on the first quality image and the processed second quality image to obtain a human key point detection result;

[0042] The part-adaptive segmentation and feature extraction module is configured to perform part-adaptive segmentation based on the human key point detection results, extract global features and local features, and fuse the two parts of features to obtain the final pedestrian re-identification results.

[0043] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps in the above method are completed.

[0044] An electronic device comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the above method are completed.

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

[0046] Compared with the prior art, the present invention can apply advanced key point detection technology on high-quality images, accurately locate the key points of pedestrians' bodies, and perform adaptive segmentation accordingly. This adaptive segmentation can segment pedestrian images into multiple parts, fully utilize local detail information, and provide richer data support for subsequent feature extraction and recognition. Compared with the traditional pedestrian part ratio fixed segmentation method, the adaptive segmentation of the present invention can better adapt to the changes in different pedestrian postures and perspectives, thereby improving the accuracy and robustness of pedestrian re-identification.

[0047] Compared with the prior art, the present invention improves the quality of low-quality images through image super-resolution technology based on knowledge distillation. Traditional super-resolution methods often require a large amount of training data and computing resources, and have limited processing effects on low-quality images. The present invention uses the idea of ​​knowledge distillation to effectively enhance the texture details of low-quality images under the guidance of high-quality images, thereby improving the accuracy of the pedestrian re-identification method. This super-resolution network based on knowledge distillation not only has better image enhancement effects, but also can save computing resources and training time, bringing a more efficient and economical solution to the field of pedestrian image processing.

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding 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 improper limitations on the present invention.

[0050] Figure 1 A schematic diagram of the overall flow of a method disclosed in an embodiment;

[0051] Figure 2 A schematic diagram of an image quality assessment network disclosed in an embodiment;

[0052] Figure 3 A schematic diagram of a process of image super-resolution based on knowledge distillation disclosed in an embodiment;

[0053] Figure 4 A schematic diagram of a part visibility calculation process disclosed in an embodiment;

[0054] Figure 5 A schematic diagram of a part-association polymerization process disclosed in an embodiment;

[0055] Figure 6 A schematic diagram of a dual local collaborative feature extraction network disclosed in an embodiment. DETAILED DESCRIPTION

[0056] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0057] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0058] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0059] In the absence of conflict, the embodiments in this application and the features in the embodiments may be combined with each other.

[0060] In order to make the solutions of each embodiment clearer, the following glossary is first explained:

[0061] Terminology explanation:

[0062] 1. Person re-identification: A computer vision technique used to identify and track the same person in different video frames or scenes and perform identity matching.

[0063] 2. Image quality evaluation: Image quality evaluation refers to the process of objectively or subjectively evaluating the clarity, contrast, color accuracy, etc. of an image. Its purpose is to determine whether the image meets specific requirements or standards.

[0064] 3. Key point detection: Key point detection is a technology in computer vision that is used to identify and locate points with significant properties or features in images or videos. These points are unique and stable in the image and can be used to identify, track and match objects.

[0065] 4. Global average pooling: Slide the convolution window over the entire feature map and take the average of all values ​​in the window.

[0066] 5. Image super-resolution: Image super-resolution is an image processing technology that aims to improve and enhance low-resolution images by increasing the number of pixels or improving the pixel quality. This technology can improve the clarity and quality of images while maintaining the clarity of details.

[0067] 6. Knowledge distillation: Knowledge distillation is a machine learning technique that aims to improve the performance of a student model by extracting knowledge from a complex model (teacher model) and then passing it to a simplified model (student model). This method guides the training of the student model by using the prediction results and probability distribution of the teacher model, thereby improving the generalization ability and efficiency of the student model.

[0068] Embodiment 1

[0069] In this embodiment, a pedestrian re-identification method based on adaptive human body part segmentation and image super-resolution is disclosed. The pedestrian image quality is evaluated based on preset conditions to screen out high-quality and low-quality images. For high-quality images, advanced key point detection technology is applied to accurately locate the key points of the pedestrian's body, and the pedestrian is adaptively segmented into multiple parts based on this, so as to perform more refined feature extraction and recognition later.

[0070] For low-quality images, the quality is first improved through image super-resolution technology based on knowledge distillation, and then the same processing steps as high-quality images are performed. This method can make full use of the local detail information in high-quality images while optimizing the quality of low-quality images, thereby improving the accuracy and robustness of pedestrian re-identification.

[0071] like Figure 1 As shown, specifically including:

[0072] S1: Acquire surveillance video and extract video images from the surveillance video.

[0073] Obtain the main stream video data from the monitoring system, including accessing the video files stored in the monitoring server or cloud storage, or streaming the video in real time over the network. Obtain the video sequence v and the video frame v t .

[0074] S2: Perform pedestrian detection on the video image to obtain a pedestrian detection frame (hereinafter referred to as a pedestrian frame) image;

[0075] In this embodiment, the YOLOv8 algorithm is used to detect pedestrians in the input video sequence v. Specifically, the video frame v t The input is processed by the YOLOv8 algorithm. The output is a detection box, each of which contains the location, category, and confidence score of the target.

[0076] Of course, in other embodiments, other detection algorithm models may be used to process video images, such as Fast R-CNN, YOLOv7 algorithm, etc., which are not exhaustively listed here.

[0077] S3: Tracking the pedestrian target trajectory based on the pedestrian frame image to obtain a continuous image sequence of the pedestrian;

[0078] In this embodiment, a multi-target tracking algorithm is used to track multiple pedestrians in the surveillance video, and their trajectories and identity information are saved. During the tracking process, in order to optimize the identity confusion problem, the detected pedestrian frames are first classified into two categories: high confidence and low confidence. When processing, the high-confidence pedestrian frame is first tried to match with the existing trajectory. If the match fails, a low-confidence frame will be used to try a second match to ensure the accuracy and consistency of the tracking as much as possible.

[0079] In this embodiment, the classification of high confidence and low confidence can be distinguished by setting a threshold. For example, when the confidence is higher than the set threshold, it is considered to be high confidence, otherwise it is considered to be low confidence.

[0080] In this embodiment, when tracking a target, the position of the tracking trajectory of the current frame in the next frame is predicted by Gaussian mixture model filtering, and then the Hungarian algorithm is used to find the optimal match to track each pedestrian image in the complete video.

[0081] Gaussian mixture model filtering is a nonparametric Bayesian filtering method for state estimation. It handles nonlinear and non-Gaussian distribution situations by modeling the probability density function of the system state as a mixture of multiple Gaussian distributions. The principle, formula and parameters of Gaussian mixture model filtering are as follows:

[0082] The core idea is to assume that the state of the system is an unknown random variable whose probability distribution can be represented by a linear combination of multiple Gaussian distributions. Each Gaussian distribution represents a "mode", and the mixing coefficient represents the weight of each mode. By mixing multiple Gaussian distributions on the state, it can be more flexible to adapt to various types of distributions, including nonlinear and non-Gaussian distributions.

[0083] Assuming that the state vector of the system is x and the observation vector is z, the update step of the Gaussian mixture model filter includes two main processes: prediction and update.

[0084] System status The time series prediction of is given by the following formula:

[0085] Prediction formula:

[0086]

[0087] Where f is the state transition function of the system, u k is the control input, w k is the Gaussian distribution of the system process noise, which is usually assumed to be zero-mean Gaussian noise.

[0088] Update steps:

[0089] The update step uses the observation z k Correct the status:

[0090]

[0091] Among them, H is the observation matrix, K k is the Kalman gain, calculated as:

[0092] K k =P k HT (HP k H T +R) -1 ;

[0093] Among them, P k is the covariance matrix of the state estimate, and R is the covariance matrix of the observation noise.

[0094] By using the Gaussian mixture model to model the uncertainty of the system state, nonlinear and non-Gaussian distribution situations can be handled more flexibly, thereby improving the accuracy and robustness of state estimation.

[0095] Based on the video frame v obtained by S1 t , each video frame v t Input the multi-target tracking algorithm for target tracking and identity calibration, and crop the image to obtain the frame image x of each pedestrian. i . And each individual pedestrian image x has been i and identity label y i The combination is constructed into a retrieval library, from which the data set required for the pedestrian re-identification algorithm can be obtained, so that the pedestrian re-identification method can perform individual identification and matching in an efficient and accurate manner.

[0096] S4: Evaluate the image quality of the acquired pedestrian frame image and select high-quality images and low-quality images.

[0097] In this embodiment, the quality of each screened full-body pedestrian frame image is evaluated through an image quality evaluation network, a quality score of each screened pedestrian frame image is obtained, and a score threshold is set to distinguish high-quality pedestrian images from low-quality pedestrian images according to the quality score and the threshold.

[0098] When the quality score is higher than the threshold, it is a high-quality pedestrian image, otherwise it is a low-quality pedestrian image.

[0099] Image quality assessment network Figure 2 As shown, it includes a pedestrian feature extraction backbone network, a quality regression prediction module and a loss function module.

[0100] S41: The backbone network for pedestrian feature extraction uses a residual neural network. In the field of pedestrian re-identification, this network is often used as a backbone network for pedestrian feature extraction, and can extract rich details and abstract features from pedestrian images. In order to further improve the feature expression ability of the model, the present invention adds a lightweight convolutional block attention module CBAM after the last convolutional layer of the residual neural network. The convolutional block attention module mainly consists of two parts:

[0101] 1. Channel attention: This module calculates the importance weight of each channel to dynamically adjust the weight of the channel feature map. This allows the network to focus on feature channels that are more important for a specific task, thereby improving the network's ability to perceive important features.

[0102] 2. Spatial attention: This module also dynamically adjusts the spatial distribution of the feature map by calculating the importance weight of each spatial position. This helps the network to be more flexible in processing features at different positions, thereby improving the network's ability to locate and segment targets.

[0103] Take the original image x i As input, the original feature map is obtained through the pedestrian feature extraction backbone network, and the original feature map is represented as Through the above CBAM module, a one-dimensional channel attention feature map is generated and a two-dimensional spatial attention feature map The overall process is as follows: represents matrix multiplication, and F′ and F″ represent the output feature maps in two dimensions respectively.

[0104]

[0105] Next, the two feature maps F′ and F″ are input into the multi-layer perceptron network to learn the channel attention weights to emphasize the important channels in the feature maps and suppress the unimportant channels. The feature maps processed by the multi-layer perceptron network are aggregated and weighted, and the channel attention weights are constrained between 0 and 1 using the Sigmoid activation function. The following formula is the generation process of channel attention:

[0106] M c (F)=σ(MLP(AνgPool(F))+MLP(MaxPool(F)));

[0107] Where F is the input feature map, AvgPool is the global average pooling, MaxPool is the global maximum pooling, MLP is a multi-layer perceptron, which usually contains two fully connected layers. It maps the pooling result to a new space to calculate the attention weight. σ is the Sigmoid activation function.

[0108] Similarly, the generation process of spatial attention can be expressed as follows:

[0109] M s (F′)=σ(f 7×7 ([AνgPool(F′); MaxPool(F′)]));

[0110] where f 7×7is a 7×7 convolution kernel, which is used to perform convolution operation on the concatenated feature map to extract spatial attention information. Other parameters are the same as above.

[0111] S42: This method adds a quality regression prediction module to the pedestrian re-identification network, and the input is the original pedestrian image x i , the pedestrian feature representation can be obtained through the pedestrian feature extraction backbone network The output is the predicted value s of the dual quality representation. The key layers are two fully connected layers, which mainly realize the mapping of quality scores. The BN normalization layer and the ReLU activation function layer are connected after the first fully connected layer, and the output is connected to the second fully connected layer. Then, the Sigmoid activation function is used to map the quality score to between 0 and 1. Through a certain amount of iterative training and combined with the backbone network for pedestrian feature extraction, this module can realize the quality assessment of any input pedestrian image.

[0112] S43: The loss function of the quality regression prediction module is designed as follows:

[0113]

[0114] Among them, QS i Denotes the quality characterization score, QP i represents the quality score output by the quality regression prediction module, and δ is a hyperparameter that controls where the loss function changes.

[0115] S5: Improve the image quality of low-quality images using a knowledge distillation-based image super-resolution algorithm.

[0116] In surveillance videos, continuous video frames often contain different images of the same person, some of which are clear and some are blurry. In this case, the clear image can be used as the high-resolution image and the blurry image as the low-resolution image. The image quality can be improved by using the image super-resolution technology based on knowledge distillation. The image super-resolution algorithm based on knowledge distillation is as follows: Figure 3 As shown in the figure, it is mainly divided into teacher network selection, student network design, knowledge distillation training and model evaluation and optimization.

[0117] S51: In this embodiment, a diffusion model is selected as the teacher network. The diffusion model is a generative model that converts an image into pure noise by gradually adding noise, and then gradually removes the noise to reconstruct the image. The model has the ability to gradually refine the image and can generate high-quality, detailed images. It is widely used in tasks such as image generation and super-resolution. Its stable training process and strong robustness enable it to perform well in complex image generation. The forward diffusion process of the diffusion model can be understood as a Markov chain, which adds Gaussian noise to a real picture until it eventually becomes a pure noise picture. The formula is as follows:

[0118]

[0119] where x t represents the data at time step t, x t-1 represents the data at time step t-1, N represents the normal distribution, Indicates that from x t-1 to x t The coefficient of the linear transformation controls the amount of noise added, β t represents the noise intensity at time step t, which usually determines the degree of noise addition. I represents the identity matrix, which means that the covariance matrix of the noise is isotropic, that is, the variance of the noise is the same in all directions.

[0120]

[0121] Where x0 represents the initial data, that is, the data at time step 0, represents the cumulative noise scheduling parameter, Represents the coefficient of the linear transformation from the initial data x0 to time step t, indicating the proportion of the original data components retained.

[0122]

[0123] The parameters are the same as described above, and the reverse process is to gradually sample the real image from the pure noise image.

[0124] The diffusion model training process is relatively stable and is not susceptible to mode collapse and gradient vanishing problems. For image super-resolution tasks, this stability helps generate high-quality, high-resolution images. It can also capture image features at different scales, from low-level edges and textures to high-level semantic information. This multi-scale feature capture capability is crucial for image super-resolution tasks, helping the model reconstruct various details of the image.

[0125] ESRGAN is selected as the student network to perform image super-resolution on low-quality pedestrian images in surveillance videos. ESRGAN is an advanced generative adversarial network for image super-resolution tasks. It is improved on the basis of SRGAN, and by using adversarial loss and perceptual loss, the generated high-resolution images are richer in details and visually closer to real images.

[0126] S52: In this example, in the knowledge distillation training, the diffusion model that has been pre-trained in the super-resolution task is used as the teacher network, the data set uses the public data set, the pre-trained ESRGAN is used as the student network, and the data set uses the low-resolution image x of the same person in the surveillance video. LR and high resolution images x HRas sample pairs. The loss function designs include perceptual loss, adversarial loss and feature matching loss.

[0127] The perceptual loss makes the images generated by ESRGAN perceptually close to those generated by the diffusion model. This can be calculated using the intermediate layer features of the VGG network:

[0128] L perceptual =|φ VGG (G(x LR ))-φ VGG (x HR )|| 2 ;

[0129] where φ VGG represents the feature extraction function of the VGG network, G(x LR ) is a high-resolution image generated by ESRGAN, x HR is a high-resolution reference image.

[0130] The feature loss makes the intermediate layer features of ESRGAN match those of the diffusion model:

[0131]

[0132] where φ diffusion Represents the feature extraction function of the i-th layer of the diffusion model. Other parameters are the same as above.

[0133] The adversarial loss uses the discriminator to improve the authenticity of the generated images, maintaining the GAN structure of ESRGAN:

[0134] L GAN =logD(x HR )+log(1-D(G(x LR )));

[0135] Among them, D is the discriminator function, and other parameters are the same as above.

[0136] The overall loss is:

[0137] L total =λ perceptual L perceptual +λ feature L feature +λ GAN L GAN ;

[0138] where λ perceptual , feature and λ GAN are the weights of the above three loss functions, which need to be adjusted according to the actual task.

[0139] Through knowledge distillation, ESRGAN can learn more details and texture information from the diffusion model to generate more realistic and realistic high-resolution images. This combination not only improves image quality, but also enhances the robustness and adaptability of the network, achieving better pedestrian re-identification performance.

[0140] S6: Apply the human key point detection algorithm to the screened high-quality images and the super-resolved low-quality images, and calculate the visibility.

[0141] In this example, the HRNet network is used for key point prediction, and seventeen key points can be obtained, including the nose, left eye, right ear, etc. However, when the key points are not visible or there are estimation errors, positioning deviations will occur. Therefore, the left shoulder, right shoulder, left hip, right hip, left knee, right knee, left ankle and right ankle with strong stability are selected as important key points for image segmentation, and the key point visibility parameters are set to solve the problem of disappearance of parts. The visibility parameter v is assigned to the important key points according to the score threshold, and v is in binary form. Taking the ankle as an example, if the left ankle or the right ankle can be predicted, v=1 is defined, otherwise v=0 is defined. Set the score threshold a=0.7 of the key point, assuming that the prediction scores of the left ankle and the right ankle are S l and S r , then the ankle visibility is calculated as follows:

[0142]

[0143] Based on the above calculation method, the visibility of four important key parts, namely shoulder, hip, knee and ankle, can be calculated. Based on the four key points of shoulder, hip, knee and ankle, the pedestrian image can be adaptively divided into six component areas, namely head, chest, waist, thigh, calf and foot.

[0144] Calculate the position and visibility of the center point of the upper body based on the shoulders and hips. Assume that the data representation of the shoulders and hips are (x s ,y s ,s s ,ν s ) and (x p ,y p ,s p ,ν p ), coordinate y of the center point of the upper body uc and visibility ν uc As follows:

[0145] y uc =(y s +y p ) / 2;

[0146] ν uc =v s & p ;

[0147] Select shoulder to position head area B h and head visibility ν h Assuming that the size of the pedestrian image is H×W, the above indicators are calculated as follows:

[0148] B h =[(0,y h ),(W,y s )];

[0149] ν h =v s & y ;

[0150]

[0151] y h =max(0,y s -H*0.25);

[0152] Position the chest area B based on the center point of the shoulder and upper body c and chest visibility c , based on the center point of the upper body and the hips, locate the waist area B w and chest visibility w , locate the thigh area B based on the hip and knee t And thigh visibility ν t . Assume that the knee data is represented by (x k ,y k ,s k ,v k ),

[0153] B c =[(0,y s ),(W,y uc )];

[0154] ν c =v uc ;

[0155] B w =[(0,y uc ),(W,y p )];

[0156] ν w =v uc ;

[0157] B t =[(0,y p ),(W,y k )];

[0158] ν t =v p &k ;

[0159] Positioning the calf region B based on the knee and ankle l and visibility l , because there is often information missing in the ankle area of ​​pedestrian images, we discuss each case separately. The ankle data is represented by (x a ,y a ,s a ,v a ), B l and ν l The calculation formula is as follows:

[0160]

[0161] y=min(H,y k +H*0.25);

[0162]

[0163] Based on the ankle positioning foot area BF and foot visibility VF, the calculation formula is as follows:

[0164] B f =[(0,y a -y),(W,y a +y)];

[0165] y = 0.5*H / 6;

[0166] ν f =v a ;

[0167] The calculation flow chart of visibility is as follows: Figure 4 As shown in the figure, different key point confidences are calculated according to the formula of each part, and the visibility of the part is judged according to the confidence. If the condition is met, the part is visible and the visibility is 1; if the condition is not met, the part is invisible and the visibility is 0. Because the features of the visible single part and other parts need to be fused in step 7. If the image quality of a part is poor and does not meet the visibility, that is, the visibility is 0, it will interfere with the feature fusion of the part and reduce the quality of the feature fusion. Therefore, the part with visibility of 0 will not participate in the calculation of the subsequent part association module.

[0168] Based on the calculation derivation of the above formula, six body parts of the head, chest, waist, thigh, calf and foot in the pedestrian image can be located. The above method can well adapt to the changes in the posture of pedestrians and provide more detailed part area information.

[0169] S7: Perform part-adaptive segmentation on the results of the human key point detection algorithm, extract features from the overall image and the segmented pedestrian local image, calculate global features and local features, and obtain the final result after weighting.

[0170] The local features obtained by the above algorithm retain the spatial structural information of body parts, but ignore the global semantic information of the parts and the relationship between body parts, which makes it difficult to accurately distinguish different body parts with similar features during the recognition process.

[0171] Based on the above problems, this embodiment adopts a component-associated dual local collaborative feature extraction network to mine the discriminative global features and discriminative local features of a single pedestrian image. The network extracts independent component features from the image level. This component feature only contains the component's own features, eliminates the interference of irrelevant information, and retains the spatial information of each part of the human body. The global features are segmented at the feature level according to the key point detection results, and the component association module (PFA) is introduced to fuse the features of the visible single part and other parts. This local feature organically combines the local features of each part with the global semantic information, and retains the body context information. In order to fully utilize the advantages of the two strategies, a component-associated dual local collaborative feature extraction network is constructed through the above two parallel branches, and local features with spatial information and semantic information are obtained and fused from the image level and feature level respectively to assist the global features in representation learning.

[0172] Component association modules such as Figure 5 As shown, for each component p i , calculate the relationship aggregation matrix r in turn i , that is, remove the specific component p i The information of other body parts is integrated. Then for each p i and r i Perform convolution operations to strengthen the feature representation of each component and obtain the feature and Features Combine the two and output the component-associated feature q of each component feature. i , generating more discriminative and informative component association features.

[0173] The component-related dual local collaborative feature extraction network is divided into three key parts: global discriminant feature extraction, dual local collaborative feature extraction, and component-related fusion. Specifically, the global feature extraction network introduces perceptual global spatial attention in the backbone network, stacks the node features and the pairwise relationships between nodes to capture the attention weights of feature nodes, and obtains global features with global structural information and local appearance information based on attention weighting, and then obtains pedestrian global features through average pooling, such as Figure 6 shown.

[0174] The dual local collaborative feature extraction network locates the four important key points of the pedestrian's shoulder, hip, knee and ankle through the key point detection network. Then, based on the original feature extraction network ResNet50, six body part features with spatial information are extracted from both image and feature aspects. and six body part features with semantic information Will and Perform the sum operation to obtain the fused body part features The component features It aggregates spatial structure information and global semantic information, but does not consider the relationships between components.

[0175] The PFA module is introduced to use the relationship between body parts to introduce the spatial structure information of the parts, so that the features at the level of a single part contain both the part itself and the information of other body parts, thereby achieving the discriminative representation of the local features of pedestrians and improving the discrimination of the features of the parts. Based on the above process, the discriminative global features and discriminative local features of similar pedestrians can be accurately obtained.

[0176] Embodiment 2

[0177] A pedestrian re-identification system, comprising:

[0178] The video preprocessing module is configured to obtain the surveillance video and extract the video image from the surveillance video;

[0179] A pedestrian detection module is configured to perform pedestrian detection on the video image to obtain a pedestrian detection frame image;

[0180] A pedestrian target trajectory tracking module is configured to track the pedestrian target trajectory on the pedestrian detection frame image to obtain a continuous image sequence of the target pedestrian;

[0181] an image quality evaluation module, configured to perform image quality evaluation on the image sequence, and based on the quality evaluation result, divide the image sequence into first quality images and second quality images, wherein the image quality of the first quality images is higher than the image quality of the second quality images;

[0182] An image super-resolution processing module, configured to perform image super-resolution processing on the second quality image;

[0183] A human key point detection module is configured to perform human key point detection on the first quality image and the processed second quality image to obtain a human key point detection result;

[0184] The part-adaptive segmentation and feature extraction module is configured to perform part-adaptive segmentation based on the human key point detection results, extract global features and local features, and fuse the two parts of features to obtain the final pedestrian re-identification results.

[0185] Embodiment 3

[0186] A computer-readable storage medium is used to store computer instructions. When the computer instructions are executed by a processor, the steps in the method provided in embodiment 1 are completed.

[0187] Embodiment 4

[0188] An electronic device includes a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the method provided in the first embodiment are completed.

[0189] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0190] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0191] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0192] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0193] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the present invention without creative labor shall be included in the protection scope of the present invention.

Claims

1. A pedestrian re-identification method, characterized in that: The following steps are involved: Acquire surveillance video, and extract video images from the surveillance video; Perform pedestrian detection on the video image to obtain a pedestrian detection frame image; Track the target trajectory of pedestrians in the pedestrian detection frame image to obtain a continuous image sequence of the target pedestrian; Performing image quality evaluation on the image sequence, and based on the quality evaluation result, dividing the image sequence into first quality images and second quality images, wherein the image quality of the first quality images is higher than the image quality of the second quality images; performing image super-resolution processing on the second quality image; Performing human body key point detection on the first quality image and the processed second quality image to obtain a human body key point detection result; Based on the human key point detection results, part adaptive segmentation is performed, global features and local features are extracted, and the two parts of features are fused to obtain the final pedestrian re-identification result.

2. A pedestrian re-identification method as claimed in claim 1, characterized in that: The specific process of performing pedestrian detection on a video image and obtaining a pedestrian detection frame image includes: performing pedestrian detection on a video image using a target detection algorithm to obtain a number of pedestrian detection frames, each of which contains a position, a category and a confidence score of a target pedestrian.

3. A pedestrian re-identification method as claimed in claim 1, characterized in that: The specific process of tracking pedestrian target trajectories of pedestrian detection frame images includes: using a multi-target tracking algorithm to track multiple pedestrians in the surveillance video and save their trajectories and identity information; and in the tracking process, classifying the detected pedestrian detection frame images into a first confidence level and a second confidence level, the confidence level of the first confidence level is higher than the second confidence level. When matching pedestrian detection frame images, first match the pedestrian detection frame images of the first confidence level with the existing trajectory. If the match fails, then use the second confidence level for secondary matching.

4. A pedestrian re-identification method as claimed in claim 3, characterized in that: When using the multi-target tracking algorithm to track multiple pedestrians in the surveillance video, the Gaussian mixture model filter is used to predict the position of the tracking trajectory of the current frame in the next frame, and the Hungarian algorithm is used to find the optimal match to track the pedestrian images in the complete video.

5. The pedestrian re-identification method according to claim 1, characterized in that: The specific process of performing image quality evaluation on the image sequence includes: The pedestrian feature extraction network includes a residual neural network, a convolutional block attention module and a multi-layer perceptron network, wherein the residual neural network is used to extract feature maps, the convolutional block attention module is used to generate a one-dimensional channel attention feature map and a two-dimensional spatial attention feature map based on the extracted feature maps, and the multi-layer perceptron network is used to learn channel attention weights for the two attention feature maps, and then perform aggregation weighting and channel attention weight constraints; The quality regression prediction module includes two fully connected layers. A BN normalization layer and a ReLU activation function layer are connected after the first fully connected layer, and the output is connected to the second fully connected layer. A Sigmoid activation function is set after the second fully connected layer. An image quality evaluation network is used to evaluate the quality of the screened full-body pedestrian detection frame images, obtain the quality score of each screened pedestrian detection frame image, and set a score threshold. According to the comparison result between the quality score and the threshold, the first quality image and the second quality image are divided.

6. A pedestrian re-identification method as claimed in claim 1, characterized in that: The specific process of performing image super-resolution processing on the second quality image includes performing image super-resolution processing on the second quality image using an image super-resolution algorithm based on knowledge distillation; The image super-resolution algorithm based on knowledge distillation includes a teacher network and a student network, and the teacher network and the student network are pre-trained with knowledge distillation, and the loss function of the knowledge distillation training includes perceptual loss, adversarial loss and feature matching loss, and the weights of the three losses are adjustable.

7. The pedestrian re-identification method according to claim 1, characterized in that: The specific process of detecting human key points on the first quality image and the processed second quality image includes: selecting the left shoulder, right shoulder, left hip, right hip, left knee, right knee, left ankle and right ankle as important key points for image segmentation, setting key point visibility parameters according to the prediction score threshold of the important key points, calculating the visibility of each important key point, and locating the head, chest, waist, thigh, calf and foot in the pedestrian image.

8. The pedestrian re-identification method according to claim 1, characterized in that: Based on the human body key point detection results, the process of adaptively segmenting parts and extracting global features includes: The global feature extraction network is used to introduce perceptual global spatial attention, stack the node features themselves and the pairwise relationships between nodes to capture the attention weights of the feature nodes, and obtain global features with global structural information and local appearance information based on attention weighting. The global features of pedestrians are obtained by average pooling.

9. The pedestrian re-identification method according to claim 1, characterized in that: Based on the human body key point detection results, the process of adaptively segmenting parts and extracting local features includes: using a dual local collaborative feature extraction network to obtain and fuse local features with spatial information and semantic information from the image level and feature level respectively to assist in representation learning of global features; The dual local collaborative feature extraction network includes two parallel branches, the first branch is a component-associated dual local collaborative feature extraction network, which extracts independent component features from the image level and performs feature-level segmentation on the global features according to the key point detection results; The second branch is the component association module. For each component, its relationship aggregation matrix is ​​calculated in turn, and a convolution operation is performed on each component and the relationship aggregation matrix to strengthen the feature representation of each component, obtain the corresponding features, and merge the two to obtain the component association features of each component feature.

10. A pedestrian re-identification system, characterized in that: include: The video preprocessing module is configured to obtain the surveillance video and extract the video image from the surveillance video; A pedestrian detection module is configured to perform pedestrian detection on the video image to obtain a pedestrian detection frame image; A pedestrian target trajectory tracking module is configured to track the pedestrian target trajectory on the pedestrian detection frame image to obtain a continuous image sequence of the target pedestrian; an image quality evaluation module, configured to perform image quality evaluation on the image sequence, and based on the quality evaluation result, divide the image sequence into first quality images and second quality images, wherein the image quality of the first quality images is higher than the image quality of the second quality images; An image super-resolution processing module, configured to perform image super-resolution processing on the second quality image; A human key point detection module is configured to perform human key point detection on the first quality image and the processed second quality image to obtain a human key point detection result; The part-adaptive segmentation and feature extraction module is configured to perform part-adaptive segmentation based on the human key point detection results, extract global features and local features, and fuse the two parts of features to obtain the final pedestrian re-identification results.

Citation Information

Patent Citations

  • Pedestrian re-identification method based on transfer learning and deep feature fusion

    CN110163110A

  • Content-adaptive pedestrian re-identification data set generation method and system

    CN116343263A