A pedestrian re-identification system, method and application based on hash coding learning

The pedestrian re-identification system based on hash coding learning utilizes a hash master network and a momentum auxiliary network for feature extraction and binarization, solving the problems of high storage pressure, slow comparison speed, and poor retrieval performance in deep hash learning. This improves the storage and computation efficiency of pedestrian re-identification and meets the needs of large-scale applications.

CN121686572BActive Publication Date: 2026-04-17RECONOVA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
RECONOVA TECH CO LTD
Filing Date
2026-02-10
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing deep hash learning schemes suffer from problems such as high storage pressure, slow comparison speed, and poor retrieval performance in person re-identification. In particular, the uncertainty caused by binary approximation optimization reduces retrieval performance.

Method used

A pedestrian re-identification system based on hash coding learning is adopted, including a pedestrian feature extraction module, an uncertainty estimation and loss calculation module, a model training module, and a retrieval module. Feature extraction and binarization are performed through a hash main network and a momentum auxiliary network, and a total loss function is constructed to optimize network parameters. Discrete optimization is performed using bit-level and image-level uncertainty.

Benefits of technology

It significantly reduces the storage pressure and comparison speed of pedestrian re-identification features, improves retrieval performance, and can adapt to the needs of large-scale pedestrian re-identification application scenarios, meeting the requirements of real-time performance and high efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure QLYQS_6
    Figure QLYQS_6
  • Figure QLYQS_8
    Figure QLYQS_8
  • Figure SMS_107
    Figure SMS_107
Patent Text Reader

Abstract

The application discloses a pedestrian re-identification system and method based on hash coding learning and application, and the system comprises a pedestrian feature extraction module, an uncertainty estimation and loss calculation module, a model training module and a retrieval module; the pedestrian feature extraction module comprises a hash main network and a momentum auxiliary network with consistent network structure, and is used for performing feature extraction on an input pedestrian image and outputting corresponding activation features; the uncertainty estimation and loss calculation module is used for calculating bit-level uncertainty and image-level uncertainty based on the activation features, and constructing a total loss function; the model training module is used for training and optimizing the hash main network and the momentum auxiliary network based on a private training data set; and the retrieval module is used for performing offline database construction on pedestrian images in a database and online retrieval on an image to be queried. The application can significantly reduce the storage pressure and comparison speed pressure of pedestrian re-identification features, and improve the storage and calculation efficiency of a pedestrian re-identification application system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision technology, and in particular to a pedestrian re-identification system, method and application based on hash coding learning. Background Technology

[0002] Pedestrian re-identification is a popular research problem in the field of computer vision, with broad application prospects in areas such as intelligent surveillance and public safety. As the scale of pedestrian re-identification applications gradually expands, the number of pedestrian re-identification comparisons is exploding, leading to significant storage and comparison speed issues.

[0003] Hashing techniques have gained widespread attention in pedestrian re-identification applications due to their low storage costs and fast computation speed. Traditional hashing methods rely on hand-designed features, while deep hashing techniques have made significant progress in recent years with the development of deep learning. Deep hashing aims to map high-bit image data to a low-dimensional binary Hamming space; however, due to the limitations of the backpropagation optimization method in neural networks, deep hashing learning faces the problem of discrete optimization of binary hash codes.

[0004] In the existing technology, recent deep hash learning schemes often solve this challenge through binary approximation. However, this approximation optimization process leads to uncertainty between the true value and the binary value, thereby reducing the retrieval performance of person re-identification and failing to meet the high requirements of storage efficiency, comparison speed and retrieval performance in practical applications. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a pedestrian re-identification system, method and application based on hash coding learning, so as to solve the problems of high storage pressure, slow comparison speed and poor retrieval performance in pedestrian re-identification applications, and improve the overall performance of pedestrian re-identification application systems.

[0006] To achieve the above objectives, the solution of the present invention is:

[0007] A pedestrian re-identification system based on hash coding learning includes: a pedestrian feature extraction module, an uncertainty estimation and loss calculation module, a model training module, and a retrieval module;

