Multi-target registration method and device based on multistage matching and depth features, and medium

Extracting deep features through a deep convolutional neural network and combining it with a multi-level matching algorithm solves the problem of low target detection and matching accuracy in complex scenes, achieves more efficient target tracking and registration, and improves robustness in complex scenes. performance and application value.

CN118735970APending Publication Date: 2024-10-01CASCO SIGNAL LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410747212.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-11
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

In complex multi-target tracking scenarios, the traditional similarity method based on pixel features is difficult to effectively represent the similarity between targets, resulting in low target detection and matching accuracy, especially in the face of illumination changes, weather effects, dense pedestrians, etc. When factors are predicted, feature extraction loses reliability.

Method used

Using a method based on multi-level matching and deep features, the deep appearance features of the target are extracted through a deep convolutional neural network, the cosine softmax loss function and the center loss function are used to optimize feature extraction, and the location and appearance similarity are calculated by combining Mahalanobis distance and cosine similarity. degree, perform cascade matching and GIOU Hungarian matching to improve registration accuracy.

Benefits of technology

It improves the accuracy and robustness of matching detection results with existing target trajectories in target tracking scenarios, enhances registration capabilities in complex scenarios, and has important application value in fields such as passenger flow analysis and driverless driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735970A_ABST
    Figure CN118735970A_ABST
Patent Text Reader

Abstract

The invention relates to a multi-target registration method and device based on multistage matching and depth features and a medium, and the method comprises the following steps: S1, calculating distance features and depth appearance features according to an input target detection result set and a target tracking trajectory set; s2, calculating a similarity matrix of the detection and the trajectory; and S3, performing multi-stage matching of detection and tracks to obtain a final unmatched track / detection pair and a successfully matched track, and forming a target registration result. Compared with the prior art, the method has the advantages of accurate matching, stable matching and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision technology, and in particular to a multi-target registration method, device and medium based on multi-level matching and depth features. Background Art

[0002] As one of the core technologies in passenger flow prediction, behavior analysis and unmanned driving, multi-target tracking is gradually attracting people's attention. After a long period of technical accumulation, multi-target tracking has begun to be widely used in the fields of traffic safety, virtual reality and unmanned driving, and has shown great potential. Target tracking technology has been applied to actual production and life, bringing convenience to people and improving the quality of life. As the basic work in the field of computer vision, with the rapid development of deep learning and convolutional neural networks, target tracking algorithms based on deep learning have been widely used in actual production and life, and have made significant progress and development in various application fields.

[0003] In traditional multi-target tracking research, actual road conditions are usually used as training scenarios, and multi-target tracking algorithms are designed and optimized in typical tracking scenarios. However, there are many unavoidable problems in actual tracking scenarios, and optimization is required for various practical problems. In the multi-target tracking model registration stage, traditional similarity methods based on pixel features are difficult to effectively represent the similarity between targets, because complex video scenes may have problems such as occlusion or lighting changes. To address these problems, it is necessary to find a more effective similarity calculation method. This is also a hot issue that needs to be solved in the field of pedestrian analysis and autonomous driving.

[0004] In multi-target tracking tasks, there are various unpredictable factors in the actual tracking scene, such as illumination changes, weather effects, or dense pedestrians. Traditional image registration methods use Harris point features, Canny line features, and region segmentation surface features, which only rely on the pixels of the image itself for feature calculation. Therefore, when faced with such complex scenes, the features calculated by traditional feature extraction methods will lose their reliability, making the complex registration environment a challenge for such common feature extraction methods.

[0005] After searching, Chinese invention patent publication number CN114596343A discloses a cross-modal remote sensing image intelligent multi-scale registration method for complex ground scenes, which belongs to the field of aerospace remote sensing image processing and computer vision technology. The method includes the following steps: the first step is to extract feature maps of multiple resolutions from the optical image and SAR image to be registered, respectively, to obtain their respective feature pyramids; the second step is to sequentially perform feature map selection, determine the matching range, construct a matching body, and calculate the regional similarity score within the matching range; the third step is to perform cross-modal remote sensing data representation difference robust similarity score calculation, enhance cross-modal alignable areas, and suppress inter-modal difficult-to-align areas; the filtered regional similarity scores are fused in the spatial dimension, and the best matching position is calculated; the fourth step is to traverse the feature pyramid starting from the lowest scale feature map, repeat the second and third steps until the highest scale feature map of the pyramid. This existing patent has the problem of low accuracy of target detection matching in complex scenes.

