Pedestrian multi-target tracking and identification method and tracking and identification device
By using the FairMOT architecture, global attention convolution module and cross-layer feature pyramid structure Encoder-Decoder network in pedestrian multi-target tracking and recognition technology, combined with adaptive learning rate optimization and model quantization compression, we solve the problems in pedestrian multi-target tracking and recognition technology. It solves the problems of low accuracy and poor stability and achieves high-precision and strong stability tracking and recognition effects.
Patent Information
- Application Number
- CN202210581127.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-25
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-05-25
AI Technical Summary
Existing pedestrian multi-target tracking and recognition technology has problems of low accuracy and poor stability. Especially when pedestrians are active subjects in videos, their flexibility and changes in non-rigid contour features make model tracking and recognition low in accuracy, model convergence is poor, and tracking and recognition is difficult. Stability is weak.
Using the Encoder-Decoder network based on the FairMOT architecture, introducing the global attention convolution module GAConv and the cross-layer feature pyramid structure CLFPN, through the learning rate change strategy of adaptive loss attenuation and the AdamW optimizer, the network parameters are optimized to obtain high accuracy and stability The pedestrian multi-target tracking and recognition model is constructed, and the model is quantitatively compressed through hierarchical clustering and kmeans++ algorithm to obtain a lightweight tracking and recognition model.
It improves the accuracy and stability of pedestrian multi-target tracking and recognition, alleviates the over-fitting phenomenon in the early stage of the model, enhances the stability and convergence effect of the deep layers of the model, and achieves tracking and recognition with high accuracy and strong stability.
Smart Images

