Single-mode pedestrian re-identification method, device and system based on attribute fusion
By constructing a pedestrian attribute recognition network with weighted allocation and a re-correlation person ranking method, the accuracy and stability issues of single-modal pedestrian re-identification in complex scenarios are solved, improving recognition accuracy and computational efficiency, and making it suitable for practical applications.
Patent Information
- Application Number
- CN202511066907.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-18
AI Technical Summary
Single-modal pedestrian re-identification has limited accuracy in complex scenarios, making it difficult to further improve the system's discrimination ability. Existing research is insufficient in mining deep information, and traditional methods rely only on the distance ranking between features, ignoring the interrelationships between the ranking results, which leads to the need to improve the matching accuracy and stability.
By constructing a pedestrian attribute recognition network with weighted allocation, obtaining the student model through teacher model distillation, and combining pedestrian attribute similarity with student model similarity for multiplicative fusion, a re-related person ranking method is proposed to rearrange the candidate results and improve the ranking accuracy.
It improves the accuracy and stability of single-modal person re-identification, reduces the computational resource requirements, is suitable for practical application scenarios, and enhances the performance and efficiency of the model.
Smart Images

Figure CN120976971A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision, and more specifically, to a single-modal pedestrian re-identification method, apparatus, and system based on attribute fusion. Background Technology
[0002] With the development of technology, Person Re-Identification (ReID) has begun to demonstrate important application value in the fields of intelligent security and video surveillance. Its core objective is to achieve accurate association between different pedestrian targets through cross-camera retrieval.
[0003] In recent years, single-modal person re-identification technology has made significant progress in the fields of deep learning and computer vision. Thanks to continuous innovation in various network architectures (such as ResNet, ViT, etc.) and attention mechanisms, the models have achieved high accuracy in feature extraction and representation structure.
[0004] However, with the continuous expansion of datasets and the increasing complexity of application scenarios, single-modal person re-identification has gradually encountered bottlenecks in terms of recognition accuracy. Simply optimizing the network structure or training strategy is unlikely to further improve the system's discriminative ability. This is because the information that a single-modal network model can capture from a pedestrian image from a single viewpoint is limited, exhibiting certain limitations. Most current ReID research focuses on single-modal or simple cross-modal spatial domain fusion, lacking the ability to mine deeper information.
[0005] Pedestrian attribute recognition (PAR) is also a pedestrian-related task in computer vision. As a task that primarily uses coarse-grained semantics for visual analysis, its main goal is to identify attributes such as gender, age, clothing, and items carried by pedestrians. Although pedestrian attribute recognition differs somewhat from pedestrian re-identification in terms of task objectives and feature focus, they share high similarities in practical applications regarding target detection requirements and feature learning. The biggest difference lies in the fact that unimodal pedestrian re-identification tasks need to capture fine-grained appearance features to achieve accurate differentiation between individuals, while attribute recognition focuses on capturing more global and semantic descriptive information.
[0006] Single-modal person re-identification has limited accuracy in complex scenarios, making it difficult to further improve the system's discrimination ability. Existing research is insufficient in mining deep information, and traditional person re-identification only relies on the distance ranking between features, ignoring the interrelationships between the ranking results, which leads to the need to improve the matching accuracy and stability. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a single-modal pedestrian re-identification method, device and system based on attribute fusion, which improves the accuracy and relevance of retrieval, is applicable to practical application scenarios, reduces the demand for computing resources and hardware requirements, and improves the overall matching accuracy and stability.
[0008] The objective of this invention is achieved through the following solution: A single-modal person re-identification method based on attribute fusion includes: A weighted pedestrian attribute recognition network is constructed to obtain pedestrian attributes from the input image; a teacher model is determined, and a student model is obtained by distillation. The preliminary classification results are obtained by multiplicatively fusing the similarity of pedestrian attributes with the similarity of student models; By constructing a ranking of relevant individuals in the query results, the preliminary candidate classification results are rearranged to obtain the final classification results.
[0009] Furthermore, the pedestrian attribute recognition network with weighted allocation includes a feature extractor, a weight allocation module, and an attribute classifier; the feature extractor extracts global features of the image, the weight allocation module weights the attributes, and the attribute classifier classifies the weighted attributes.
[0010] Furthermore, determining the teacher model includes: comparing the performance, parameter count, memory usage, and inference time metrics of multiple baseline methods under different backbone networks, and determining the method with the best performance as the teacher model.
[0011] Furthermore, the process of obtaining the student model through distillation includes: using the ResNet-101-IBN model under the SBS baseline method as the teacher model and the smaller ResNet-34 model as the student model; training the student model by freezing the backbone network of the teacher model, and optimizing the student model using classifier loss, a probabilistic knowledge model based on Jensen-Shannon divergence, and identity loss.
[0012] Furthermore, the step of reordering the preliminary classification results by constructing a ranking of relevant people in the query results includes: for the query image q and the image library G to be queried, firstly calculate the cosine distance between the objects in each image library and q, sort the results from smallest to largest to obtain an initial ranking list, define an autocorrelation set and a recorrelation ranking to form an extended set, then calculate the recorrelation ranking distance of people, and use the local correlation information of pedestrian images to improve the ranking effect.
[0013] Furthermore, it also includes a cascaded retrieval step of attribute fusion: combining the pedestrian attribute recognition network and the student model obtained after distillation, the student model is first used to perform global feature matching to determine the candidate set. After binarizing the attribute values output by the pedestrian attribute recognition network, the attribute differences and similarities are obtained using Hamming distance. The final score index is achieved through multiplicative fusion to obtain the final retrieval ranking.
[0014] A single-modal pedestrian re-identification device based on attribute fusion includes a processor and a memory. The memory stores a computer program, which, when loaded by the processor, executes the single-modal pedestrian re-identification method based on attribute fusion as described above.
[0015] A single-modal pedestrian re-identification system based on attribute fusion includes the single-modal pedestrian re-identification device based on attribute fusion as described above.
[0016] The beneficial effects of this invention include: (1) This invention improves the accuracy of single-modal pedestrian re-identification: By introducing pedestrian attribute recognition into the single-modal pedestrian re-identification task, it provides the model with more global semantic cues, supplementing the detailed information that may be missed when only using identity labels for classification, thereby effectively improving the model's discrimination ability and recognition accuracy. Furthermore, a new attribute fusion ranking method is proposed, which multiplicatively fuses the similarity of the pedestrian re-identification model with the similarity of pedestrian attribute recognition, so that the retrieval results not only consider the overall appearance features of pedestrians, but also fully combine the attribute information of pedestrians, further improving the accuracy and relevance of retrieval.
[0017] (2) This invention enhances the performance and efficiency of the model: By using the OverHaul distillation method, the best-performing SBS baseline model is used as the teacher model, and the student model is distilled to obtain a faster inference speed and less memory usage. Without sacrificing performance, the inference efficiency of the model is greatly improved, making it more suitable for practical application scenarios and reducing the computational resource requirements and hardware requirements.
[0018] (3) This invention improves the overall matching accuracy and stability: Traditional pedestrian re-identification relies solely on the distance between features for ranking, ignoring the interrelationships between the ranking results. The re-correlation ranking method proposed in this invention re-ranks the candidate results by constructing a ranking of relevant people in the query results, thereby improving the overall matching accuracy and stability. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is an architecture diagram of a single-modal person re-identification method based on attribute fusion. Figure 2 Network architecture diagram for pedestrian attribute recognition; Figure 3 This diagram illustrates the memory usage and inference time of three baseline methods on the Market-1501 dataset under different backbones. Figure 4 This is a schematic diagram of a distillation process; Figure 5 This is a diagram illustrating the comparison of queries and their related individuals; the red box indicates incorrect queries, and the rounded rectangle contains related queries. Figure 6 A diagram illustrating parameter selection; (a) Rank-1 metric; (b) mAP metric; Figure 7 Threshold A diagram illustrating the impact on performance on the Market-1501 dataset. Detailed Implementation
[0021] All features disclosed in all embodiments of this specification, or steps in all methods or processes implied in the disclosure, may be combined and / or extended or replaced in any way, except for mutually exclusive features and / or steps.
[0022] In view of the problems mentioned in the background, this invention proposes a single-modal person re-identification scheme based on attribute fusion. The invention utilizes pedestrian attribute information as auxiliary information to achieve multi-level and multi-dimensional feature representation. Specifically, a weighted attribute recognition network (WARN) is designed first to obtain pedestrian attributes from the input image. Simultaneously, three baseline methods are compared, and the best-performing method is used as the teacher model. OverHaul distillation is used to obtain a student model with faster inference speed and lower memory usage. The similarity of pedestrian attributes and the similarity of the student model are multiplicatively fused to obtain preliminary classification results. Addressing the problem that traditional person re-identification relies solely on the distance between features for ranking, neglecting the interrelationships between ranking results, a re-correlation person ranking method is proposed. By constructing a re-correlation ranking of query results, candidate results are re-ranked, improving overall matching accuracy and stability.
[0023] More specifically, the technical solution of the present invention has the following improvements: On the one hand, this invention proposes a single-modal person re-identification method based on attribute fusion, the architecture of which is as follows: Figure 1 As shown, by utilizing pedestrian attribute information as auxiliary information, multi-level and multi-dimensional feature representation can be achieved, thereby overcoming the bottleneck problem caused by limited information in a single modality.
[0024] On the other hand, a weighted pedestrian attribute recognition network (WARN) was designed, including a feature extractor, a weight allocation module, and an attribute classifier. The feature extractor extracts global image features, the weight allocation module weights the attributes, and the weighted attributes are used for attribute classification. During the baseline model selection and distillation process, the performance, parameter count, memory usage, and inference time of three baseline methods (SBS, AGW, and BoT) were compared under four different backbones: ResNet-101-ibn, ResNest-50, ResNet-50-ibn, and ResNet-50. The method with the best performance was determined as the teacher model. Using the ResNet-101-IBN model under the SBS method as the teacher model and the smaller ResNet-34 model as the student model, an overHaul distillation of the loss function and network architecture was performed to obtain a model more suitable for the application.
[0025] During distillation, the student model is trained by freezing the backbone network of the teacher model. The student model is optimized by using classifier loss, probabilistic knowledge model of J based on Jensen-Shannon divergence, and identity loss, so that the student model retains high performance while significantly reducing inference speed and memory usage.
[0026] On the other hand, instead of relying solely on calculating the distance between features for ranking, a reordering of candidate results is constructed based on the relevance of people in the query results. For the query image q and the image library G to be queried, the cosine distance is first calculated to obtain an initial ranking list. An autocorrelation set and a re-correlation ranking are defined and combined to form an extended set. Then, the re-correlation distance of people in the ranking is calculated, and the local correlation information of pedestrian images is used to improve the ranking effect.
[0027] On the other hand, by combining the pedestrian attribute recognition model and the distilled baseline model, the student model is first used to perform global feature matching to determine the candidate set. After binarizing the attribute values output by the pedestrian attribute recognition model, the attribute differences and similarities are obtained by using Hamming distance. Finally, the retrieval ranking is achieved through multiplicative fusion.
[0028] The technical effects of the present invention are verified as follows: Experiments on the Market-1501 and DukeMTMC datasets show that introducing pedestrian attribute recognition enhances pedestrian re-identification retrieval results. Compared to the baseline model, the complete method improves the Rank-1 metric by 0.6% and mAP by 3.7% on the Market-1501 dataset, while using only 94.6% of the memory. On the DukeMTMC dataset, it improves by approximately 3.74% compared to the baseline model, demonstrating the effectiveness of the proposed method. Furthermore, the student model is compact and flexible, adaptable to most single-modal pedestrian re-identification scenarios.
[0029] In summary, the technical solution of this invention covers everything from the design of the pedestrian attribute recognition network, the selection and distillation of the baseline model, to the improvement and innovation of the ranking improvement method, as well as the completeness of the experimental verification, demonstrating the technical advantages and application potential in the field of single-modal pedestrian re-identification.
[0030] It should be noted that, within the scope of protection defined in the claims of this invention, the following embodiments can be combined and / or extended or replaced in any logical manner from the above specific embodiments, such as the disclosed technical principles, disclosed technical features or implicitly disclosed technical features.
[0031] In a preferred embodiment, the inventors of this invention believe that Person Attribute Recognition (PAR) also belongs to pedestrian-related tasks in computer vision. As a task that primarily uses coarse-grained semantics for visual analysis, its main goal is to identify relevant attribute information such as the gender, age, clothing, and items carried by pedestrians. Although Person Attribute Recognition differs somewhat from Person Re-identification in terms of task objectives and feature focus, they share high similarity in practical applications regarding target detection requirements and feature learning. The biggest difference between them is that unimodal Person Re-identification requires capturing fine-grained appearance features to achieve accurate differentiation between individuals, while Attribute Recognition focuses on capturing more global and semantic descriptive information.
[0032] Most current pedestrian re-identification methods only consider the analysis from the perspective of pedestrian identity labels, ignoring other potential semantic information that helps distinguish individual differences. By introducing pedestrian attribute recognition into the unimodal pedestrian re-identification task, more global semantic cues can be provided to the model, thus supplementing the detailed information that may be missed when using only identity labels for classification. Through this complementary use of multi-granular information, it is hoped that the overall robustness of the model can be maintained while overcoming the shortcomings of insufficient information in unimodal methods.
[0033] To address the aforementioned issues, this embodiment proposes a single-modal person re-identification method based on attribute fusion, such as... Figure 1 As shown, pedestrian attribute information is used as auxiliary information to achieve multi-level and multi-dimensional feature representation. Specifically, a weighted attribute recognition network (WARN) is designed to obtain pedestrian attributes from the input image. Simultaneously, three baseline methods are compared, and the best-performing method is used as the teacher model. OverHaul distillation is used to obtain a student model with faster inference speed and lower memory usage. The similarity of pedestrian attributes and the similarity of the student model are multiplicatively fused to obtain preliminary classification results.
[0034] Traditional pedestrian re-identification relies solely on the distance between features for ranking, neglecting the interrelationships between the ranked results. Therefore, this invention proposes a novel ranking method, named Re-Related Person Ranking. By constructing a relevance ranking of query results, candidate results are rearranged, improving overall matching accuracy and stability.
[0035] Experiments on the Market-1501 and DukeMTMC datasets validated the hypothesis that introducing pedestrian attribute recognition can enhance pedestrian re-identification retrieval results, providing strong support for further exploration of cross-task collaborative fusion.
[0036] The process of constructing the WARN-based pedestrian attribute recognition method includes dataset selection, pedestrian attribute annotation, and pedestrian attribute recognition method.
[0037] In terms of dataset selection, to achieve single-modal person re-identification based on attribute fusion, pedestrian attributes must first be labeled on the person re-identification dataset. This embodiment uses two commonly used datasets: Market-1501 and DukeMTMC, both publicly available datasets collected on university campuses. The Market-1501 dataset was collected in the summer and includes 1501 pedestrians, with 751 used for training and 750 for testing. It contains 3368 query images, with 12936 images in the training set and 19732 images in the test set. The DukeMTMC dataset was collected in the winter and includes 1404 pedestrians for cross-camera search, with 2228 query images. The training and test sets each contain 702 pedestrians, with 16522 images in the training set and 17661 images in the test set.
[0038] Regarding pedestrian attribute annotation, the two datasets differ in clothing style due to the different collection seasons. For example, the Market-1501 dataset mainly features short-sleeved shirts or shorts and dresses, while the DukeMTMC dataset mainly features long pants. Considering this, this embodiment uses two different sets of attributes for annotation. For the Market-1501 dataset, this embodiment annotates 27 attributes: gender (male / female), age (child / teenager / adult / elderly), hair length (long / short), sleeve length (long / short), lower body clothing length (long / short), lower body clothing type (pants / dress), wearing a hat (yes / no), carrying a backpack (yes / no), carrying a handbag (yes / no), carrying other types of bags (yes / no), 8 colors for upper body clothing (black / white / red / purple / yellow / gray / blue / green), and 9 colors for lower body clothing (black / white / red / purple / yellow / gray / blue / green / brown). The DukeMTMC dataset inherently includes pedestrian attribute labels. However, considering consistency and saliency with the Market-1501 dataset, this embodiment labels 23 attributes: gender (male / female), shoe type (boots / other), wearing a hat (yes / no), carrying a backpack (yes / no), carrying a handbag (yes / no), carrying other types of bags (yes / no), shoe color (light / dark), upper body clothing length (long / short), 8 colors of upper body clothing (black / white / red / purple / gray / blue / green / brown), and 7 colors of lower body clothing (black / white / red / gray / blue / green / brown). From some perspectives, situations may arise where the attribute is not directly displayed for a person carrying a backpack. However, this embodiment still labels the "carrying a backpack" attribute as "yes" to maintain consistency within the same ID.
[0039] In pedestrian attribute recognition methods, for a pedestrian re-identification dataset, it is defined as follows: ,in Representing the A pedestrian, Representing the The identity tags of each pedestrian. For each pedestrian in the dataset. The corresponding pedestrian attribute annotation is: ,in It is the first The corresponding image of the first There are 1 attribute annotation, totaling 1 There are several attributes. Therefore, for a pedestrian re-identification dataset, the set of pedestrian attribute annotations is: .
[0040] Based on this, this embodiment designs a weighted attribute recognition network (WARN), the overall structure of which is as follows: Figure 2 As shown, firstly, a feature extractor is used to extract global features of pedestrians in the image. Then, a weight allocation module is used to weight the attributes. Finally, the weighted attributes are used for the final attribute classification problem. This is based on a pedestrian attribute annotation set. The objective function for WARN can be defined as: (1) in, It is the first A classifier for each attribute, and It is the first Learnable parameters for an attribute classifier. Representative feature extractor, Then it represents the first Individual attribute classifiers for images Extracted feature vectors When performing attribute prediction, the network's goal is to minimize the total loss across all training images and all attributes.
[0041] For an image The attribute prediction set is ,in Represents an attribute classifier For the The predicted values of each attribute are concatenated into a vector. It allows for weight-based adjustments to the predicted values within the prediction set: (2) in, and The parameters learned by the network during training ultimately yield a set of learned weight predictions. By multiplying this value element-wise with the original attribute prediction value, we can obtain the weighted feature. : (3) in, This is an element-wise multiplication. The correlation between attribute annotations on the two datasets is as follows: Figure 2As shown, there are certain relationships between different attribute annotations, and it is unreasonable to simply use the same weight for all attributes. By assigning weights to the original attribute prediction values, the correlation between the predicted attributes can be utilized to further enhance network performance.
[0042] The process of constructing the pedestrian re-identification model based on OverHaul distillation includes the selection of the pedestrian re-identification baseline model, the reconstruction of the SBS model based on OverHaul distillation, and the distillation results and related indicators of the baseline model.
[0043] Regarding the selection of baseline models for person re-identification, existing single-modal person re-identification research has achieved significant performance improvements. However, considering the real-world applications of person re-identification, achieving only minor performance gains through model improvements is unrealistic. Therefore, this embodiment focuses on improving the retrieval efficiency and retrieval order accuracy of ReID. To achieve this, this embodiment first studies the model parameter count, inference efficiency, and overall performance of three baseline methods—SBS, AGW, and BoT—on a dataset.
[0044] Performance, parameter count, memory usage, and inference time of three baseline methods (SBS, AGW, and BoT) under four different backbones (ResNet-101-ibn, ResNest-50, ResNet-50-ibn, and ResNet-50). Experiments were conducted on the two datasets mentioned above. The performance and parameter counts of the three baseline methods—SBS, AGW, and BoT—on four different backbones—ResNet-101-ibn, ResNest-50, ResNet-50-ibn, and ResNet-50 are shown in Table 1. Overall, the performance of the three methods, from highest to lowest, is SBS, AGW, and BoT. The performance of the four different backbones, ranked from highest to lowest, is ResNet-101-ibn, ResNest-50, ResNet-50-ibn, and ResNet-50. It is worth noting that, unlike the batch normalization (BN) in traditional ResNet, ResNet-IBN combines BN with instance normalization (IN), where the calculation of instance normalization can be expressed as: (4) in, and These are the mean and variance calculated for each sample and each channel. In the residual block design of ResNet-IBN, some channels use IN to help the model better suppress bias caused by style variations; the other part continues to use BN, preserving the discriminative nature of the features by retaining batch statistics. This structure allows the model to better cope with the effects of lighting, color, etc., on images while retaining useful discriminative features, thus achieving better performance than the original ResNet network in person re-identification tasks. On the Market-1501 dataset, the addition of IBN achieved an improvement of approximately 0.43% in Rank-1 and approximately 1% in mAP with almost no increase in the number of parameters; on DukeMTMC, it improved the Rank-1 metric by approximately 1.4% and the mAP metric by approximately 1.5%. This improvement demonstrates that in person re-identification tasks, IBN can further enhance the network performance without significantly increasing the number of network parameters.
[0045] However, as can be observed from Table 1, even the worst-performing BoT method using ResNet-50 only lags behind the strongest method, SBS using ResNet-101-IBN, on the DukeMTMC-reID dataset, which has a slightly lower average metric. The Rank-1 difference is approximately 4.7%, and the mAP difference is approximately 6.6%. Both methods have Rank-1 scores greater than 94% and mAP scores greater than 85%, but the number of parameters differs by a factor of two. Increasing the number of model parameters can enhance the expressive power of the extracted features to some extent, but it also brings problems such as increased computational resource requirements and increased difficulty in optimization and parameter tuning. For person re-identification, which is highly sensitive to computational efficiency, this embodiment conducted experiments on the Market-1501 dataset to verify their memory usage and inference time, comparing their efficiency and hardware requirements in practical applications.
[0046] Table 1. Performance and parameter counts of the three baseline methods on two datasets under different backbones.
[0047] like Figure 3As shown, the memory usage of the models, from lowest to highest, is ResNet-50 / ResNet-50-IBN, ResNet-101-IBN, and ResNest-50. While ResNest-50 has the highest memory usage as the backbone network, its performance improvement is not as significant as its memory requirements (ResNest-50 requires about one-third more memory during inference compared to ResNet50). Therefore, ResNest-50 is not suitable as a backbone network for pedestrian re-identification tasks. The AGW method is more moderate; its memory usage is almost the same as the BoT method, but its inference time is 14% slower than the BoT method when using ResNet50 as the backbone network, which is not proportional to its approximately 1% improvement in mAP. Therefore, the AGW method is not a better choice either. Their efficiency can be compared more intuitively by calculating an efficiency score, which can be expressed as: (5) in, For reasoning time, It represents the minimum inference time across all experiments; For video memory usage This represents the minimum memory usage across all experiments. Based on this, efficiency scores for all methods on different backbone networks can be obtained, as shown in Table 2. It can be seen that the BoT method achieved the highest efficiency score when using ResNet-50-IBN, indicating its greater efficiency in practical applications. The SBS method achieved the best performance; combining efficiency and performance could lead to even better performance for the baseline method in subsequent applications.
[0048] Table 2. Efficiency scores of the three baseline methods on the Market-1501 dataset under different backbones.
[0049] In the reconstruction of the SBS model based on OverHaul distillation, in order to accelerate its inference speed and reduce its memory usage while preserving the performance of the SBS baseline model as much as possible, this embodiment uses the ResNet-101-IBN model under the SBS method as the teacher model and the smaller ResNet-34 model as the student model. A more suitable model for the application is obtained by OverHaul distillation of the loss function and network architecture.
[0050] like Figure 4 As shown, the student model is trained by freezing the backbone network of the teacher model during distillation, where the teacher model and student model output classifiers respectively. and feature map The goal of the student model is to learn the classification ability of the teacher model as much as possible; the classifier loss... Based on the first normal form, this process can be represented as: (6) Simultaneously, during distillation, it is necessary to ensure the consistency of the feature space distributions of the teacher and student models. Therefore, this embodiment employs a probabilistic knowledge model based on Jensen-Shannon Divergence (JSD) to optimize the student model. Given the output probability distributions of the two models... and Their average distribution can then be expressed as: (7) JSD can then be defined as: (8) in Representing the Kullback-Leibler (KL) divergence, for classification tasks like person re-identification, assuming we have... The pedestrian's identity needs to be classified, then the KL divergence of the teacher model... for: (9) Similarly, the student model can be derived. At the same time, ID loss was used to optimize the student network.
[0051] Based on the baseline model distillation results and related metrics, this embodiment compares the model during and after distillation on the Market-1501 dataset, where the graphics card used for inference is 4090, and the results are shown in Table 3.
[0052] After undergoing OverHaul distillation, the student model's memory usage during inference is only 63.23% of that of the teacher model, and it achieves approximately 98.3% of the teacher model's performance with 7.5 times the inference speed. The final efficiency score of the student model is 361.82, which means that this embodiment finally obtained a single-modal person re-identification model that can balance efficiency and performance for subsequent applications.
[0053] Table 3. Performance and related metrics of the student model prototype, teacher model, and student model on the dataset.
[0054] The specific implementation of the re-related person ranking method includes the selection of re-related person ranking rules and parameters. Current pedestrian re-identification research, after obtaining a model trained on a dataset, first uses the model to extract features in practical applications, and then calculates the similarity between features (commonly cosine similarity) to obtain the query ranking. However, in practical applications, due to the difference between the dataset and the actual scene, it is difficult to obtain accurate query ranking based solely on distance metrics. This embodiment improves upon this by utilizing the pedestrian attribute recognition model obtained above and the re-related person ranking method described below, and has been validated on relevant datasets.
[0055] Regarding the ranking rules for related people, traditional pedestrian re-identification only uses feature similarity calculation to obtain the ranking. This involves calculating the similarity between all images in the image library and the query image, and then ranking them from highest to lowest relevance. This method can be effective in simple scenarios. However, in real-world situations, when the image library contains candidate images similar to the query image, the method relying solely on feature distance may fail. For example... Figure 5 As shown, in the initial query results for the query image, although the Rank-2 object is an incorrect image, it was incorrectly ranked second because its similarity to the query (0.7) is greater than that of Rank-3 (0.6). However, when the query results for Rank-2 are sorted, it can be seen that its similarity to Rank-1 (excluding the query) is only 0.3, meaning it is not in a "compact" query queue. For query images... and the image library to be queried First, calculate the objects in each gallery. right cosine distance Sort the results from smallest to largest to obtain the initial sorted list. For querying images In other words, A list is its autocorrelation sort, defined as the first... The autocorrelation set of the images is And for For each image in the process, its respective front image is obtained again. An autocorrelation order, denoted as ,gather Called query image The re-sorting of related information. The autocorrelation sort and the recorrelation sort are combined to form an extended set. ,in ,Right now It includes and An extended set.
[0056] Based on this, for a query image and the images in the image library to be queried In other words, the re-related person ranking distance can be defined as: (10) in, express extended set The first in One image, and Then it means extended set The first in The computational complexity is O(n images). ).
[0057] By constructing a ranking distance for the re-correlation person ranking method, we can better utilize the local correlation information between pedestrian images, thereby improving the ranking effect of pedestrian re-identification tasks in applications.
[0058] The parameters for sorting related characters and tasks need to be determined before constructing the set. and Therefore, the optimal configuration needs to be obtained through experiments. Considering the computational cost, this embodiment will use the parameters... and exist Combinations were performed within a certain range, and experiments were conducted on the Market-1501 dataset based on a student model. The results are as follows: Figure 6 As shown. It can be seen that, in At that time, the Rank-1 metric and mAP of the re-relevant person ranking reached their highest values, with an increase of about 0.3% in Rank-1 and about 9.7% in mAP compared to the original student model. In the experiment, there was an increase in Rank-1 while all other Rank-5 and Rank-10 values decreased to some extent, indicating that the re-relevant person ranking is more suitable for situations where the first search result is considered correct.
[0059] The implementation process of single-modal pedestrian re-identification based on attribute fusion ranking also includes the following steps: a student model obtained based on the pedestrian attribute identification model and the distillation baseline model implemented in this embodiment can be used to realize a cascaded retrieval combining the two.
[0060] First, a student model is used for global feature matching. For any image, the feature vector extracted by the student model is denoted as... The cosine similarity between the query image and any image in the image library can be calculated. ,in Represents the query graph, while This refers to any image in the image library. A simple method can linearly map both to the range [0,1]. Therefore, the final candidate set can be defined as: (11) in, Representative image library, rank This indicates sorting by cosine similarity from largest to smallest. This is the size of the candidate set.
[0061] And for any image The vector formed by the attribute values output by the pedestrian attribute recognition model is: (12) in The first in the representative attribute set The model outputs an attribute vector with values for each attribute. The attribute vector is binarized, where 1 indicates the attribute exists and 0 indicates it does not exist. The binarized attributes are defined as follows: (13) in Based on a set threshold, the attribute differences between two graphs can be obtained using the Hamming distance: (14) in That is, the binary indicator function. The total number of attributes is used to calculate the attribute similarity. : (15) Now, based on the cosine similarity and attribute similarity of person re-identification, a multiplicative fusion can be used to achieve the final score metric, i.e. The final search ranking can then be obtained based on the scores.
[0062] Experiments were conducted on two datasets to verify the performance of the proposed attribute fusion retrieval-based single-modal person re-identification method. The experimental platform was the same as above, and the results are shown in Table 4, where the threshold in Equation 13 is... Set to 0.6.
[0063] Table 4 Performance Comparison Table
[0064] The proposed method achieved state-of-the-art performance on the Market-1501 dataset. The resulting student model, with optimal inference time and memory usage, achieved 97.65% Rank-1 and 91.05% mAP, respectively, compared to the full method. The student model's compact and flexible nature means it can adapt to most single-modal person re-identification scenarios. The full method improved the Rank-1 score by 0.6% and the mAP score by 3.7% compared to the baseline model, while using only 94.6% of the memory, demonstrating the effectiveness of the proposed method. However, it is worth noting that the inference time for re-ranking people increases significantly due to the calculation of relevance distance, meaning the full method is more suitable for handling challenging scenarios. On the DukeMTMC dataset, the proposed method ultimately improved performance by approximately 3.74% compared to the baseline model, further proving its effectiveness.
[0065] The present invention addresses the threshold in Formula 13. The impact on performance was investigated, and the results are as follows: Figure 7 As shown. Because attribute fusion retrieval uses multiplicative fusion, the smaller This will cause most attributes to be binary-coded to 1, making matching difficult, and excessively high values will lead to most attributes being binary-coded to 1, making matching difficult. This will cause most attributes to be discarded, making it impossible for methods to obtain useful information from the attributes. Threshold The best performance results were achieved at 0.6.
[0066] This invention also explores the differences between additive fusion and multiplicative fusion. Additive fusion simply adds the similarity scores of the person re-identification model and the similarity scores of the person attribute identification, and takes the average to obtain the final score. As shown in Table 5, multiplicative fusion outperforms the additive fusion method on both datasets, proving the correctness of choosing multiplicative fusion in this embodiment.
[0067] Table 5 Comparison of the two fusion methods
[0068] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0069] According to one aspect of the present invention, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described above.
[0070] In another aspect, embodiments of the present invention also provide a computer-readable medium, which may be included in the electronic device described in the above embodiments; or it may exist independently and not assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods described in the above embodiments.
Claims
1. A single-modal person re-identification method based on attribute fusion, characterized in that, include: A weighted pedestrian attribute recognition network is constructed to obtain pedestrian attributes from the input image; Determine the teacher model, and obtain the student model using distillation; The preliminary classification results are obtained by multiplicatively fusing the similarity of pedestrian attributes with the similarity of student models; By constructing a ranking of relevant individuals in the query results, the preliminary candidate classification results are rearranged to obtain the final classification results.
2. The single-modal person re-identification method based on attribute fusion according to claim 1, characterized in that, The pedestrian attribute recognition network with weighted allocation includes a feature extractor, a weight allocation module, and an attribute classifier; the feature extractor extracts global features of the image, the weight allocation module weights the attributes, and the attribute classifier classifies the weighted attributes.
3. The single-modal person re-identification method based on attribute fusion according to claim 1, characterized in that, The process of determining the teacher model includes: comparing the performance, parameter count, memory usage, and inference time metrics of various baseline methods under different backbone networks, and determining the method with the best performance as the teacher model.
4. The single-modal person re-identification method based on attribute fusion according to claim 1, characterized in that, The process of obtaining the student model using distillation includes: using the ResNet-101-IBN model under the SBS baseline method as the teacher model and the smaller ResNet-34 model as the student model; training the student model by freezing the backbone network of the teacher model; and optimizing the student model using classifier loss, a probabilistic knowledge model based on Jensen-Shannon divergence, and identity loss.
5. The single-modal person re-identification method based on attribute fusion according to claim 1, characterized in that, The process of reordering candidate preliminary classification results by constructing a ranking of relevant persons in the query results includes: for the query image q and the image library G to be queried, firstly calculate the cosine distance between the objects in each image library and q, sort the results from smallest to largest to obtain an initial ranking list, define an autocorrelation set and a re-correlation ranking to form an extended set, and then calculate the re-correlation person ranking distance to improve the ranking effect by utilizing the local correlation information of pedestrian images.
6. The single-modal person re-identification method based on attribute fusion according to claim 1, characterized in that, It also includes a cascaded retrieval step of attribute fusion: combining the pedestrian attribute recognition network and the student model obtained after distillation, the student model is first used to perform global feature matching to determine the candidate set. After binarizing the attribute values output by the pedestrian attribute recognition network, the attribute differences and similarities are obtained by using Hamming distance. The final score index is achieved through multiplicative fusion to obtain the final retrieval ranking.
7. A single-modal pedestrian re-identification device based on attribute fusion, characterized in that, It includes a processor and a memory, in which a computer program is stored. When the computer program is loaded by the processor, it executes the single-modal pedestrian re-identification method based on attribute fusion as described in any one of claims 1 to 6.
8. A single-modal pedestrian re-identification system based on attribute fusion, characterized in that, The single-modal pedestrian re-identification device based on attribute fusion as described in claim 7.