[0006] After searching, the Chinese invention patent publication number CN116993779A discloses a vehicle target tracking method suitable for surveillance video, including the following steps: S1. Improve the backbone network structure of the joint detection and tracking model TransCenter, and use the convolution structure to build an attention module; S2. Improve the feature fusion network of the joint detection and tracking model TransCenter, and use the matrix decomposition model to build a multi-scale feature fusion network; S3. Design a multi-feature multi-level vehicle target matching algorithm; S4. Train the joint vehicle target detection and tracking model on the public vehicle target tracking dataset UA-DETRAC; S5. Use the trained model to track the vehicle target under the surveillance video. This existing patent has the problems of missed detection, false detection, and low matching accuracy.

[0007] How to achieve accurate and stable matching between detected targets and existing target trajectories in multi-target tracking scenarios has become a technical problem that needs to be solved. Summary of the invention

[0008] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a multi-target registration method, device and medium based on multi-level matching and depth features.

[0009] The purpose of the present invention can be achieved by the following technical solutions:

[0010] According to one aspect of the present invention, a multi-target registration method based on multi-level matching and depth features is provided, the method comprising the following steps:

[0011] Step S1, calculating distance features and depth appearance features according to the input target detection result set and target tracking trajectory set;

[0012] Step S2, calculating the similarity matrix of detection and trajectory;

[0013] Step S3, perform multi-level matching of detection and trajectory, obtain the final unmatched trajectory and detection pairs and matching successful trajectory, and form a target registration result.

[0014] Preferably, the process of calculating the distance feature and the depth appearance feature comprises the following steps:

[0015] Step S11, designing a feature extractor and building a deep appearance feature module using a deep convolutional neural network;

[0016] Step S12, using the cosine softmax loss function to calculate the loss of the model;

[0017] Step S13, using the central loss function to calculate the loss of the model;

[0018] Step S14, using the cosine softmax loss function and the center loss function to calculate the comprehensive loss function, and perform back propagation and training of the model.

[0019] More preferably, the deep appearance feature module includes a first convolutional layer, a second convolutional layer, maximum pooling, a first residual block, a second residual block, a third residual block, a fourth residual block, a fifth residual block, a sixth residual block, a fully connected layer, L2 normalization and loss calculation.

[0020] More preferably, the loss calculation of the model using the cosine softmax loss function is specifically as follows:

[0021] Enter the appearance data as Where N is the number of appearance data images. The cosine softmax classifier needs to perform L2 normalization on the output of the L layer. The cosine softmax is calculated using the following formula:

[0022]

[0023] Among them, y i ∈{1,...,C} is the set of all data labels in the dataset, w is the weight parameter of the corresponding label category, r i =f(x) is the posterior probability of category k, is the normalized weight of the connection weight between the fully connected layer and the L layer, and k is a free scaling parameter;

[0024] The cosine softmax loss function uses the cross entropy loss L c_sf Perform the calculation:

[0025]

[0026] Among them, L c_sf is the cosine softmax loss function, h j is the network feature output, C is the classification category, and N is the number of samples.

[0027] More preferably, the loss calculation of the model using the center loss function is specifically as follows: the center loss function is calculated as follows:

[0028]

[0029] Among them, L cl is the center loss function, c yi For the yth i The center value of all deep features of the class, x i is the input image feature, N b is the size of the batch data.

[0030] More preferably, the comprehensive loss function is specifically: combining the cosine softmax loss function and the center loss function, the comprehensive loss function is defined as follows:

[0031] L total =L c_sf +γL cl (h,y i )

[0032] Where γ is a scalar, L c_sf is the cosine softmax loss function, L cl is the center loss function, y i is the category, and h is the network feature output.

[0033] More preferably, the back propagation and training of the model are specifically as follows:

[0034] When the model starts training, the center loss function randomly generates a class center for each class in the network, and calculates the distance between the feature center and the class center in each batch of training; then this distance is added to the class center for parameter correction. If the distance between the feature center and the class center in a certain category is greater than the set threshold, the calculation is performed by penalizing the update of the class center. The specific formula is as follows:

[0035]

[0036] in, is the feature center, x i is the cluster center, y i is the category, Δc j is the change of feature center;

[0037] When category y iWith feature center When the corresponding categories are inconsistent, the category y is not updated i The feature center When category y i With feature center When the corresponding categories are consistent, update the category y i The feature center

[0038] Preferably, the process of calculating the similarity matrix between detection and trajectory comprises the following steps:

[0039] Step S21, calculating the position similarity between the target and the detected position;

[0040] Step S22, calculating the appearance similarity between the target and the detection;

[0041] Step S23, using the position similarity and the appearance similarity to weightedly calculate the comprehensive similarity, and obtain a similarity matrix between the detection set and the trajectory set.

[0042] More preferably, the calculation of the position similarity between the target and the detected position is specifically as follows: the position similarity d is calculated using the Mahalanobis distance (1) (i,j), the calculation formula is as follows:

