Soft-attention person re-identification model, method, device and system based on reinforcement learning

By combining deep learning and reinforcement learning, the global and local features of pedestrian images are extracted, and feature mask weighted fusion is performed, which solves the problem of insufficient feature extraction in pedestrian re-identification, improves accuracy and efficiency, and is suitable for fields such as smart security and smart supermarkets.

CN116597502BActive Publication Date: 2025-09-19SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310220517.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2025-09-19
Estimated Expiration
2043-03-07

AI Technical Summary

Technical Problem

Existing pedestrian re-identification methods fail to extract sufficient features when dealing with factors such as perspective differences, resolution differences, posture differences, lighting changes, occlusions, and background clutter, resulting in the inability to improve re-identification accuracy.

Method used

Deep learning is used to extract the global features of pedestrian images, and reinforcement learning methods are used to extract local features. The local features are weightedly fused through the feature mask module. The lightweight model MobileNetV2 is used for feature extraction, and the model is trained by combining classification loss and ranking loss.

Benefits of technology

It improves the accuracy and efficiency of pedestrian re-identification, achieves more comprehensive utilization of pedestrian image features, shortens network training time, and supports fast retrieval and accurate identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116597502B_ABST
    Figure CN116597502B_ABST
Patent Text Reader

Abstract

The present invention provides a soft-attention pedestrian re-identification model, method, device and system based on reinforcement learning. The model and method include a primary feature extraction module, a local feature extraction module, a feature mask module, an advanced feature extraction module, a model training and testing method, and are intended to obtain more comprehensive and recognizable pedestrian feature information by combining global features extracted based on a lightweight model with local features extracted based on reinforcement learning. The device is an electronic device that can run the above-mentioned model code. The system combines the model with road monitoring equipment or wearable police law enforcement recorders, target detection algorithms, and multi-target tracking algorithms to form a pedestrian re-identification system. The above-mentioned model, method, device and system can comprehensively consider and utilize the global and local features of pedestrians, while improving performance, reducing the number of network parameters, thereby achieving rapid retrieval and accurate recognition of pedestrian images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to pedestrian re-identification technology, which belongs to the field of computer vision, and specifically refers to a soft-attention pedestrian re-identification model, method, device and system based on reinforcement learning. Background Art

[0002] Person re-identification (Person re-identification) is a technology that uses computer vision technology to determine whether a specific pedestrian exists in an image or video sequence. Specifically, given a monitored pedestrian image, it then retrieves the pedestrian image across devices. This aims to make up for the visual limitations of fixed cameras and can be widely used in smart security, smart search systems, smart supermarkets and other fields. In recent years, pedestrian re-identification technology has attracted widespread attention from researchers due to its academic value and application prospects. The goal of pedestrian re-identification is to establish a correspondence between human appearance features in images or videos captured by different cameras. However, the acquisition of pedestrian images is inevitably affected by factors such as lighting changes, posture changes, viewpoint changes, partial occlusion and surrounding clutter. These factors greatly hinder the improvement of re-identification performance.

[0003] Traditional person re-identification systems mostly rely on manual extraction of image features (such as texture and color). These systems primarily involve two stages: feature representation and distance measurement. These systems have limitations and struggle to handle variations in pose, background, lighting, and scale between people captured by different cameras. The emergence of deep learning, particularly convolutional neural networks (CNNs), has enabled person re-identification systems to jointly optimize feature extraction and classification through an end-to-end network framework. Deep learning methods not only overcome the difficulties of traditional methods in feature design but also provide representations that are more suitable for classification, significantly improving person re-identification performance. In recent years, the rapid development of reinforcement learning (RL) has provided new solutions to the problem. RL can adaptively adjust strategies, selecting valuable information for utilization and removing redundant or useless information to select the optimal strategy. Currently, reinforcement learning's main functions in person re-identification tasks include selecting appropriate video frames, extracting key features, finding optimal spatiotemporal context, selecting appropriate distance metrics, optimizing attention models, weighting image descriptors, and determining appropriate algorithms. These reinforcement learning-based person re-identification methods demonstrate that reinforcement learning can effectively improve the performance and efficiency of person re-identification, driving the development of re-identification technology. Therefore, using reinforcement learning to extract local features is of great scientific significance.