[0008] The pedestrian feature extraction module includes a hash main network and a momentum auxiliary network. The hash main network and the momentum auxiliary network have completely identical structures and are used to extract features from the input pedestrian image and output the corresponding activation features.

[0009] The uncertainty estimation and loss calculation module is used to calculate bit-level uncertainty and image-level uncertainty based on the activation features, and to construct the total loss function;

[0010] The model training module is used to train and optimize the hash main network and momentum auxiliary network based on a private training dataset;

[0011] The retrieval module is used to build an offline database of pedestrian images in the base database and to perform online retrieval of images to be queried.

[0012] Furthermore, both the hash main network and the momentum auxiliary network adopt the ResNet-50 network structure; the hash main network is used to extract features from the input pedestrian image, outputting a first feature vector, which is then processed by the tanh activation function to obtain a first activation feature; the momentum auxiliary network is used to extract features from the same pedestrian image, outputting a second feature vector, which is then processed by the tanh activation function to obtain a second activation feature.

[0013] Furthermore, the uncertainty estimation and loss calculation module calculates bit-level uncertainty. The formula is:

[0014] ;in, , , Given a pedestrian image, ; As the first activation feature, This is the second activation feature; The tanh activation function is used. Its output , For the hash main network, For kinetic energy auxiliary network;

[0015] Formula for calculating image-level uncertainty for: ;in, d The dimension of the sample feature vector. For bit-level uncertainty, the first k Each component.

[0016] Furthermore, the total loss function includes a triplet embedding loss function, a hash-encoded bit-level quantization loss function, and a consistency loss function; the triplet embedding loss function employs adaptive weights based on uncertainty; the hash-encoded bit-level quantization loss function is weighted individually for each hash bit; and the consistency loss function is used to maintain the consistency between the hash main network and the momentum auxiliary network.

[0017] Furthermore, the model training module uses stochastic gradient descent to optimize the parameters of the hash main network and updates the parameters of the momentum auxiliary network using a momentum update formula, which is: ;in, For the parameters of the momentum-assisted network, For the parameters of the hash main network, for The constants between.

[0018] A person re-identification method based on hash encoding learning includes the following steps:

[0019] S1. Data preparation: Obtain the training dataset, the base dataset, and the images to be queried; adjust the size of the pedestrian images.

[0020] S2. Construct a dual-network architecture for pedestrian feature extraction, and build a hash main network and a momentum auxiliary network with completely identical structures.

[0021] S3. Uncertainty estimation and loss function construction: Calculate bit-level uncertainty and image-level uncertainty, and construct the total loss function;

[0022] S4: Model training, using a PK sampling strategy to extract training batches, and training and optimizing the hash main network and momentum auxiliary network;

[0023] S5: Offline database construction, performing feature extraction, binarization processing, and storage on pedestrian images in the base database dataset;

[0024] S6: Online retrieval, extracts features from the query image, binarizes it, calculates and sorts the Hamming distances between the image and pedestrian images in the database, and outputs the retrieval results.

[0025] Furthermore, the specific method of step S2 is as follows:

[0026] Input pedestrian image Category label is , obtain features , The dimension of the sample feature vector. For hashing the main network; tanh The activation function is Its output Then hash main network Output Similarly, momentum-assisted networks Its network structure is similar to the hash main network. Completely identical, momentum-assisted network The output is .

[0027] Furthermore, the specific steps of step S3 are as follows:

[0028] S31. Calculating bit-level uncertainty for: ;in, , , Given a pedestrian image, ;

[0029] S32, Calculate image-level uncertainty for: ;in, The dimension of the sample feature vector;

[0030] S33. For pedestrian re-identification tasks, triplet embedding loss function for:

[0031] ;

[0032] in, 、 、 These represent the corresponding pedestrian images. eigenvectors, 、 、 This indicates the category label corresponding to the sample. and Same type and with Different categories, It is a constant. Triple loss function The weights are determined using adaptive weights based on uncertainty; therefore, Represented as: ,in, Representative sample Image-level uncertainty, when its value is high, the triplet loss weights This will increase exponentially, forcing the network to focus on samples with higher uncertainty when optimizing backpropagation;