[0043]

[0044] Among them, d j represents the jth test result; y i represents the i-th predicted position, S i represents the covariance of d and y in the current metric space; S i The higher the uncertainty of , the larger its inverse covariance matrix;

[0045] The indicator corresponding to the position metric is calculated using the following formula:

[0046]

[0047] in, is the position similarity indicator, d (1) (i,j) is the position similarity calculated using Mahalanobis distance, t (1) is the threshold value;

[0048] When the corresponding position similarity calculated using the Mahalanobis distance is less than the threshold, it is considered that the corresponding target i and detection j are matched successfully, otherwise the match fails.

[0049] More preferably, the calculated appearance similarity between the target and the detected object is specifically:

[0050] The formula for calculating the appearance similarity between the target and the detection is as follows:

[0051]

[0052] in, Indicates the cosine similarity between the target and the detection. represents the cosine distance between the two, r j represents the characteristic trace corresponding to the jth detection, R K It is a feature vector library of confirmed trajectories, specifically defined as

[0053] Finally, the value with the minimum cosine distance is taken as the similarity between detection j and trajectory i;

[0054] The indicator corresponding to the appearance similarity is calculated as follows:

[0055]

[0056] in, is the appearance similarity indicator, t (2) is the threshold value,

[0057] The calculated appearance similarity d (2) (i,j) and threshold t (2) If the appearance similarity is less than the threshold, it is considered that the target i and the detection j are matched successfully.

[0058] More preferably, the position similarity and the appearance similarity are weighted to calculate the comprehensive similarity, and the similarity matrix between the detection set and the trajectory set is obtained as follows:

[0059] The comprehensive similarity a for cascade matching is calculated by weighting the position similarity and appearance similarity. i,j , the calculation formula is as follows:

[0060] a i,j =λd (1) (i,j)+(1-λ)d (2) (i,j)

[0061] Among them, λ is a hyperparameter with a value of λ∈[0,1], a i,j represents the comprehensive similarity calculated between detection j and trajectory i, and defines the similarity matrix A between detection and trajectory:

[0062]

[0063] Among them, a ij represents the similarity between the i-th target and the j-th detection, a ij It is calculated by weighting position similarity and appearance similarity.

[0064] Preferably, the multi-stage matching of detection and trajectory includes sequentially performing cascade matching and GIOU-based Hungarian matching.

[0065] More preferably, the cascade matching comprises the following steps:

[0066] Step S31, inputting a confirmed trajectory prediction result set, a current frame detection result set and a trajectory maximum life cycle;

[0067] Step S32, calculating the similarity matrix between the trajectory and the detection;

[0068] Step S33, calculating the correlation matrix between the trajectory and the detection;

[0069] Step S34, initializing a set of successfully matched trajectories and a set of unsuccessfully matched trajectories;

[0070] Step S35, selecting trajectories according to the existence time of the trajectories from small to large and performing the following loop operation, wherein the loop operation is specifically as follows: for a trajectory, performing GIOU-based Hungarian matching on the trajectory according to the similarity matrix and the association matrix, if the match is successful, assigning the trajectory to the set of successful matching trajectories; otherwise, assigning the trajectory to the set of unsuccessful matching trajectories;

[0071] Step S36, until all trajectories are traversed, a set of successfully matched trajectories and a set of unmatched successful detections are output.

[0072] More preferably, the GIOU-based Hungarian matching includes the following steps:

[0073] Step S41, inputting an unmatched trajectory prediction result set, an unmatched detection result set and a GIOU matching success threshold;

[0074] Step S42, calculating the similarity matrix between the unmatched trajectory and the unmatched detection;

[0075] Step S43, calculating the correlation matrix between the unmatched trajectories and the unmatched detections;

[0076] Step S44, initializing a set of successfully matched trajectories, a set of unmatched successfully matched trajectories, and a set of unmatched successfully matched detections;

[0077] Step S45, calculating the correlation matrix based on GIOU for each unmatched trajectory and unmatched detection, if the correlation matrix is ​​less than the GIOU matching success threshold, it is considered that the match is successful, otherwise, it is judged that the match is unsuccessful;

[0078] Step S46, obtaining the target registration result, namely, the matched successful trajectory, the unmatched successful trajectory set, and the unmatched successful detection set.

[0079] More preferably, the GIOU calculation process is specifically as follows: the generalized intersection-over-union ratio calculation formula of the detection box and the prediction box is:

[0080]

[0081] Among them, A is the predicted box area of ​​the target, B is the detection box area, and C is the minimum rectangular box area that can contain both the detection box and the predicted box.

[0082] According to a second aspect of the present invention, there is provided an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the method described above is implemented when the processor executes the program.