[0004] The current difficulties in pedestrian re-identification are mainly in the following aspects: 1) Perspective difference: Pedestrian re-identification is generally based on cross-camera tasks. Due to differences in camera placement and height, it is difficult to obtain pedestrian images with consistent perspectives; 2) Resolution difference: Different cameras have different models and parameters, so the resolution of the images taken varies; 3) Posture difference: The same pedestrian may appear in different postures at different times, such as walking, standing, and riding a bicycle; 4) Illumination change: Since the photography of pedestrians is a time-series process, the illumination intensity will vary in different time periods; 5) Occlusion problem: Due to the presence of obstacles, part of the pedestrian's body is invisible in the image, resulting in significant deviations in the feature information of the same pedestrian; 6) Background clutter: The same pedestrian may have large feature differences due to different backgrounds, while different pedestrians may have very small feature differences due to similar backgrounds. Existing pedestrian re-identification methods are generally designed to address the above difficulties, and mainly include the following categories of methods: pedestrian re-identification methods based on representation learning, metric learning, video sequence, local feature, and GAN-generated images.

[0005] Among the aforementioned methods, person re-identification methods based on local features have received widespread attention in the research community. In particular, methods that combine global and local features have achieved more significant results compared to methods based solely on global or local features. Local features can extract more effective information for re-identification by focusing on recognizable regions in the image, thereby improving network accuracy. Unlike existing methods that calculate global and local feature losses separately, the present invention weights global features with local features using feature masks to obtain global features of the person weighted by local features. This can more comprehensively establish the relationship between local and global features, addressing the common problem of existing models or methods that insufficiently consider pedestrian characteristics. Furthermore, to improve network training speed and retrieval efficiency, the present invention utilizes a lightweight model to process global features to increase computational speed and a reinforcement learning model to adaptively select key local regions in pedestrian images to enhance person re-identification performance. Therefore, the present invention has important practical significance in terms of both innovation and research value. Summary of the Invention

[0006] The present invention provides a soft-attention person re-identification model, method, device, and system based on reinforcement learning, aiming to address the problem of inadequate consideration and incomplete utilization of pedestrian features in existing person re-identification methods. The present invention uses deep learning to extract global features of pedestrian images, and reinforcement learning to extract local features of pedestrian images. The global and local features are then fused to form the final image features. Finally, the model is trained and tested using a combination of classification loss, reward value function, and ranking loss. The technical solutions adopted by the present invention are as follows:

[0007] A soft-attention person re-identification model based on reinforcement learning includes: a primary feature extraction module (Primary Network, PN), a local feature extraction module (Local Network, LN), a feature mask module (MaskModule, MM), and a senior feature extraction module (Senior Network, SN).

[0008] Among them, the primary feature extraction module is composed of convolutional layers, normalization layers and activation layers. Its function is to preprocess the input images, learn some low-level image representations, and provide data input for subsequent network modules.

[0009] The local feature extraction module primarily consists of a reinforcement learning environment module consisting of a position network and an LSTM network, and a reinforcement learning agent module consisting of an action network. Through iterative optimization between the agent and the environment, the module learns local image feature information. The position network takes the aforementioned low-level image representation as input, encodes the selected local region, and then generates the corresponding local feature vector. The LSTM network combines the local feature vectors obtained at the current and previous time steps to generate the environment state vector. The action network determines the optimal local region based on the current environment state and reward value. Therefore, the local feature extraction module can be considered a reinforcement learning module.