[0033] S34. Bit-level quantization loss of hash encoding for:

[0034] ;in, The dimension of the sample feature vector. It is a constant;

[0035] , It is a symbolic function;

[0036] The hash loss function is weighted individually for each hash bit, meaning that if the uncertainty of that bit is considered... If the value is large, the optimization effort is stronger, forcing the bit to complete binarization as soon as possible and reducing the loss of retrieval accuracy caused by quantization;

[0037] To maintain the hash master network With momentum auxiliary network Consistency, define the consistency loss function. for: , It is a constant;

[0038] Uncertainty loss function based on deep hashing coding for:

[0039] ,

[0040] Hash Main Network All learnable parameters are Momentum-assisted network All learnable parameters are During the backpropagation optimization process, Optimization is performed using backpropagation based on stochastic gradient descent. It will not participate in gradient descent updates, but will be updated through the momentum update formula:

[0041] ,in, For one The constants between.

[0042] Furthermore, the specific method for step S6 is as follows:

[0043] S61. Perform offline feature extraction and database construction for all images in the base database, and construct the database for each pedestrian image in the base database. Input into the pre-trained hash master network In the middle, obtain the output of the hash main network. ;

[0044] S62, targeting For each element, use a symbolic function. Binarization is performed, that is

[0045] ,in, ;Will In compact binary form, soon The bit hash code is compressed and stored as follows: Each byte is stored in a dedicated hash database and linked to the corresponding pedestrian image tag. Alternatively, the storage location can be associated;

[0046] S63. When performing an online query, a query image is provided. Similarly, a query hash code is generated:

[0047] Use Hamming distance to calculate the query image. With each image in the database The similarity, i.e.:

[0048]

[0049] in, This is an indicator function, where a value of 1 is returned if the condition within the parentheses is true, and 0 is returned if the condition is false. In the system implementation, to achieve fast target retrieval, bitwise operations are used instead of floating-point operations to calculate the Hamming distance, and the hash code is... The value is determined by Mapped to Then calculate using the following formula.

[0050]

[0051] in, This represents the XOR operation. For counting function (Population Count) This is typically achieved by calling the CPU instruction set;

[0052] S64. Sort the results from smallest to largest based on the calculated Hamming distance and output the sorting results.

[0053] An application of a pedestrian re-identification system based on hash coding learning is disclosed, which is then applied to the fields of intelligent monitoring, public safety, or personnel management.

[0054] By adopting the above scheme, the pedestrian re-identification system, method and application based on hash coding learning of the present invention introduces deep hash learning into the pedestrian re-identification task. By performing hash binary coding learning on the output features of deep neural networks, the continuous features in Euclidean space are discretized into a low-dimensional binary Hamming space, which significantly reduces the storage pressure and comparison speed pressure of pedestrian re-identification features, improves the storage and computing efficiency of pedestrian re-identification application system, and can meet the needs of large-scale pedestrian re-identification application scenarios. Detailed Implementation

[0055] To further explain the technical solution of the present invention, the present invention will be described in detail below through specific embodiments.

[0056] As the scale of pedestrian re-identification applications gradually expands, the number of pedestrian re-identification comparisons has exploded, leading to significant storage and comparison speed issues. This invention proposes a pedestrian re-identification system, method, and application based on hash coding learning. First, deep hash learning is introduced into the pedestrian re-identification task. By discretizing continuous features in Euclidean space into a low-dimensional binary Hamming space, the storage pressure and comparison speed pressure of pedestrian re-identification features are significantly reduced, improving the computational efficiency of the pedestrian re-identification application system. Second, to solve the discretization optimization problem of binary hash codes, this invention models the bit-level uncertainty in hash coding and proposes a discretization optimization method, which can effectively improve the retrieval performance of hash codes after deep hash learning for pedestrian re-identification tasks.

[0057] The present invention proposes a pedestrian re-identification system based on hash coding learning, which includes a pedestrian feature extraction module, an uncertainty estimation and loss calculation module, a model training module, and a retrieval module.