[0083] According to a third aspect of the present invention, there is provided a computer-readable storage medium having a computer program stored thereon, wherein the program implements the method described above when executed by a processor.

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

[0085] 1. The present invention adopts a deep neural network to extract target features, performs similarity calculation on the corresponding target deep features, and uses a variety of related methods such as cosine softmax loss function and center loss function to optimize the feature extraction network, laying a solid foundation for the subsequent target alignment link.

[0086] 2. The present invention uses deep fusion features to optimize the target registration method, considers the influence of target position factors to calculate the comprehensive similarity, and uses a multi-level matching scheme to align cascade matching with the Hungarian matching method based on Generalized IoU (GIOU) to prevent the missed detection problem that may be caused by a single matching algorithm.

[0087] 3. The present invention introduces deep features in the calculation of target similarity, and uses extended intersection-over-union ratio for secondary matching after cascade matching. The proposed multi-level matching scheme improves the robustness of the registration algorithm.

[0088] 4. The multi-target registration method of the present invention has important application value in fields such as passenger flow analysis, behavior modeling and unmanned driving. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] Figure 1 It is a schematic diagram of the process of the multi-object registration method in the present invention;

[0090] Figure 2 It is a schematic diagram of the process of calculating the distance feature and the depth appearance feature in the present invention;

[0091] Figure 3Schematic diagram of the structure of the depth appearance feature module in the present invention;

[0092] Figure 4 A schematic diagram of the process of calculating the similarity matrix between detection and trajectory in the present invention;

[0093] Figure 5 It is a schematic diagram of the process of cascade matching in the present invention;

[0094] Figure 6 It is a schematic diagram of the process of GIOU matching in the present invention. DETAILED DESCRIPTION

[0095] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0096] The present invention uses a deep neural network to extract target features, calculates the similarity of the corresponding target deep features, and uses a variety of related methods such as the center loss function to optimize the feature extraction network. On this basis, the present invention also adopts the idea of ​​multi-level matching to improve the accuracy of target matching, thereby obtaining a more effective registration model. The present invention significantly improves the matching accuracy of detection results with existing targets during target tracking and trajectory generation in complex scenarios, and has important application value in passenger flow analysis, behavior modeling, unmanned driving and other fields.

[0097] In order to solve the problem of poor registration effect using traditional features in complex scenes, the present invention focuses on how to effectively design a universal image feature, selects the deep fusion feature to optimize the target registration method, considers the influence of the target position factor to calculate the comprehensive similarity, and uses a multi-level matching scheme to align the cascade matching with the Hungarian matching method based on the generalized IoU (GIOU) to prevent the missed detection problem that may be caused by a single matching algorithm. Deep features are introduced in the calculation of target similarity, and the extended IoU is used for secondary matching after the cascade matching. The proposed multi-level matching scheme improves the robustness of the registration algorithm.

[0098] This embodiment relates to a multi-target registration method based on multi-level matching and depth features, such as Figure 1 As shown, the method comprises the following steps:

[0099] Step S1, calculating distance features and depth appearance features according to a target detection result set and a target tracking trajectory set input in a current frame.

[0100] Step S2, calculate the similarity matrix of detection and trajectory.

[0101] Step S3, performing multi-level matching, wherein the multi-level matching includes cascade matching and GIOU matching, obtaining the final unmatched track / detection pair and the matched successful track, and forming the target registration result.

[0102] The calculated distance features and depth appearance features in step S1 are as follows: Figure 2 As shown, the specific steps are as follows:

[0103] Step S11, design a dedicated feature extractor, use a deep convolutional neural network to build a deep appearance feature module, the composition of the deep appearance feature module is as follows Figure 3 As shown, it includes convolution layer 1, convolution layer 2, maximum pooling 3, residual blocks 4 to 9, full connection layer 10, L2 normalization, cosine softmax loss calculation and center loss calculation.

[0104] The network parameters of each layer structure are shown in the following table:

[0105]

[0106]

[0107] Step S12, use the cosine softmax loss function to calculate the model loss. The input appearance data is Where N is the number of appearance data images.

[0108] The cosine softmax classifier needs to perform L2 normalization on the output of the L layer to ensure that the feature vector r is of unit length. The cosine softmax is calculated using the following formula:

[0109]

[0110] Among them, y i ∈{1,...,C} is the set of all data labels in the dataset, w is the weight parameter of the corresponding label category, r i =f(x) is the posterior probability of category k (i.e. the output of the deep network), is the normalized weight of the connection weight between the fully connected layer and the L layer, and k is a free scaling parameter, taking a value between 1 and 10.

[0111] The cosine softmax loss function uses the cross entropy loss L c_sf Perform the calculation:

[0112]