Figure CN114937239B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision technology, and in particular, relates to a pedestrian tracking and identification technology, and more particularly, to a pedestrian multi-target tracking and identification method and a tracking and identification device. Background Art
[0002] Relying on the continuous deepening of deep neural network research, various tasks in the field of computer vision have also made great progress. Among them, the tracking of multiple targets moving in the video is one of the important research directions. Among them, pedestrian multi-target tracking and recognition has been widely used in video surveillance, computer animation, virtual reality, human-computer interaction, intelligent transportation, etc. Therefore, it is very meaningful to conduct relevant research and analysis on pedestrian tracking technology.
[0003] In the prior art, a common method is to realize multi-target tracking in video through deep neural networks. The process is generally divided into two subtasks to solve: first, the detection results of one or more types of targets of interest in the video frame are quantitatively analyzed to determine the position of the target in the continuous time series; then, the target itself is re-identified and feature information is extracted to obtain the complete motion trajectory of the target.
[0004] Since the emergence of FairMOT (Fair Multi-Object Tracking, a reasonable multi-target tracking architecture), it has been widely used in the field of multi-target tracking. The Chinese patent application with publication number CN113034545A discloses a vehicle tracking method based on the CenterNet multi-target tracking algorithm. Based on the FairMOT framework, the HRnet network is used as the backbone network for target detection, and the attention mechanism is introduced to construct the target detection and re-identification network of FairMOT to achieve tracking of the target vehicle.
[0005] In the field of multi-target pedestrian tracking and recognition, pedestrians, as active subjects in videos, are more flexible when moving than vehicles. In addition, pedestrians are non-rigid bodies, and their contour features are constantly changing and difficult to extract. Therefore, the above-mentioned methods applied to vehicle tracking have problems such as low model tracking and recognition accuracy, poor model convergence, and weak tracking and recognition stability when applied to pedestrian tracking and recognition.
[0006] In view of this, there is an urgent need for a pedestrian multi-target tracking and recognition technology with high tracking and recognition accuracy and strong model convergence. Summary of the invention
[0007] The purpose of the present invention is to provide a method and device for tracking and identifying multiple pedestrians, so as to solve the technical problems of low accuracy and poor stability in the existing technology for tracking and identifying multiple pedestrians.
[0008] In order to solve the above technical problems, the pedestrian multi-target tracking and identification method provided by the present invention is implemented by adopting the following technical solutions:
[0009] A method for multi-target tracking and recognition of pedestrians, characterized in that the method includes a process of training a network using a training data set and obtaining a multi-target tracking and recognition model for pedestrians;
[0010] The process of training the network includes:
[0011] Obtain a training dataset containing multiple pedestrian targets;
[0012] The training data set is input into the Encoder-Decoder network based on the FairMOT architecture for feature extraction to obtain a multi-scale fusion feature map; in the Encoder-Decoder network, a global attention convolution module GAConv is used as the backbone network, and a cross-layer feature pyramid structure CLFPN is introduced to improve the backbone network;
[0013] Inputting the multi-scale fusion feature map into the target detection network and re-identification network of the FairMOT architecture to obtain the target and detection results;
[0014] Inputting the target and the detection result into the tracking network of the FairMOT architecture for tracking, and obtaining a trained pedestrian multi-target tracking and recognition model;
[0015] When the training data set is used to train the network, a method combining a learning rate change strategy with adaptive loss attenuation and AdamW is used to perform network parameter optimization, and the model after the network parameters converge is determined as the trained pedestrian multi-target tracking and recognition model.
[0016] In some embodiments of the present application, the method further comprises:
[0017] Obtaining the initial weights of each layer of the trained pedestrian multi-target tracking and recognition model;
[0018] Clustering the initial weights using a hierarchical clustering algorithm to obtain effective weights after clustering;
[0019] The effective weights are clustered and compressed using kmeans++ to obtain a quantized and compressed lightweight tracking and recognition model.
[0020] In some embodiments of the present application, the method further comprises a process of evaluating the model using a test data set;
[0021] The assessment process includes:
[0022] Get the original test dataset containing multiple pedestrian targets;
[0023] Performing image enhancement on the original test data set to obtain an enhanced test data set;
[0024] The enhanced test data set is used to evaluate the trained pedestrian multi-target tracking and recognition model and / or the lightweight tracking and recognition model to obtain a final tracking result.
[0025] In some embodiments of the present application, performing image enhancement on the original test data set to obtain an enhanced test data set includes:
[0026] The original test data set is subjected to image enhancement by using an adaptive histogram equalization method to obtain the enhanced test data set.
[0027] In some embodiments of the present application, the training data set and the original test data set are obtained by the following method:
[0028] Get multiple frames of images containing multiple pedestrian targets, mark the pedestrian ID, the coordinates of the upper left corner of the image, and the coordinates of the lower corner of the image on each frame, and obtain the labeled pedestrian dataset;
[0029] Convert the format of the annotated pedestrian data set to obtain a data file containing pedestrian ID, target center point coordinates, and target length and width;
[0030] Determine the data document and the annotated pedestrian dataset as a combined dataset;
[0031] The combined data set is divided into the training data set and the original test data set according to a set ratio.
[0032] In some embodiments of the present application, the training data set is input into an Encoder-Decoder network based on the FairMOT architecture for feature extraction to obtain a multi-scale fusion feature map, including:
[0033] Combining the global attention convolution module GAConv with the standard convolution module to extract the original feature map of the input data set;
[0034] The global attention convolution module GAConv is used to perform sequence encoding on the original feature map in two directions, the two encoded sequences are expanded and restored through the attention mechanism, and the two expanded and restored sequences are spliced to obtain a spliced sequence;
[0035] Superimposing the concatenated sequence with the original feature map to obtain a global attention weight;
[0036] The cross-layer feature pyramid structure CLFPN is connected after the backbone network, the importance of different input features is learned through the learnable global attention weight, and the multi-scale feature fusion is repeatedly applied from top to bottom and from bottom to top through cross-layer connection to obtain the multi-scale fusion feature map.
[0037] In some embodiments of the present application, the learning rate change strategy of the adaptive loss decay includes:
[0038] The learning rate is updated using the following update function:
[0039]
[0040] Among them, lr is the learning rate; and are the maximum and minimum values of the learning rate, respectively, and are the set values; T i is the current training round, is the change value; T cur is the round to reach the maximum learning rate, is the set value, is an exponential with base e, indicating the loss change rate, C loss is the loss difference between two adjacent training rounds, is the calculated value; T is the total number of training rounds, is the set value.
[0041] In order to solve the above technical problems, the pedestrian multi-target tracking and identification device provided by the present invention adopts the following technical solutions to achieve the above problems:
[0042] A pedestrian multi-target tracking and identification device, the device comprising:
[0043] A training data set acquisition module is used to acquire a training data set containing multiple pedestrian targets;
[0044] A feature extraction module is used to input the training data set into an Encoder-Decoder network based on the FairMOT architecture for feature extraction to obtain a multi-scale fusion feature map; in the Encoder-Decoder network, a global attention convolution module GAConv is used as the backbone network, and a cross-layer feature pyramid structure CLFPN is introduced to improve the backbone network;
[0045] A target and detection result acquisition module, used to input the multi-scale fusion feature map into the target detection network and re-identification network of the FairMOT architecture to obtain the target and detection results;
[0046] A trained pedestrian multi-target tracking and recognition model acquisition module is used to input the target and the detection result into the tracking network of the FairMOT architecture for tracking, so as to obtain a trained pedestrian multi-target tracking and recognition model;
[0047] The network parameter optimization module is used to perform network parameter optimization by combining a learning rate change strategy with adaptive loss attenuation and AdamW when training the network with the training data set. The model after the network parameters converge is determined as the trained pedestrian multi-target tracking and recognition model.
[0048] In some embodiments of the present application, the device further comprises:
[0049] The model quantization and compression module is used to obtain the initial weights of each layer of the trained pedestrian multi-target tracking and recognition model; cluster the initial weights using a hierarchical clustering algorithm to obtain the effective weights after clustering; and cluster and compress the effective weights using kmeans++ to obtain a quantized and compressed lightweight tracking and recognition model.
[0050] In some embodiments of the present application, the device further comprises:
[0051] The original test dataset module is used to obtain the original test dataset containing multiple pedestrian targets;
[0052] An image enhancement processing module is used to perform image enhancement on the original test data set to obtain an enhanced test data set;
[0053] The model evaluation module is used to evaluate the trained pedestrian multi-target tracking and recognition model and / or the lightweight tracking and recognition model using the enhanced test data set to obtain a final tracking result.
[0054] Compared with the prior art, the advantages and positive effects of the present invention are:
[0055] The pedestrian multi-target tracking and identification method and tracking and identification device provided by the present invention adopt a global attention convolution module GAConv as the backbone network of the Encoder-Decoder network based on the FairMOT architecture, and introduce a cross-layer feature pyramid structure CLFPN to improve the backbone network, fuse the multi-level features extracted by the backbone network, obtain a high-resolution feature map, effectively solve the multi-scale detection problem, and thus improve the accuracy of the tracking and identification model; when training the network, a learning rate change strategy combining an adaptive loss attenuation and AdamW is used to perform network parameter optimization, alleviate the overfitting phenomenon in the initial stage of the model, and improve the deep stability and convergence effect of the model; thereby, high precision and strong stability performance of pedestrian multi-target tracking are achieved.
[0056] After reading the specific embodiments of the present invention in conjunction with the accompanying drawings, other features and advantages of the present invention will become more clear. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0058] Figure 1 It is a flow chart of an embodiment of a method for multi-target tracking and identification of pedestrians of the present invention;
[0059] Figure 2 It is a principle block diagram of another embodiment of the pedestrian multi-target tracking and identification method of the present invention;
[0060] Figure 3 yes Figure 2 The structural diagram of the GAConv network in ;
[0061] Figure 4 yes Figure 2 Structure diagram of CLFPN in the figure;
[0062] Figure 5 It is a flowchart of another embodiment of the method for multi-target tracking and identification of pedestrians of the present invention;
[0063] Figure 6 It is a structural schematic diagram of an embodiment of a pedestrian multi-target tracking and identification device of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments.
[0065] It should be noted that the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0066] In order to solve the technical problems of low accuracy and poor stability in the existing pedestrian multi-target tracking and recognition technology, the present invention creatively proposes a tracking and recognition technology suitable for pedestrian multi-target tracking. Multi-scale fusion feature maps are extracted through a network composed of a global attention convolution module GAConv and a cross-layer feature pyramid structure CLFPN. Network parameter optimization is performed by combining a learning rate change strategy with adaptive loss attenuation and AdamW (Adam W optimizer), thereby improving the accuracy and stability of the pedestrian multi-target tracking and recognition model.
[0067] Figure 1The figure shows a flow chart of an embodiment of the method for multi-target tracking and identification of pedestrians of the present invention. The method for multi-target tracking and identification of pedestrians includes a process of training a network using a training data set and obtaining a multi-target tracking and identification model for pedestrians. This embodiment is a method flow chart for implementing the process.
[0068] like Figure 1 As shown, this embodiment adopts the following process to train the network using the training data set and obtain the pedestrian multi-target tracking and recognition model.
[0069] Step 11: Obtain a training dataset containing multiple pedestrian targets.
[0070] The tracking and recognition network model of this embodiment is based on the FairMOT architecture, and accordingly, the training data set adopts the MOT (Multi-Object Tracking) data set format. The training data set can be obtained by directly calling from the existing pedestrian multi-target MOT data sample library, or by collecting videos and / or pictures containing pedestrian multi-targets and then processing them to produce a data set. This embodiment does not specifically limit the method for obtaining the training data set.
[0071] Step 12: Input the training data set into the Encoder-Decoder network for feature extraction to obtain a multi-scale fusion feature map.
[0072] The Encoder-Decoder network is an Encoder-Decoder network based on the FairMOT architecture. In the Encoder-Decoder network, the global attention convolution module GAConv is used as the backbone network to obtain the image feature map. The cross-layer feature pyramid structure CLFPN is introduced to improve the backbone network, and the multi-level features obtained by the backbone network are fused to obtain a high-resolution multi-scale fused feature map, which effectively solves the multi-scale detection problem.
[0073] Step 13: Input the multi-scale fusion feature map into the target detection network and re-identification network to obtain the target and detection results.
[0074] Specifically, the multi-scale fusion feature map obtained in step 12 is input into the target detection network and re-identification network based on the FairMOT architecture to detect and re-identify the target, and obtain the target and detection results containing the target position and re-identification category information.
[0075] Step 14: Input the target and detection results into the tracking network for tracking to obtain the trained pedestrian multi-target tracking and recognition model.
[0076] Specifically, the target and detection results obtained in step 13 are input into a tracking network based on the FairMOT architecture for tracking, thereby obtaining a pedestrian multi-target tracking and recognition model trained with a training data set.
[0077] When using the training data set to train the network based on the FairMOT architecture, the network parameter optimization is performed by combining the learning rate change strategy with adaptive loss attenuation and AdamW. The model after the network parameters converge is determined as the trained pedestrian multi-target tracking and recognition model. The learning rate change strategy with adaptive loss attenuation is adopted. According to the loss change, the learning rate is first increased to the initial learning rate with a smaller learning rate, and then decayed to a smaller learning rate when there is no significant change in the loss. This alleviates the phenomenon of overfitting the model to the mini-batch in the early stage and maintains the deep stability of the model. The AdamW method is then combined to optimize the network parameters, iteratively update the optimizer weights, and select the search method to further improve the learning stability and model convergence effect.
[0078] In some other embodiments, the learning rate change strategy of adaptive loss decay includes:
[0079] The learning rate is updated using the following update function:
[0080]
[0081] Among them, lr is the learning rate; and are the maximum and minimum values of the learning rate, respectively, and are the set values; T i is the current training round, is the change value; T cur is the round to reach the maximum learning rate, is the set value, is an exponential with base e, indicating the loss change rate, C loss is the loss difference between two adjacent training rounds, is the calculated value; T is the total number of training rounds, is the set value. After setting the initial learning rate, during the network training process, the above update function is used to update the learning rate to avoid falling into the local optimum and improve the deep stability and convergence effect of the model.
[0082] Figure 2 A principle block diagram of another embodiment of the method for multi-target pedestrian tracking and recognition of the present invention is shown, specifically, a principle block diagram of an embodiment of using a training data set to train a network and obtain a multi-target pedestrian tracking and recognition model.
[0083] In this embodiment, the data set 21 is used as a training data set and adopts the MOT data set format.
[0084] The Encoder-Decoder network 22 is based on the FairMOT architecture and is composed of a global attention convolution module GAConv as the backbone network. For example, GA-DLA34 (Global attention-Deep Layer Aggregation), GA-ResNet50 (Global attention-ResNet50), etc. are used as the backbone network.
[0085] The structure diagram of the GAConv network is as follows Figure 3 As shown. In the backbone network composed of the global attention convolution module GAConv, the standard convolution module is used to extract the original feature map of the input data set 21. Then, GAConv is used to obtain the global attention weight: the first step (step 1) is to encode the original feature map in both width and height directions. The second step (step 2) is to expand and restore the two encoded sequences through the attention mechanism to achieve a reasonable weight distribution; then the two expanded and restored sequences are spliced to obtain the spliced sequence; finally, the spliced sequence is superimposed with the original feature map to finally obtain the global attention weight. Figure 3 In , N represents the number of feature maps, M represents the number of feature map channels, H represents the feature map height, and W represents the feature map width.
[0086] The Encoder-Decoder network 22 also introduces a cross-layer feature pyramid structure CLFPN to improve the backbone network. The structure of CLFPN is as follows: Figure 4 As shown. Figure 4 In , P3-P7 represent feature maps of different scales output by the backbone network, and Repeated Blocks represent repeatable modules, indicating that CLFPN can be followed by multiple Repeated Blocks. In order to alleviate the local bias caused by upsampling and downsampling and improve the efficiency of feature fusion, based on the following optimization, we obtain Figure 4 The CLFPN network shown in the figure: First, on the basis of PANet (Path Aggregation Network), BiFPN (Bidirectional Feature Pyramid Network) is added to the same-level cross-layer connection, and each bidirectional path is used as a repeatable module (Repeated Blocks) to achieve more advanced feature fusion. Second, in each repeatable module, cross-layer connections between different levels are added, including top-down and bottom-up connections.
[0087] Therefore, by connecting the cross-layer feature pyramid structure CLFPN after the backbone network, the importance of different input features is learned through the learnable global attention weights. At the same time, through cross-layer connections, top-down and bottom-up multi-scale feature fusion are repeatedly applied to solve the multi-scale detection problem, and finally a multi-scale fusion feature map is obtained.
[0088] The multi-scale fusion feature map extracted by the Encoder-Decoder network 22 is divided into four branches, three of which are input into the target detection network 231 for target detection; and the other branch is input into the re-identification network 232 for re-identification.
[0089] The target detection network 231 includes a heatmap, a center offset, and a detection box bbox size. The detection process, the loss function used in each module, etc. are implemented using existing technologies. The recognition process and the loss function used in the re-identification network 232 are also implemented using existing technologies.
[0090] After the joint training of the target detection network 231 and the re-identification network 232, the target and detection results containing the target position and re-identification category information are obtained, and then input into the tracking network composed of the Kalman filter module 241 and the Hungarian matching module 242. The Kalman filter module 241 is used to solve the cost matrix, predict the position of the tracker at the next moment, and then the predicted position is updated based on the detection result. Finally, the Hungarian algorithm is used to match the detection result with the tracking prediction result information to achieve target tracking. Other specific implementation processes of tracking are implemented using existing technologies.
[0091] To facilitate the terminal deployment of the pedestrian multi-target tracking and recognition model, the pedestrian multi-target tracking and recognition model obtained after training is usually compressed to obtain a lightweight tracking and recognition model.
[0092] Figure 5 A flowchart of another embodiment of the method for multi-target pedestrian tracking and recognition of the present invention is shown. Specifically, it is a flowchart of an embodiment of compressing a trained multi-target pedestrian tracking and recognition model to obtain a lightweight tracking and recognition model.
[0093] like Figure 5 As shown, this embodiment adopts the following process to obtain a lightweight tracking and recognition model:
[0094] Step 31: Obtain the initial weights of each layer of the trained pedestrian multi-target tracking and recognition model.
[0095] Step 32: Cluster the initial weights using a hierarchical clustering algorithm to obtain effective weights after clustering.
[0096] Since the initial weights of each layer of the model are too many and invalid, a hierarchical clustering algorithm is first used to cluster the initial weights to screen out larger effective weights. The specific implementation principle and clustering implementation process of the hierarchical clustering algorithm are implemented using existing technologies.
[0097] Step 33: Use kmeans++ (k-means algorithm) to cluster and compress the effective weights to obtain a quantized and compressed lightweight tracking and recognition model.
[0098] By clustering and compressing the effective weights through kmeans++, a compressor of the model in storage space is realized. The calculation rate of the compressed lightweight tracking and recognition model is significantly improved, which is convenient for deployment on the terminal side and improves the real-time and effectiveness of tracking and identifying pedestrian targets using the pedestrian multi-target tracking and recognition model.
[0099] In some other embodiments, the method for multi-target pedestrian tracking and recognition further includes a process of evaluating the model using a test data set. The evaluation of the model may include evaluating the trained multi-target pedestrian tracking and recognition model or evaluating the performance of the lightweight tracking and recognition model.
[0100] The specific evaluation process includes:
[0101] Obtain an original test data set containing multiple pedestrian targets. Similar to the training data set, the original test data set uses the MOT data set format. The original test data set can be obtained by directly calling from an existing pedestrian multi-target MOT data sample library, or by collecting videos and / or pictures containing multiple pedestrian targets and then processing them to produce a data set.
[0102] The original test data set is image enhanced to obtain an enhanced test data set. By performing pre-processing of image enhancement on the original test data set, the disturbance caused by factors such as lighting and deformation during data acquisition is alleviated, and the robustness of the model in harsh environments is improved. In some embodiments, the original test data set is image enhanced by using an adaptive histogram equalization method to obtain an enhanced test data set, thereby alleviating the impact of lighting on the image and improving detection accuracy. The specific method of image enhancement by using an adaptive histogram equalization method is implemented using existing technology.
[0103] The enhanced test dataset is used to evaluate the trained pedestrian multi-target tracking and recognition model and / or lightweight tracking and recognition model to obtain the final tracking results.
[0104] In some other embodiments, the training data set and the original test data set are obtained by collecting videos and / or pictures containing multiple pedestrian targets and then processing them. The specific acquisition process is as follows:
[0105] Get multiple frames of images containing multiple pedestrian targets, annotate the pedestrian ID, the coordinates of the upper left corner of the image, and the coordinates of the lower corner of the image on each frame, and obtain the annotated pedestrian dataset. Get multiple frames of images containing multiple pedestrian targets. Specifically, you can use a camera to shoot pedestrian videos in various scenes and angles, and crop the videos into continuous single-frame images. Considering that the accuracy of target tracking is closely related to the quality of the dataset, when shooting, fully consider pedestrian videos in various scenes and angles to improve the robustness of the model.
[0106] According to the MOT dataset format, the annotated pedestrian dataset is converted to obtain a data file containing pedestrian ID, target center point coordinates, and target length and width.
[0107] The data document and the annotated pedestrian dataset are determined as a combined dataset.
[0108] The combined data set is divided into a training data set and an original test data set according to a set ratio. In some embodiments, the set ratio is 8:2, and the combined data set is divided into a training data set and an original test data set according to a ratio of 8:2, which are used for subsequent model training and performance evaluation, respectively.
[0109] Figure 6 A schematic structural diagram of an embodiment of a pedestrian multi-target tracking and identification device of the present invention is shown.
[0110] like Figure 6 As shown, the tracking and identification device of this embodiment includes structural units, functions of the structural units and the relationship between them, which are specifically as follows:
[0111] Tracking and identification devices include:
[0112] The training data set acquisition module 41 is used to acquire a training data set containing multiple pedestrian targets.
[0113] The feature extraction module 42 is used to input the training data set obtained by the training data set acquisition module 41 into the Encoder-Decoder network based on the FairMOT architecture for feature extraction to obtain a multi-scale fusion feature map. In the Encoder-Decoder network, the global attention convolution module GAConv is used as the backbone network, and the cross-layer feature pyramid structure CLFPN is introduced to improve the backbone network.
[0114] The target and detection result acquisition module 43 is used to input the multi-scale fusion feature map obtained by the feature extraction module 42 into the target detection network and re-identification network of the FairMOT architecture to obtain the target and detection results.
[0115] The trained pedestrian multi-target tracking and recognition model acquisition module 44 is used to input the targets and detection results acquired by the target and detection result acquisition module 43 into the tracking network of the FairMOT architecture for tracking, so as to obtain the trained pedestrian multi-target tracking and recognition model.
[0116] The network parameter optimization module 45 is used to perform network parameter optimization by combining the learning rate change strategy of adaptive loss attenuation and AdamW when training a network based on the FairMOT architecture using a training data set. The model after the network parameters converge is determined as the trained pedestrian multi-target tracking and recognition model.
[0117] The pedestrian multi-target tracking and identification device of the above structure runs the corresponding software program and performs the corresponding functions according to Figure 1 The pedestrian multi-target tracking and identification method embodiment and the process of the embodiment are used to obtain the pedestrian multi-target tracking and identification model, so as to achieve the same Figure 1 The corresponding technical effects of the embodiment and other embodiments.
[0118] In some other embodiments, the pedestrian multi-target tracking and identification device may further include:
[0119] The model quantization and compression module is used to obtain the initial weights of each layer of the trained pedestrian multi-target tracking and recognition model; cluster the initial weights using a hierarchical clustering algorithm to obtain the effective weights after clustering; and cluster and compress the effective weights using kmeans++ to obtain a quantized and compressed lightweight tracking and recognition model. Thus, a lightweight tracking and recognition model that is easy to deploy on the terminal side is obtained, which improves the real-time performance and effectiveness of tracking and recognizing pedestrian targets.
[0120] In some other embodiments, the pedestrian multi-target tracking and identification device may further include the following structural units for implementing model performance evaluation:
[0121] The original test dataset module is used to obtain the original test dataset containing multiple pedestrian targets.
[0122] The image enhancement processing module is used to perform image enhancement on the original test data set to obtain an enhanced test data set.
[0123] The model evaluation module is used to evaluate the trained pedestrian multi-target tracking and recognition model and / or lightweight tracking and recognition model using the enhanced test data set to obtain the final tracking result.
[0124] The pedestrian multi-target tracking and identification devices of the above-mentioned structures run the corresponding software programs, execute the corresponding functions, and perform performance optimization of pedestrian multi-target tracking and identification according to the corresponding embodiments of the above-mentioned pedestrian multi-target tracking and identification methods, thereby achieving the corresponding technical effects of the method embodiments.
[0125] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for a person skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions claimed to be protected by the present invention.
Claims
1. A method for tracking and identifying multiple pedestrians, characterized in that: The method includes the process of using a training data set to train a network and obtain a pedestrian multi-target tracking and recognition model; The process of training the network includes: Obtain a training dataset containing multiple pedestrian targets; The training data set is input into the Encoder-Decoder network based on the FairMOT architecture for feature extraction to obtain a multi-scale fusion feature map; in the Encoder-Decoder network, a global attention convolution module GAConv is used as the backbone network, and a cross-layer feature pyramid structure CLFPN is introduced to improve the backbone network; Inputting the multi-scale fusion feature map into the target detection network and re-identification network of the FairMOT architecture to obtain the target and detection results; Inputting the target and the detection result into the tracking network of the FairMOT architecture for tracking, and obtaining a trained pedestrian multi-target tracking and recognition model; When the training data set is used to train the network, a method combining a learning rate change strategy with adaptive loss attenuation and AdamW is used to perform network parameter optimization, and the model after the network parameters converge is determined as the trained pedestrian multi-target tracking and recognition model.
2. The method for multi-target pedestrian tracking and identification according to claim 1, characterized in that: The method further comprises: Obtaining the initial weights of each layer of the trained pedestrian multi-target tracking and recognition model; Clustering the initial weights using a hierarchical clustering algorithm to obtain effective weights after clustering; The effective weights are clustered and compressed using kmeans++ to obtain a quantized and compressed lightweight tracking and recognition model.
3. The method for multi-target pedestrian tracking and identification according to claim 2, characterized in that: The method also includes the process of evaluating the model using a test data set; The assessment process includes: Get the original test dataset containing multiple pedestrian targets; Performing image enhancement on the original test data set to obtain an enhanced test data set; The enhanced test data set is used to evaluate the trained pedestrian multi-target tracking and recognition model and / or the lightweight tracking and recognition model to obtain a final tracking result.
4. The method for multi-target pedestrian tracking and identification according to claim 3, characterized in that: Performing image enhancement on the original test data set to obtain an enhanced test data set includes: The original test data set is subjected to image enhancement by using an adaptive histogram equalization method to obtain the enhanced test data set.
5. The method for multi-target pedestrian tracking and identification according to claim 3, characterized in that: The training data set and the original test data set are obtained by the following method: Get multiple frames of images containing multiple pedestrian targets, mark the pedestrian ID, the coordinates of the upper left corner of the image, and the coordinates of the lower corner of the image on each frame, and obtain the labeled pedestrian dataset; Convert the format of the annotated pedestrian data set to obtain a data file containing pedestrian ID, target center point coordinates, and target length and width; Determine the data document and the annotated pedestrian dataset as a combined dataset; The combined data set is divided into the training data set and the original test data set according to a set ratio.
6. The method for multi-target pedestrian tracking and identification according to claim 1, characterized in that: The training data set is input into the Encoder-Decoder network based on the FairMOT architecture for feature extraction to obtain a multi-scale fusion feature map, including: Combining the global attention convolution module GAConv with the standard convolution module to extract the original feature map of the input data set; The global attention convolution module GAConv is used to perform sequence encoding on the original feature map in two directions, the two encoded sequences are expanded and restored through the attention mechanism, and the two expanded and restored sequences are spliced to obtain a spliced sequence; Superimposing the concatenated sequence with the original feature map to obtain a global attention weight; The cross-layer feature pyramid structure CLFPN is connected after the backbone network, the importance of different input features is learned through the learnable global attention weight, and the multi-scale feature fusion is repeatedly applied from top to bottom and from bottom to top through cross-layer connection to obtain the multi-scale fusion feature map.
7. The method for multi-target pedestrian tracking and identification according to claim 1, characterized in that: The learning rate change strategy of the adaptive loss decay includes: The learning rate is updated using the following update function: Among them, lr is the learning rate; and are the maximum and minimum values of the learning rate, respectively, and are the set values; T i is the current training round, is the change value; T cur is the round to reach the maximum learning rate, is the set value, is an exponential with base e, indicating the loss change rate, C loss is the loss difference between two adjacent training rounds, is the calculated value; T is the total number of training rounds, is the set value.
8. A pedestrian multi-target tracking and identification device, characterized in that: The device comprises: A training data set acquisition module is used to acquire a training data set containing multiple pedestrian targets; A feature extraction module is used to input the training data set into an Encoder-Decoder network based on the FairMOT architecture for feature extraction to obtain a multi-scale fusion feature map; in the Encoder-Decoder network, a global attention convolution module GAConv is used as the backbone network, and a cross-layer feature pyramid structure CLFPN is introduced to improve the backbone network; A target and detection result acquisition module, used to input the multi-scale fusion feature map into the target detection network and re-identification network of the FairMOT architecture to obtain the target and detection results; A trained pedestrian multi-target tracking and recognition model acquisition module is used to input the target and the detection result into the tracking network of the FairMOT architecture for tracking, so as to obtain a trained pedestrian multi-target tracking and recognition model; The network parameter optimization module is used to perform network parameter optimization by combining a learning rate change strategy with adaptive loss attenuation and AdamW when training the network with the training data set. The model after the network parameters converge is determined as the trained pedestrian multi-target tracking and recognition model.
9. The pedestrian multi-target tracking and identification device according to claim 8, characterized in that: The device also includes: The model quantization and compression module is used to obtain the initial weights of each layer of the trained pedestrian multi-target tracking and recognition model; cluster the initial weights using a hierarchical clustering algorithm to obtain the effective weights after clustering; and cluster and compress the effective weights using kmeans++ to obtain a quantized and compressed lightweight tracking and recognition model.
10. The pedestrian multi-target tracking and identification device according to claim 9, characterized in that: The device also includes: The original test dataset module is used to obtain the original test dataset containing multiple pedestrian targets; An image enhancement processing module is used to perform image enhancement on the original test data set to obtain an enhanced test data set; The model evaluation module is used to evaluate the trained pedestrian multi-target tracking and recognition model and / or the lightweight tracking and recognition model using the enhanced test data set to obtain a final tracking result.