[0010] The feature mask module converts the local features into a feature mask and then performs weighted processing on the low-level features. This module receives the local features generated by the local feature extraction module and passes them through a transformer, which performs matrix transformations and exponential operations on the input local features to align their shape and size with the low-level features. The transformer then uses these transformations to reweight the low-level features and finally inputs the weighted low-level features into the high-level feature extraction module. Because this module can utilize more discriminative local pedestrian features to give higher attention to important discriminative areas in the low-level features, it can be considered a soft attention model.

[0011] The advanced feature extraction module learns a global pedestrian feature weighted by local features, thereby optimizing the final image feature representation. The input to this module is a blend of the features output by the primary feature extraction module and the feature mask module. The advanced feature extraction module consists of the inverted residual blocks, convolutional norm activation layer, and classifier from the MobileNetV2 network. MobileNetV2 is a very effective feature extractor commonly used for image classification, object detection, and image segmentation. Compared to ResNet, the most commonly used feature extractor for person re-identification, MobileNetV2 boasts a small number of parameters and fast training speed. ResNet's residual architecture first uses 1x1 convolution for dimensionality reduction and then increases the dimensionality, while MobileNetV2 increases the dimensionality first and then reduces the dimensionality. One of the key highlights of MobileNet is its use of a depthwise separable convolution architecture, which decomposes the standard convolution into depthwise convolution and pointwise convolution, significantly reducing the number of parameters and computational overhead. Therefore, the present invention adopts MobileNetV2 as the network framework for global feature extraction. However, if MobileNetV2 is used alone to extract the global features of the image, the local features that have a significant impact on the accuracy of pedestrian re-identification will be ignored; if local features are used alone, the contextual information contained in the global features will be lost. Therefore, the present invention splits MobileNetV2 into two parts, taking the weights of the local features into account at the end of the first part, and then using the second part for further feature extraction. This design can more completely and comprehensively utilize the important information in the image features, thereby improving the accuracy of pedestrian re-identification.

[0012] Model training is conducted in a phased, multi-task manner. First, the parameters of the primary network (PN) and the high-level network (SN) are initialized using the pre-trained weights of MobileNetV2 on ImageNet, and the parameters of the local network (LN) and feature mask module (MM) are randomly initialized. The first phase involves low-level feature learning: the parameters of the LN and MM are fixed, and the parameters of the PN and SN are updated based on the classification loss function. The second phase involves local feature learning: the parameters of the PN, MM, and SN are fixed, and the parameters of the LN are updated based on the reward function. The third phase involves global feature learning with weighted local features: the parameters of the PN and LN are fixed, and the parameters of the MM and SN are updated based on the classification and ranking loss functions.

[0013] A reinforcement learning-based soft-attention person re-identification device: An electronic device comprising a memory, at least one processor communicatively connected to the memory, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it is used to implement the reinforcement learning-based soft-attention person re-identification model and method; and a non-transitory computer-readable storage medium storing executable code, which, when executed by one or more processors, is used to implement the reinforcement learning-based soft-attention person re-identification model and method.

[0014] A soft-attention pedestrian re-identification system based on reinforcement learning. This system can combine the pedestrian re-identification model and device provided by the present invention with road monitoring equipment or wearable police law enforcement recorders, as well as target detection algorithms and multi-target tracking algorithms. Pedestrian images are first collected using road monitoring equipment or wearable police law enforcement recorders. The collected data is then subjected to real-time target detection and tracking using target detection algorithms such as the YOLO series, SSD series, or Fast-RCNN, as well as multi-target tracking algorithms. Finally, the detected pedestrian images are transmitted to the pedestrian re-identification device, where the model is used to quickly retrieve and accurately identify the target pedestrian.