[0058] The pedestrian feature extraction module includes a hash main network and a momentum auxiliary network, which have identical structures and are used to extract features from the input pedestrian image and output corresponding activation features. Both the hash main network and the momentum auxiliary network adopt the ResNet-50 network structure. The hash main network is used to extract features from the input pedestrian image and output a first feature vector, which is then processed by the tanh activation function to obtain the first activation feature. The momentum auxiliary network is used to extract features from the same pedestrian image and output a second feature vector, which is then processed by the tanh activation function to obtain the second activation feature.

[0059] The uncertainty estimation and loss calculation module is used to calculate bit-level uncertainty and image-level uncertainty based on the activation features, and to construct a total loss function; the uncertainty estimation and loss calculation module calculates bit-level uncertainty. The formula is: ;in, , , Given a pedestrian image, ; As the first activation feature, This is the second activation feature; The tanh activation function is used. Its output , For the hash main network, For kinetic-assisted networks; formula for calculating image-level uncertainty. for: ;in, d The dimension of the sample feature vector. For bit-level uncertainty, the first k The total loss function comprises three components: a triplet embedding loss function, a hash-encoded bit-level quantization loss function, and a consistency loss function. The triplet embedding loss function employs adaptive weights based on uncertainty. The hash-encoded bit-level quantization loss function is weighted individually for each hash bit. The consistency loss function is used to maintain the consistency between the hash main network and the momentum auxiliary network.

[0060] The model training module is used to train and optimize the hash main network and momentum auxiliary network based on a private training dataset. The model training module uses stochastic gradient descent to optimize the parameters of the hash main network and updates the parameters of the momentum auxiliary network using a momentum update formula, which is: ;in, For the parameters of the momentum-assisted network, For the parameters of the hash main network, for The constants between.

[0061] The retrieval module is used to build an offline database of pedestrian images in the base database and to perform online retrieval of images to be queried.

[0062] This invention also proposes a person re-identification method based on hash coding learning, comprising the following steps:

[0063] S1. Data Preparation: Obtain the training dataset, the base dataset, and the images to be queried. Adjust the size of the pedestrian images. After adjusting the size of the pedestrian images, perform preprocessing operations on the pedestrian images, including one or more combinations of normalization, random horizontal flipping, and random cropping.

[0064] S2. Construct a dual-network architecture for pedestrian feature extraction, and build a hash main network and a momentum auxiliary network with completely identical structures.

[0065] Define the hash main network Given a pedestrian image Category tags are Features can be obtained , Let be the dimension of the sample feature vector. (Definition) tanh The activation function is Its output Then define the hash main network. Output Similarly, define a momentum-assisted network. Its network structure is similar to the hash main network. Completely identical, define momentum-assisted network The output is .

[0066] S3. Uncertainty estimation and loss function construction: Calculate bit-level uncertainty and image-level uncertainty, and construct the total loss function;

[0067] S31. Calculating bit-level uncertainty for: ;in, , , Given a pedestrian image, ;

[0068] S32, Calculate image-level uncertainty for: ;in, The dimension of the sample feature vector;

[0069] S33. For pedestrian re-identification tasks, triplet embedding loss function for:

[0070] ;

[0071] in, 、 、 These represent the corresponding pedestrian images. eigenvectors, 、 、 This indicates the category label corresponding to the sample. and Same type and with Different categories, It is a constant. Triple loss function The weights are determined using adaptive weights based on uncertainty; therefore, Represented as: ,in, Representative sample Image-level uncertainty, when its value is high, the triplet loss weights This will increase exponentially, forcing the network to focus on samples with higher uncertainty when optimizing backpropagation;

[0072] S34. Bit-level quantization loss of hash encoding for:

[0073] ;in, The dimension of the sample feature vector. This is a constant, manually set during algorithm training, and has no range requirements;

[0074] , It is a symbolic function;

[0075] The hash loss function is weighted individually for each hash bit, meaning that if the uncertainty of that bit is considered... If the value is large, the optimization effort is stronger, forcing the bit to complete binarization as soon as possible and reducing the loss of retrieval accuracy caused by quantization;