[0113] In the above formula, L sfis the cosine softmax loss function, h is the network feature output, C is the classification category, and N is the number of samples.

[0114] Step S13, using the central loss function to calculate the loss of the model.

[0115] The goal of using the cosine softmax loss function is to make the targets in the same category closer while ensuring that the target features between different categories are farther apart. However, in actual road condition videos, the postures of different action targets will show various differences due to problems such as angle changes, which makes the differences within the same category may be greater than the gap between classes. In view of this situation, using only the cosine softmax loss function for model training may result in the distance of the obtained target features within the same category not being compact. The present invention adopts the center loss function, combines it with the cosine softmax loss function, and trains the feature extractor network on the corresponding data to enhance the feature extraction capability of the network.

[0116] When calculating the center loss function Lcl, not only the distance between classes is included, but also the reduction of intra-class differences is considered. The specific calculation is as follows:

[0117]

[0118] in, For the yth i The center value of all deep features of the class, x i is the input image feature, N b is the batch size (Batch Size).

[0119] Step S14, using the cosine softmax loss function and the center loss function to calculate the comprehensive loss function, and perform back propagation and training of the model.

[0120] When the model starts training, the center loss function randomly generates a center for each class in the network and calculates the distance between the feature center and the class center in each batch of training. This distance is then added to the class center for parameter correction. If the distance between the sample feature in a certain category and the class center feature is greater than the set threshold, it is necessary to calculate by penalizing the class center update method. The specific formula is as follows,

[0121]

[0122] in, is the feature center, x i is the cluster center, y i is the category, Δc j is the change of feature center;

[0123] When category y i With feature center When the corresponding categories are inconsistent, the category y is not updated i The feature center When category y i With feature center When the corresponding categories are consistent, update the category y i The feature center

[0124] The cosine softmax loss function L c_sf With the center loss function L cl Combined with deep features, the judgment ability is improved. c_sf Keep the deep features of different categories dispersed, L cl Achieve intra-class clustering and compact the deep features of the same category. Compared with the traditional cross entropy loss function, the use of a comprehensive loss function can make the extracted features have better discriminative ability while maintaining intra-class compactness and inter-class dispersion. Use the scalar γ to balance the two loss functions. The final definition of the comprehensive loss function is as follows,

[0125] L total =L c_sf +γL cl (h,y i )

[0126] Where γ is a scalar with a value of [0,1.0]; L c_sf is the cosine softmax loss function, L cl is the center loss function, y i is the category, and h is the network feature output.

[0127] The above is a partial optimization of the appearance feature extractor in the original model. The bounding box obtained by target detection and motion prediction is calculated through the feature extractor of the corresponding category to obtain the feature vector, which is then used together with cascade matching and other methods to complete the subsequent target registration function.

[0128] In step S2, the similarity matrix between detection and trajectory is calculated, such as Figure 4 , the specific steps are as follows:

[0129] Step S21, using Mahalanobis distance to calculate the position similarity:

[0130] Choose to use Mahalanobis Distance instead of Euclidean distance to calculate location similarity:

[0131]

[0132] Among them, d j represents the jth test result; y i represents the i-th predicted position, which is predicted by the particle filter module for the i-th confirmed trajectory; S i It represents the covariance of d and y in the current metric space, which expresses the uncertainty of the target position to a certain extent.

[0133] Therefore, the significance of using the Mahalanobis distance here is to add the uncertainty of the target distribution to the position metric, S i The higher the uncertainty of , the larger its inverse covariance matrix.

[0134] The indicator corresponding to the position metric is calculated as follows:

[0135]

[0136] In the formula, Here, it is used as a position similarity indicator. The formula compares the calculated Mahalanobis distance with the chi-square distribution. When the corresponding Mahalanobis distance is less than the threshold t (1) , then it is considered that the corresponding target i matches the detection j successfully.

[0137] Step S22, calculate the appearance similarity between the target and the detection:

[0138] Calculate the method of calculating the appearance similarity between the target and the detection,

[0139]

[0140] Indicates the cosine similarity between the target and the detection. represents the cosine distance between the two, r j represents the feature trace corresponding to the jth detection. The model also maintains a feature vector library R for each confirmed trajectory. K , specific definition Where L k =100, and finally the value with the minimum cosine distance is taken as the similarity between detection j and trajectory i.

[0141] The indicator corresponding to the appearance similarity is calculated as follows:

[0142]

[0143] in, Here, as an appearance similarity indicator, the formula calculates the appearance similarity d (2) (i,j) and threshold t (2) If the appearance similarity is less than the threshold, it is considered that the target i and the detection j are matched successfully.

[0144] Step S23, using the position similarity and the appearance similarity to weightedly calculate the comprehensive similarity, and obtain a similarity matrix between the detection set and the trajectory set.