[0015] Compared with the existing technology, the contributions and effects of the present invention are as follows: 1) The invention proposes a pedestrian re-identification model, method, device and system based on the reinforcement learning algorithm, which can not only improve the performance and efficiency of pedestrian re-identification, but also construct a pedestrian re-identification device and system to realize the application and expansion of the model in real life; 2) The invention adopts the lightweight model MobileNetV2 as the backbone network framework for feature extraction, reducing the number of network parameters, thereby greatly reducing the amount of calculation, shortening the network training time, and achieving fast retrieval; 3) The invention introduces a reinforcement learning model to adaptively extract the optimal local features in pedestrian images to improve the accuracy of pedestrian re-identification. 4) The invention weights local features to global features in the form of feature masks to achieve more comprehensive utilization of pedestrian image features. On the basis of ensuring the integrity of image information, it emphasizes more recognizable local information to improve recognition. 5) The model, method and device provided by the invention can be combined with road monitoring equipment or wearable police law enforcement recorders as well as target detection algorithms and multi-target tracking algorithms to achieve fast retrieval and accurate recognition of target pedestrians. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention and the implementation schemes in the related prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art.

[0017] Figure 1A flowchart of a pedestrian re-identification method provided by an embodiment of the present invention;

[0018] Figure 2 The overall framework principle diagram of the model provided by the embodiment of the present invention;

[0019] Figure 3 A schematic diagram of a local feature extraction module provided in an embodiment of the present invention;

[0020] Figure 4 A schematic diagram of a global feature extraction module provided in an embodiment of the present invention;

[0021] Figure 5 A schematic diagram of the model training process provided by an embodiment of the present invention;

[0022] Figure 6 A schematic diagram of computer functions provided by an embodiment of the present invention;

[0023] Figure 7 A schematic diagram of a person re-identification system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] Person re-identification aims to solve the problem of pedestrian image retrieval across multiple camera devices. Since the acquisition of pedestrian images will inevitably be affected by factors such as illumination changes, posture changes, viewpoint changes, partial occlusion and surrounding clutter, most current pedestrian re-identification models or methods have certain limitations in feature extraction. Specifically, the extraction of discriminative features in pedestrian images is insufficient and their utilization is incomplete, resulting in the inability to further improve the accuracy of pedestrian re-identification. Taking the above problems into account, an embodiment of the present invention provides a soft attention pedestrian re-identification method based on reinforcement learning. This method uses deep learning to extract global features of pedestrian images, uses reinforcement learning methods to extract local features of pedestrian images, and then fuses the global features and local features to form the final image features; finally, the classification loss, reward value function and ranking loss are combined to train and test the model. As Figure 1 As shown, the method includes the following steps:

[0025] S101, divide the pedestrian re-identification dataset into a training set and a test set in proportion;

[0026] S102, input the training set data into the primary feature extraction module to learn some low-level image representations;

[0027] S103, inputting the above low-level features into a local feature extraction module to learn some local feature information;

[0028] S104: Input the local features into a feature mask module to generate a feature mask, and fuse it with the low-level features;

[0029] S105: Input the above fusion features into the high-level feature extraction module to learn global feature information with local feature weighting;

[0030] S106: Input the test set data into the person re-identification model to test the model.

[0031] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention. Specific embodiment:

[0033] The following will be combined Figure 2-Figure 4 The specific structure of the pedestrian re-identification model in this invention is introduced.

[0034] Figure 2 This diagram shows the overall framework of the model provided by an embodiment of the present invention. The model in the figure primarily consists of four modules: PN, a primary feature extraction module; LN, a local feature extraction module; MM, a feature mask module; and SN, a high-level feature extraction module. The model takes a pedestrian image and its label as input and outputs a global feature vector weighted by local features.

[0035] Among them, the primary feature extraction module (PN) is composed of a convolutional layer (Convolutional Layer) with a convolution kernel size of 3×3 and a stride of 2, a batch normalization layer (Batch Normalization, BN) and an activation layer (ActivationLayer), such as Figure 4 As shown. Among them, the activation layer uses ReLU6, which can work well even when the mobile device uses float16 / int8 low precision, and also has the advantages of the ReLU function. The input of this module is a 3-channel RGB pedestrian picture, and the output is a 32-channel picture feature. After the input picture is processed by this module, its width and height are reduced to half of the original. The function of this module is mainly to preprocess the input picture, learn some low-level image representations (such as some corner features, texture features, etc.), and provide data input for subsequent network modules. The PN module is trained together with the SN module, and its training method follows the general classification network training method, which can be expressed as:

[0036]

[0037] In the formula, p represents the predicted value (activation output) output by the activation function; y is a one-hot code, which represents the label of the pedestrian image, that is, the expected output value (desired output); r represents the total number of categories in the dataset, that is, the output dimension of the activation layer.

[0038] Among them, the local feature extraction module (LN) is implemented by the reinforcement learning model, such as Figure 3 As shown in Figure 2. The function of the location network is to select the observed local region L based on the low-level features learned by the primary feature extraction module and convert the local region into a local feature vector f through the pooling layer. The LSTM network can combine the current local feature vector and previous historical vectors to generate sequential contextual information to adapt to changes in the environmental state caused by different local region selections, thereby continuously updating the environmental state. The LSTM calculation formula is as follows:

[0039]

[0040] f t ,i t ,c t ,o t ,h t Respectively represent the forget gate, input gate, the value of the memory unit in the current state, output gate and the output value of the LSTM unit at the current moment. t In this module, it refers to the current environment state. xf ,ω hf ,ω if ,ω hi ,ω xc ,ω hc ,ω xo ,ω ho is the weight parameter, b f ,b i ,b c ,b o is the bias, x t is the current input sequence, h t-1 is the output of the previous moment, σ is the sigmoid function, and outputs a value between 0 and 1.

[0041] The action network, i.e., the agent, consists of a fully connected layer and a position policy. According to the current input environment state, the agent can select the appropriate next observation position according to the position policy. Since the choice of action is random and continuous, the policy is defined by a Gaussian policy function with a fixed variance. Based on the above goals, in the iterative interaction between the agent and the environment, how to update the policy parameters to learn the optimal policy to obtain local area features in the reinforcement learning model is the key to achieving this function. In this invention, we use the policy gradient method to find the optimal policy. In reinforcement learning, the goal is to maximize the expected long-term cumulative reward value, so the gradient of the objective function and its parameter update formula can be described as:

[0042]

[0043]

[0044] Where α is the step size. π (s,a) represents choosing action a in state s and then following policy π θ The cumulative discounted reward return value of π θ (s,a) represents the policy function (policy).

[0045] Note t Represents the reward value at time t. The introduction of the reward value can guide the agent to select actions at each time step, thereby achieving the maximum cumulative reward. The reward value is derived based on a human-designed reward function. Therefore, the reward function designed by the present invention is as follows:

[0046]

[0047] Among them, a represents the target detection image, p and n represent the positive and negative samples that are the same and different from the pedestrians in the target image, respectively. and Represents the L2 distance between two pairs of images.

[0048] Among them, the feature mask module (MM) consists of a converter and a feature mask. The function of the converter is to perform corresponding matrix transformation and exponential operation on the input local features, and the feature mask is obtained after the local features pass through the converter. The input of this module is the local feature vector l of dimension n generated by LN, and the size of the low-level feature p generated by PN is h×w×c, where h, w, c represent the height, width and number of channels of the feature respectively. After passing through the converter, the above local feature vector l is first converted into an intermediate mask m' of dimension n'=h×w, as shown below:

[0049] m′=W T l (1.5) In the formula, m′∈R n′ is the intermediate mask vector, W∈R n×n′ is the transformation matrix in the transformer. The final feature mask m∈R h×w It is obtained by converting m′ into a size and shape consistent with the low-level feature p, and then performing an exponential operation on each element, as shown below:

[0050] m i,j =exp(m′ k ) (1.6)

[0051] After obtaining the feature mask m, it is fused with the low-level feature p as follows:

[0052] o k =p k *m st,k∈[1,c] (1.7)