[0076] To maintain the hash master network With momentum auxiliary network Consistency, define the consistency loss function. for: , It is a constant, manually set during algorithm training, and has no range requirements;

[0077] The uncertainty loss function based on deep hashing is:

[0078] ,

[0079] Hash Main Network All learnable parameters are Momentum-assisted network All learnable parameters are During the backpropagation optimization process, Optimization is performed using backpropagation based on stochastic gradient descent. It will not participate in gradient descent updates, but will be updated through the momentum update formula:

[0080] ,in, For one The constants between.

[0081] S4: Model training, using a PK sampling strategy to extract training batches, and training and optimizing the hash main network and momentum auxiliary network.

[0082] S5: Offline database construction, performing feature extraction, binarization, and storage on pedestrian images in the base database dataset.

[0083] S6: Online retrieval, performing feature extraction and binarization on the query image, calculating and sorting the Hamming distances with pedestrian images in the base database, and outputting the retrieval results. Specifically, it includes the following steps:

[0084] S61. Perform offline feature extraction and database construction for all images in the base database, and construct the database for each pedestrian image in the base database. Input into the pre-trained hash master network In the middle, obtain the output of the hash main network. ;

[0085] S62, targeting For each element, use a symbolic function. Binarization is performed, that is

[0086] ,in, ;Will In compact binary form, soon The bit hash code is compressed and stored as follows: Each byte is stored in a dedicated hash database and linked to the corresponding pedestrian image tag. Alternatively, the storage location can be associated;

[0087] S63. When performing an online query, a query image is provided. Similarly, a query hash code is generated:

[0088] Use Hamming distance to calculate the query image. With each image in the database The similarity, i.e.: ;in, This is an indicator function, where a value of 1 is returned if the condition within the parentheses is true, and 0 is returned if the condition is false. In the system implementation, to achieve fast target retrieval, bitwise operations are used instead of floating-point operations to calculate the Hamming distance, and the hash code is... The value is determined by Mapped to Then calculate using the following formula. ;in, This represents the XOR operation. For counting function (Population Count) This is typically achieved by calling the CPU instruction set;

[0089] S64. Sort the results from smallest to largest based on the calculated Hamming distance and output the sorting results.

[0090] This invention introduces deep hash learning into the pedestrian re-identification task. By performing hash binary encoding learning on the output features of deep neural networks in the pedestrian re-identification task, the storage pressure and comparison speed pressure of pedestrian re-identification features can be significantly reduced, thereby improving the storage and computing efficiency of the pedestrian re-identification application system.

[0091] This invention models the bit-level uncertainty in hash coding and proposes a discrete optimization method that can effectively improve the retrieval performance of hash coding after deep hash learning for pedestrian re-identification tasks.

[0092] The following uses a dataset to verify the pedestrian re-identification method based on hash encoding learning of this invention.

[0093] This invention uses a private dataset as training data, which contains 28,358 people and 242,584 pedestrian digital images.

[0094] First, this invention uses the ResNet-50 network structure as the pedestrian image feature network for experiments, i.e., the hash main network. and momentum auxiliary network All networks used are ResNet-50. Using a private training dataset and the loss function proposed in step S3, stochastic gradient descent is employed to optimize the hash master network. and momentum auxiliary network Optimization is performed to ultimately obtain the optimal hash master network. The images were then used for testing. During the optimization process, pedestrian images captured by different cameras were uniformly resized to 256x128 pixels. A p-sampling strategy (i.e., randomly selecting P pedestrians, and extracting K images from each person) was adopted to form a training batch. Specifically, in the experiment of this invention, each training batch used 32 pedestrians, with 8 images used for each person for optimization. The initial learning rate for optimization was 0.01, and stochastic gradient descent was used for optimization, with the learning rate gradually decreasing to 0.0001. The constant in the triplet loss... The coefficients in the momentum update formula Parameters in the loss function , .

[0095] This invention uses two publicly available test sets, Market-1501 and DukeMTMC-reID, to compare with four other existing pedestrian re-identification models in terms of Rank-1 priority and Mean Average Precision (mAP).