[0145] The comprehensive similarity used for cascade matching is obtained by weighted calculation of position similarity and appearance similarity.

[0146] a i,j =λd (1) (i,j)+(1-λ)d (2) (i,j)

[0147] Where λ is a hyperparameter, and its value is λ∈[0,1]. i,j represents the calculated comprehensive similarity between detection j and trajectory i, and defines the similarity matrix A between detections and trajectories used in the registration method:

[0148]

[0149] where a ij represents the similarity between the i-th target and the j-th detection, a ij It is calculated by weighting position similarity and appearance similarity.

[0150] In step S3, multi-level matching includes cascade matching and GIOU matching:

[0151] In order to avoid the missed detection problem of traditional technology, the IOU information between the trajectory and the detection is used to perform a new round of matching, forming a multi-level matching processing solution.

[0152] First, cascade matching is performed, such as Figure 5 As shown,

[0153] Step S31, input the confirmed trajectory prediction result set T = {1, ..., N}, the current frame detection result set D = {1, ..., M}, and the maximum trajectory lifetime AGEmax;

[0154] Step S32, calculate the similarity matrix C between the trajectory and the detection i,j},

[0155] Step S33, calculate the correlation matrix B between the trajectory and the detection = {b i,j},

[0156] Step S34: Initialize the set of successfully matched trajectories Initialize the unmatched set U←D,

[0157] Step S35, to obtain the matching successful trajectory M and the unmatched successful detection combination U, calculate the following loop operation,

[0158] For n∈{1,……,AGEmax}do

[0159] Select the trajectory according to the trajectory existence time AGE from small to large, T n ←{i∈T|a i =n}

[0160] {x i,j}←Hungarian matching (C,T n ,U)

[0161] M←M∪{(i,j)|b i,j ·x i,j >0}, update the set of matching successful trajectories;

[0162] U←U\{j|∑ i b i,j ·x i,j >0}, update the unmatched trajectory set;

[0163] End For

[0164] Step S36, outputting a set M of successfully matched trajectories and a set U of unsuccessfully matched detections.

[0165] Secondly, GIOU (Hungarian) matching is performed on unmatched tracks and unmatched frames, such as Figure 6 As shown:

[0166] Step S41, input the unmatched trajectory prediction result set T = {1, ..., N}, the unmatched frame detection result set D = {1, ..., M}, and the GIOU matching success threshold t

[0167] Step S42, calculate the similarity matrix C between the trajectory and the detection = {GIOU(T,D)}

[0168] Step S43, calculate the correlation matrix B between the trajectory and the detection = {b i,j}

[0169] Step S44: Initialize the set of successfully matched trajectories Initialize the unmatched trajectory set U t ←{T′|T′∈T,GIOU T′,j = 0}, initialize the unmatched detection set U d ←{D′|D′∈D,GIOU i,D′ =0}

[0170] Step S45, to obtain the unmatched trajectory set U t And the unmatched successful detection set U d, calculate the following loop operations

[0171] For i,j∈{TU t ,DU d}do

[0172] IFB(i,j) <tTHENM←M∪{(i,j)}

[0173] ELSEU t ←U t ∪{i},U d ←U d ∪{i}

[0174] END IF

[0175] End For

[0176] The correlation matrix is ​​calculated for each unmatched trajectory and unmatched frame detection. If the correlation matrix is ​​less than the GIOU matching success threshold t, the match is considered successful, otherwise, it is judged to be unmatched.

[0177] Step S46, return the matched trajectory M and the unmatched trajectory set U t , unmatched detection set U d .

[0178] In the above steps, the calculation process of GIOU is as follows: Assuming that the area of ​​the target prediction box is A, the area of ​​the detection box is B, and the area of ​​the smallest rectangular box that can contain both the detection box and the prediction box is C, the generalized intersection-union ratio of the two boxes is calculated as follows:

[0179]

[0180] The electronic device of the present invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in a read-only memory (ROM) or loaded from a storage unit into a random access memory (RAM). In the RAM, various programs and data required for device operation can also be stored. The CPU, ROM and RAM are connected to each other via a bus. An input / output (I / O) interface is also connected to the bus.

[0181] Multiple components in the device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.

[0182] The processing unit performs the various methods and processes described above, such as methods S1 to S3, S11 to S14, S21 to S23, S31 to S36, S41 to S46. For example, in some embodiments, methods S1 to S3, S11 to S14, S21 to S23, S31 to S36, S41 to S46 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the CPU, one or more steps of methods S1 to S3, S11 to S14, S21 to S23, S31 to S36, S41 to S46 described above may be executed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1-S3, S11-S14, S21-S23, S31-S36, S41-S46 in any other appropriate manner (for example, by means of firmware).