[0053] Here, k represents the number of channels in p. Since the feature mask m is used to enhance and suppress local information in low-level features in the spatial dimension, this module performs the same masking operation on all channels in the low-level features and then inputs the processed low-level features into SN. Generally speaking, the discriminative features of pedestrians are scattered across different parts of the pedestrian, such as clothing, pants, hair, shoes, and accessories. MM can leverage more discriminative local features of pedestrians to give higher attention to important discriminative areas in low-level features. Therefore, this module can be considered a soft attention model.

[0054] Among them, the advanced feature extraction module (SN) contains 17 inverted residual blocks (InvertedResidual Blocks) in MobileNetV2, 1 convolutional standard activation layer (Conv Norm Activation Layer) and 1 classifier (Classifier), such as Figure 4As shown in the figure, the inverted residual block uses a depthwise separable convolution structure, which decomposes the standard convolution into depthwise convolution and pointwise convolution, significantly reducing the number of parameters and computation. The standard activation layer of the convolution consists of one convolutional layer, one batch normalization layer, and one activation layer. The classifier consists of one fully connected layer with dropout = 0.2. The input features of this module are the output features of the PN and MM, which are mixed together. The output is a feature vector with a dimension that matches the number of pedestrian IDs in the dataset. When training the SN, not only the classification loss but also the ranking loss should be considered. Common ranking loss functions used for person re-identification tasks include contrastive loss and triplet loss. Their goal is to maximize the distance between samples of the same class and maximize the distance between samples of different classes. They require images to be input in pairs or triplets. For large-scale person re-identification datasets, the number of such input combinations is enormous, and the computational cost is also high. In addition, this type of loss function will only constrain one network branch, and for the network with two branches, LN and SN, proposed in the present invention, it is not very practical. The function of the SN module in the present invention is to learn a global feature of pedestrians with local feature weighting. The reason for this design is that there is difference and complementarity between local features and global features. If the difference between the two can be expanded, more discriminative feature information that is complementary to the local features can be obtained in the final global feature learning, thereby optimizing the final image feature representation. In view of this, the present invention uses a cross-branch pairwise sorting loss function, the formula of which is as follows:

[0055]

[0056] Where m represents the boundary threshold, and are the predicted values ​​of the target label y by LN and SN respectively. This loss function uses the prediction result of one branch network as a reference. The other branch network needs to make a more accurate prediction than the first one, so as to mine more discriminative information. This loss function enables SN to use the features of LN as a reference, and makes SN's predicted value of the target label exceed LN's predicted value by at least m, making SN's prediction more accurate and reliable. In addition, this loss function is applied to different branches of the same image, so there are no special requirements for the input. Therefore, the final loss function of SN is composed of formula (1.1) and formula (1.7), and the formula is as follows:

[0057] L=L cls +γL rank (1.9)

[0058] Where γ represents the reconciliation parameter between classification loss and ranking loss.

[0059] The following describes a specific implementation of the pedestrian re-identification method of the present invention, including the following steps:

[0060] Step 1: Build the structure of the reinforcement learning-based soft person re-identification model, including modeling the primary feature extraction module, local feature extraction module, feature mask module, high-level feature extraction module, and training and testing parts;

[0061] Step 2: Obtain public person re-identification datasets. The datasets used in this paper are CUHK03, Market-1501, and DukeMTMC-reID, which were collected on the campuses of the Chinese University of Hong Kong, Tsinghua University, and Duke University, respectively.