[0096] Table 1: Comparison results on the test set Market-1501.

[0097]

[0098] Table 2: Comparison results on the test set DukeMTMC-reID.

[0099]

[0100] The test results show that the method of the present invention has good performance in pedestrian re-identification tasks and can meet the needs of practical applications.

[0101] This invention models the bit-level uncertainty in hash coding and proposes a discrete optimization method. By constructing a reasonable loss function, the network can focus on samples and bits with high uncertainty during training, effectively solving the discrete optimization problem of binary hash codes and improving the retrieval performance of hash codes after deep hash learning for person re-identification tasks. On the public test set Market-1501, the Rank-1 reaches 94.2% and the mAP reaches 87.2%; on the DukeMTMC-reID test set, the Rank-1 reaches 88.1% and the mAP reaches 78.6%, demonstrating good retrieval performance.

[0102] This invention employs a dual-network architecture of a hash master network and a momentum auxiliary network, maintaining consistency between the two networks through a consistency loss function. This provides a reliable foundation for uncertainty estimation and further enhances the model's stability and reliability. During the retrieval process, bitwise operations are used instead of floating-point operations to calculate the Hamming distance, significantly improving the speed of similarity comparison and enabling rapid output of retrieval results to meet the demands of real-time applications.

[0103] The system and method of this invention have a wide range of applications and can be applied to multiple fields such as intelligent monitoring, public safety, and personnel management, and have high practical value and promising prospects for promotion.

[0104] The above embodiments are not intended to limit the product form and style of the present invention. Any appropriate changes or modifications made by those skilled in the art should be considered as not departing from the patent scope of the present invention.

Claims

1. A pedestrian re-identification system based on hash encoding learning, characterized in that, include: The module includes pedestrian feature extraction, uncertainty estimation and loss calculation, model training, and retrieval. The pedestrian feature extraction module includes a hash main network and a momentum auxiliary network. The hash main network and the momentum auxiliary network have completely identical structures and are used to extract features from the input pedestrian image and output the corresponding activation features. The uncertainty estimation and loss calculation module is used to calculate bit-level uncertainty and image-level uncertainty based on the activation features, and to construct the total loss function; The model training module is used to train and optimize the hash main network and momentum auxiliary network based on a private training dataset; The retrieval module is used to build an offline database of pedestrian images in the base database and to retrieve images to be queried online. The uncertainty estimation and loss calculation module calculates bit-level uncertainty. The formula is: ;in, , , Given a pedestrian image, ; As the first activation feature, This is the second activation feature; The tanh activation function is used. Its output , For the hash main network, For kinetic energy auxiliary network; Formula for calculating image-level uncertainty for: ;in, d The dimension of the sample feature vector. For bit-level uncertainty, the first k Each component.

2. The pedestrian re-identification system based on hash coding learning as described in claim 1, characterized in that: Both the hash main network and the momentum auxiliary network adopt the ResNet-50 network structure. The hash main network is used to extract features from the input pedestrian image and output a first feature vector, which is then processed by the tanh activation function to obtain the first activation feature. The momentum auxiliary network is used to extract features from the same pedestrian image and output a second feature vector, which is then processed by the tanh activation function to obtain the second activation feature.

3. The pedestrian re-identification system based on hash coding learning as described in claim 1, characterized in that: The total loss function includes a triplet embedding loss function, a hash-encoded bit-level quantization loss function, and a consistency loss function; the triplet embedding loss function uses adaptive weights based on uncertainty; the hash-encoded bit-level quantization loss function is weighted individually for each hash bit; and the consistency loss function is used to maintain the consistency between the hash main network and the momentum auxiliary network.

4. The pedestrian re-identification system based on hash coding learning as described in claim 1, characterized in that: The model training module uses stochastic gradient descent to optimize the parameters of the hash main network and updates the parameters of the momentum auxiliary network using a momentum update formula, which is: ;in, For the parameters of the momentum-assisted network, For the parameters of the hash main network, for The constants between.