[0183] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0184] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code can be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.

[0185] In the context of the present invention, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0186] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A multi-target registration method based on multi-level matching and deep features, characterized in that: The method comprises the following steps: Step S1, calculating distance features and depth appearance features according to the input target detection result set and target tracking trajectory set; Step S2, calculating the similarity matrix of detection and trajectory; Step S3, perform multi-level matching of detection and trajectory, obtain the final unmatched trajectory and detection pairs and matching successful trajectory, and form a target registration result.

2. According to claim 1, a multi-target registration method based on multi-level matching and deep features is characterized in that: The process of calculating the distance feature and the depth appearance feature comprises the following steps: Step S11, designing a feature extractor and building a deep appearance feature module using a deep convolutional neural network; Step S12, using the cosine softmax loss function to calculate the loss of the model; Step S13, using the central loss function to calculate the loss of the model; Step S14, using the cosine softmax loss function and the center loss function to calculate the comprehensive loss function, and perform back propagation and training of the model.

3. The multi-target registration method based on multi-level matching and deep features according to claim 2, characterized in that: The deep appearance feature module includes a first convolutional layer, a second convolutional layer, a maximum pooling, a first residual block, a second residual block, a third residual block, a fourth residual block, a fifth residual block, a sixth residual block, a fully connected layer, L2 normalization and loss calculation.

4. The multi-target registration method based on multi-level matching and deep features according to claim 2, characterized in that: The loss calculation of the model using the cosine softmax loss function is specifically as follows: Enter the appearance data as Where N is the number of appearance data images. The cosine softmax classifier needs to perform L2 normalization on the output of the L layer. The cosine softmax is calculated using the following formula: Among them, y i ∈{1,...,C} is the set of all data labels in the dataset, w is the weight parameter of the corresponding label category, r i =f(x) is the posterior probability of category k, is the normalized weight of the connection weight between the fully connected layer and the L layer, and k is a free scaling parameter; The cosine softmax loss function uses the cross entropy loss L c_sf Perform the calculation: Among them, L c_sf is the cosine softmax loss function, h j is the network feature output, C is the classification category, and N is the number of samples.

5. The multi-target registration method based on multi-level matching and deep features according to claim 2, characterized in that: The loss calculation of the model using the center loss function is specifically as follows: The center loss function is calculated as follows: Among them, L cl is the center loss function, c yi For the yth i The center value of all deep features of the class, x i is the input image feature, N b is the size of the batch data.

6. The multi-target registration method based on multi-level matching and deep features according to claim 2, characterized in that: The comprehensive loss function is specifically: combining the cosine softmax loss function and the center loss function, the comprehensive loss function is defined as follows: L total =L c_sf +γL cl (h,y i ) Where γ is a scalar, L c_sf is the cosine softmax loss function, L cl is the center loss function, y i is the category, and h is the network feature output.

7. The multi-target registration method based on multi-level matching and deep features according to claim 6, characterized in that: The back propagation and training of the model are specifically as follows: When the model starts training, the center loss function randomly generates a class center for each class in the network, and calculates the distance between the feature center and the class center in each batch of training; then this distance is added to the class center for parameter correction. If the distance between the feature center and the class center in a certain category is greater than the set threshold, the calculation is performed by penalizing the update of the class center. The specific formula is as follows: Among them, c yi is the feature center, x i is the cluster center, y i is the category, Δc j is the change of feature center; When category y i With characteristic center c yi When the corresponding categories are inconsistent, the category y is not updated i The feature center When category y i With feature center When the corresponding categories are consistent, update the category y i The feature center 8. The multi-target registration method based on multi-level matching and deep features according to claim 1, characterized in that: The process of calculating the similarity matrix of detection and trajectory includes the following steps: Step S21, calculating the position similarity between the target and the detected position; Step S22, calculating the appearance similarity between the target and the detection; Step S23, using the position similarity and the appearance similarity to weightedly calculate the comprehensive similarity, and obtain a similarity matrix between the detection set and the trajectory set.

9. The multi-target registration method based on multi-level matching and deep features according to claim 8, characterized in that: The calculation of the position similarity between the target and the detected position is specifically as follows: the position similarity d is calculated using the Mahalanobis distance (1) (i,j), the calculation formula is as follows: Among them, d j represents the jth test result; y i represents the i-th predicted position, S i represents the covariance of d and y in the current metric space; S i The higher the uncertainty of , the larger its inverse covariance matrix; The indicator corresponding to the position metric is calculated using the following formula: in, is the position similarity indicator, d (1) (i,j) is the position similarity calculated using Mahalanobis distance, t (1) is the threshold value; When the corresponding position similarity calculated using the Mahalanobis distance is less than the threshold, it is considered that the corresponding target i and detection j are matched successfully, otherwise the match fails.