[0062] Step 3: Divide the above dataset into training set and test set according to a certain ratio, and then input the training set images into the model for training. The specific process is as follows: Figure 5 As shown. First, use the pre-trained weights θ of MobileNetV2 on ImageNet o Parameters θ for PN and SN p and θ s Initialize the parameters θ of LN and MM l and θ m Perform random initialization; then perform low-level feature learning: fix the LN parameter θ l and the parameters θ of MM m , use formula (1.1) to train and update the parameters of PN and SN parameters The maximum number of training times is T p After the training is completed, the parameters of PN and SN are updated, that is, Next, local feature learning is performed: fix the parameters of PN MM parameter θ m and SN parameters Use formula (1.3) and formula (1.4) to train and update the parameters of LN The maximum number of training times is T l After the training is completed, the parameters of LN are updated, namely: Finally, global feature learning is performed: fix the parameters of PN and LN parameters Generate mask m using formulas (1.5) and (1.6) t , use formula (1.7) to perform mask operation on the output of LN, and use formula (1.1), formula (1.8) and formula (1.9) to train and update the parameters of MM and SN parameters After the training is completed, the parameters of MM and SN are updated, that is,

[0063] Step 4: Input the test set data into the model, calculate the rank-1, rank-5, rank-10 and mAP values ​​respectively, and record the experimental results.

[0064] Then, the specific content of the pedestrian re-identification device in the present invention will be introduced. The embodiment of the present invention provides a schematic diagram of the physical structure of an electronic device, such as Figure 6 As shown, the electronic device for person re-identification includes a memory, a processor, a communication bus, and a communication interface. The memory, processor, and communication interface are connected via a bus to facilitate communication between them. The memory stores a computer program that can be executed on the processor, and the processor implements the person re-identification method described in the present invention by calling the computer program.

[0065] In the embodiment of the present invention, the electronic device may be a desktop computer, a server, a smart phone, a wearable device, etc. Figure 6 The illustrated structure and relationships between its components are merely examples. Actual person re-identification devices may include, but are not limited to, those shown. The memory may be an internal storage unit of an electronic device, such as a hard drive or RAM, or an external storage device, such as a plug-in hard drive or flash memory card. The processor may be a central processing unit, a digital signal processor, or a field programmable gate array. The communication interface may be used to connect to other external devices or systems.

[0066] In addition, an embodiment of the present invention further provides a non-transitory computer-readable storage medium. When the executable computer code in the above-mentioned memory can be implemented as a software functional unit and used or sold as an independent product, a computer program can be stored in the storage medium. When the computer program is executed by the processor, it is used to implement the reinforcement learning-based soft attention pedestrian re-identification model and method. The non-transitory computer-readable storage medium can be a medium that can store code, such as a USB flash drive, random access memory, magnetic disk, or optical disk.

[0067] Finally, the specific content of the pedestrian re-identification system in this invention will be introduced. Figure 7As shown, the model and device provided by the present invention can be used in combination with road monitoring equipment or wearable police body cameras, as well as target detection algorithms and multi-target tracking algorithms. First, pedestrian images are collected using road monitoring equipment or wearable police body cameras. Then, target detection algorithms such as the YOLO series, SSD series, or Fast-RCNN, as well as multi-target tracking algorithms, are used to perform real-time target detection and tracking on the data collected by the monitoring equipment. Finally, the detected pedestrian images are transmitted to a pedestrian re-identification device, where the model is used to quickly retrieve and accurately identify the target pedestrian.

[0068] The above-described device of the embodiment of the invention is merely an illustrative example of the pedestrian re-identification solution proposed in the present invention and is not intended to limit the design of the device. Those skilled in the art should understand that even though the processes and details of each stage are described in detail in the embodiments of the present invention, those skilled in the art may still modify or replace the contents of the above-described technical solution with equivalents. The above-described modifications and replacements do not deviate the essence of the corresponding technical solution from the spirit and scope of the technical solution in the embodiments of the present invention.

Claims