5. A person re-identification method based on hash encoding learning, characterized in that, Includes the following steps: S1. Data preparation: Obtain the training dataset, the base dataset, and the images to be queried; adjust the size of the pedestrian images. S2. Construct a dual-network architecture for pedestrian feature extraction, and build a hash main network and a momentum auxiliary network with completely identical structures. S3. Uncertainty estimation and loss function construction: Calculate bit-level uncertainty and image-level uncertainty, and construct the total loss function. The specific steps are as follows: S31. Calculating bit-level uncertainty for: ;in, , , Given a pedestrian image, ; S32, Calculate image-level uncertainty for: ;in, The dimension of the sample feature vector; S33. For pedestrian re-identification tasks, triplet embedding loss function for: ; in, 、 、 These represent the corresponding pedestrian images. eigenvectors, 、 、 This indicates the category label corresponding to the sample. and Same type and with Different categories, It is a constant. Triple loss function The weights are determined using adaptive weights based on uncertainty; therefore, Represented as: ,in, Representative sample Image-level uncertainty; S34. Bit-level quantization loss of hash encoding for: ;in, The dimension of the sample feature vector. It is a constant; , It is a symbolic function; The hash loss function is weighted individually for each hash bit; To maintain the hash master network With momentum auxiliary network Consistency, define the consistency loss function. for: , It is a constant; The uncertainty loss function based on deep hashing is: , Hash Main Network All learnable parameters are Momentum-assisted network All learnable parameters are During the backpropagation optimization process, Optimization is performed using backpropagation based on stochastic gradient descent. It will not participate in gradient descent updates, but will be updated through the momentum update formula: ,in, For one The constants between; S4: Model training, using a PK sampling strategy to extract training batches, and training and optimizing the hash main network and momentum auxiliary network; S5: Offline database construction, performing feature extraction, binarization processing, and storage on pedestrian images in the base database dataset; S6: Online retrieval, extracts features from the query image, binarizes it, calculates and sorts the Hamming distances between the image and pedestrian images in the database, and outputs the retrieval results.

6. The person re-identification method based on hash encoding learning as described in claim 5, characterized in that, The specific method for step S2 is as follows: Input pedestrian image Category label is , obtain features , The dimension of the sample feature vector. For the hash main network; the tanh activation function is: Its output Then hash main network Output Similarly, momentum-assisted networks Its network structure is similar to the hash main network. Completely identical, momentum-assisted network The output is .

7. The person re-identification method based on hash encoding learning as described in claim 5, characterized in that, The specific method for step S6 is as follows: S61. Perform offline feature extraction and database construction for all images in the base database, and construct the database for each pedestrian image in the base database. Input into the pre-trained hash master network In the middle, obtain the output of the hash main network. ; S62, targeting For each element, use a symbolic function. Binarization is performed, that is ,in, ;Will In compact binary form, soon The bit hash code is compressed and stored as follows: Each byte is stored in a dedicated hash database and linked to the corresponding pedestrian image tag. Alternatively, the storage location can be associated; S63. When performing an online query, a query image is provided. Similarly, a query hash code is generated: Use Hamming distance to calculate the query image. With each image in the database The similarity, i.e.: ; in, This is an indicator function, where a value of 1 is returned if the condition within the parentheses is true, and 0 is returned if the condition is false. In the system implementation, to achieve fast target retrieval, bitwise operations are used instead of floating-point operations to calculate the Hamming distance, and the hash code is... The value is determined by Mapped to Then calculate using the following formula. in, This represents the XOR operation. For counting function Population Count This is achieved by calling the CPU instruction set. S64. Sort the results from smallest to largest based on the calculated Hamming distance and output the sorting results.

8. An application of a pedestrian re-identification system based on hash coding learning, characterized in that: The pedestrian re-identification system based on hash coding learning as described in any one of claims 1-4 can be applied to the fields of intelligent monitoring, public safety, or personnel management.

Citation Information

Patent Citations

  • Pedestrian re-identification method and device based on deep Hash and computer system

    CN109871749A

  • Multi-level retrieval pedestrian re-identification method based on deep hash

    CN112818859A