10. The multi-target registration method based on multi-level matching and deep features according to claim 8, characterized in that: The calculation target and the detected appearance similarity are specifically: The formula for calculating the appearance similarity between the target and the detection is as follows: in, Indicates the cosine similarity between the target and the detection. represents the cosine distance between the two, r j represents the characteristic trace corresponding to the jth detection, R K It is a feature vector library of confirmed trajectories, specifically defined as Finally, the value with the minimum cosine distance is taken as the similarity between detection j and trajectory i; The indicator corresponding to the appearance similarity is calculated as follows: in, is the appearance similarity indicator, t (2) is the threshold value, The calculated appearance similarity d (2) (i,j) and threshold t (2) If the appearance similarity is less than the threshold, it is considered that the target i and the detection j are matched successfully.

11. The multi-target registration method based on multi-level matching and deep features according to claim 8, characterized in that: The position similarity and appearance similarity are weighted to calculate the comprehensive similarity, and the similarity matrix between the detection set and the trajectory set is obtained as follows: The comprehensive similarity a for cascade matching is calculated by weighting the position similarity and appearance similarity. i,j , the calculation formula is as follows: a i,j =λd (1) (i,j)+(1-λ)d (2) (i,j) Among them, λ is a hyperparameter with a value of λ∈[0,1], a i,j represents the comprehensive similarity calculated between detection j and trajectory i, and defines the similarity matrix A between detection and trajectory: Among them, a ij represents the similarity between the i-th target and the j-th detection, a ij It is calculated by weighting position similarity and appearance similarity.

12. The multi-target registration method based on multi-level matching and deep features according to claim 1, characterized in that: The multi-level matching of detection and trajectory includes sequentially performed cascade matching and GIOU-based Hungarian matching.

13. The multi-target registration method based on multi-level matching and deep features according to claim 12, characterized in that: The cascade matching comprises the following steps: Step S31, inputting a confirmed trajectory prediction result set, a current frame detection result set and a trajectory maximum life cycle; Step S32, calculating the similarity matrix between the trajectory and the detection; Step S33, calculating the correlation matrix between the trajectory and the detection; Step S34, initializing a set of successfully matched trajectories and a set of unsuccessfully matched trajectories; Step S35, selecting trajectories according to the existence time of the trajectories from small to large and performing the following loop operation, wherein the loop operation is specifically as follows: for a trajectory, performing GIOU-based Hungarian matching on the trajectory according to the similarity matrix and the association matrix, if the match is successful, assigning the trajectory to the set of successful matching trajectories; otherwise, assigning the trajectory to the set of unsuccessful matching trajectories; Step S36, until all trajectories are traversed, a set of successfully matched trajectories and a set of unmatched successful detections are output.

14. The multi-target registration method based on multi-level matching and deep features according to claim 12, characterized in that: The GIOU-based Hungarian matching includes the following steps: Step S41, inputting an unmatched trajectory prediction result set, an unmatched detection result set and a GIOU matching success threshold; Step S42, calculating the similarity matrix between the unmatched trajectory and the unmatched detection; Step S43, calculating the correlation matrix between the unmatched trajectories and the unmatched detections; Step S44, initializing a set of successfully matched trajectories, a set of unmatched successfully matched trajectories, and a set of unmatched successfully matched detections; Step S45, calculating the correlation matrix based on GIOU for each unmatched trajectory and unmatched detection, if the correlation matrix is ​​less than the GIOU matching success threshold, it is considered that the match is successful, otherwise, it is judged that the match is unsuccessful; Step S46, obtaining the target registration result, namely, the matched successful trajectory, the unmatched successful trajectory set, and the unmatched successful detection set.

15. The multi-target registration method based on multi-level matching and deep features according to claim 14, characterized in that: The specific process of GIOU calculation is as follows: the generalized intersection-over-union ratio calculation formula of the detection box and the prediction box is: Among them, A is the predicted box area of ​​the target, B is the detection box area, and C is the minimum rectangular box area that can contain both the detection box and the predicted box.

16. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the program, the method according to any one of claims 1 to 15 is implemented.

17. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 15 is implemented.

Citation Information

Patent Citations

  • Swimming pool anti-drowning multi-camera target tracking method and device, computer equipment and storage medium

    CN114359968A

  • Road vehicle tracking method and system based on attention mechanism and multi-target tracking

    CN114627447A

  • Cross-camera multi-vehicle tracking method combining road topological structure and overlapped view field

    CN117541620A

  • Multi-target tracking method and system

    CN117911454A

  • Sampled Softmax with Random Fourier Features

    US20210019654A1