1. A soft attention person re-identification model based on reinforcement learning, characterized by: Including primary feature extraction module, local feature extraction module, feature mask module and advanced feature extraction module; The primary feature extraction module is composed of a convolutional layer, a normalization layer, and an activation layer. Its function is to preprocess the input image and learn some low-level image representations. The local feature extraction module uses a reinforcement learning model to realize the pedestrian local feature extraction function. The module consists of three parts: a position network, a long short-term memory (LSTM) network, and an action network. The position network generates a local observation area based on the input low-level image representation and encodes it into a local feature vector. The LSTM network combines the currently observed local feature vector and the previous historical vector to construct the environment state. The action network selects the next local area position according to the current environment state and determines a series of optimal pedestrian local features through continuous iteration. The feature mask module consists of a converter and a feature mask. Its function is to convert local features into masks with the same shape and size as low-level features, and assign corresponding weights to the low-level features; the high-level feature extraction module is composed of an inverted residual block, a convolutional standard activation layer, and a classifier, and its function is to learn a global pedestrian feature with local feature weighting, thereby optimizing the final image feature representation; the parameters of the primary feature extraction network PN and the high-level feature extraction network SN are initialized using the pre-trained weights of the MobileNetV2 network on ImageNet, and the parameters of the local feature extraction network LN and the feature mask module MM are randomly initialized; first, the training set data is input into the soft attention pedestrian re-identification model; second, the parameters of LN and MM are fixed, and the parameters of PN and SN are trained and updated according to the classification loss function to perform low-level feature learning; Then, the parameters of PN, MM and SN are fixed, and the parameters of LN are updated according to the reward value function to perform local feature learning. Finally, the parameters of PN and LN are fixed, and the classification loss function and ranking loss function are combined to train and update the parameters of MM and SN to perform global feature learning with local feature weighting.

2. The soft attention person re-identification model based on reinforcement learning according to claim 1, characterized in that The recognition method includes the following steps: structuring a soft-attention person re-identification model based on reinforcement learning; obtaining a person re-identification dataset and dividing it into a training set and a test set in proportion; inputting the training set images into the model, and training the person re-identification model by combining a classification loss function, a reward value function, and a ranking loss function; finally, inputting the test set data into the model, completing the model test, and recording the results.

3. The soft attention person re-identification model based on reinforcement learning according to claim 2, characterized in that The training of the model is carried out in a staged, multi-task manner, and the primary feature extraction network, local feature extraction network, feature mask module and advanced feature extraction network are trained successively.

4. The soft attention person re-identification model based on reinforcement learning according to claim 3, characterized in that Input the test set data into the model, calculate the rank-1, rank-5, rank-10 and mAP values ​​respectively, and record the experimental results.

5. A soft attention pedestrian re-identification device based on reinforcement learning, characterized in that: The present invention comprises an electronic device comprising a memory, one or more processors communicatively connected to the memory, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the soft attention pedestrian re-identification model based on reinforcement learning according to any one of claims 1 to 4 is implemented.

6. The soft attention person re-identification device based on reinforcement learning according to claim 5, characterized in that: It also includes a non-transitory computer-readable storage medium storing executable code, which is used to implement the reinforcement learning-based soft attention pedestrian re-identification model described in any one of claims 1-4 when the one or more processors execute the executable code.

7. A soft attention person re-identification system based on reinforcement learning, characterized in that: Based on the reinforcement learning-based soft attention pedestrian re-identification model described in claim 1 and the reinforcement learning-based soft attention pedestrian re-identification device described in claim 5, it includes a soft attention pedestrian re-identification model and device, road monitoring equipment or wearable police law enforcement recorder, and target detection algorithm and multi-target tracking algorithm.

8. The soft attention person re-identification system based on reinforcement learning according to claim 7, characterized in that: The soft-attention pedestrian re-identification model and device are combined with road monitoring equipment or wearable police law enforcement recorders as well as target detection algorithms and multi-target tracking algorithms. The target detection algorithms and multi-target tracking algorithms are used to perform real-time target detection and tracking on the data collected by the monitoring equipment, and the detected pedestrian images are transmitted to the pedestrian re-identification device. The model is then used to achieve rapid retrieval and accurate identification of the target pedestrian.

Citation Information

Patent Citations

  • Pedestrian re-identification method and system

    CN113920477A

  • Convolutional mask-based visual feature learning device, acquisition device and storage medium

    CN114998671A