A multi-target tracking method and system based on dynamic weight value and multi-level feature fusion

By using dynamic weights and multi-level feature fusion, the problems of rigid feature fusion and insufficient information utilization in multi-target tracking are solved, achieving high-precision and robust tracking in complex scenarios and reducing target identity switching and mismatches.

CN121582298BActive Publication Date: 2026-04-17HUNAN INSTITUTE OF ENGINEERING
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN INSTITUTE OF ENGINEERING
Filing Date
2026-01-23
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing multi-target tracking methods suffer from problems such as rigid feature fusion, insufficient information utilization, and large errors in association strategies in complex scenarios, resulting in insufficient robustness and accuracy.

Method used

By adopting a dynamic weighting and multi-level feature fusion method, a multi-level appearance feature library is constructed by dynamically adjusting the fusion weights of position and appearance features. Combined with a confidence penalty term, global optimization matching is performed, which solves the problems of rigid feature fusion and insufficient information utilization, and optimizes the association strategy.

Benefits of technology

It significantly improves the robustness and accuracy of multi-target tracking, and can maintain high-efficiency tracking performance in complex scenarios such as target occlusion and deformation, while reducing target identity switching and mismatch.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121582298B_ABST
    Figure CN121582298B_ABST
Patent Text Reader

Abstract

This invention discloses a multi-target tracking method and system based on dynamic weights and multi-level feature fusion, comprising: performing target detection on video frames to obtain detection boxes and their confidence and appearance features; predicting the current position of a target based on an existing trajectory and obtaining a multi-level appearance feature library stored hierarchically according to its confidence level; calculating the positional cost and appearance cost between the detection box and the trajectory, dynamically fusing their weights according to the continuous tracking state of the trajectory, and introducing a penalty term based on the confidence level of the detection box to generate a comprehensive association cost matrix; performing matching accordingly, updating the state and feature library of successfully matched trajectories; and managing the lifecycle of unmatched trajectories and detection boxes. This invention adapts to different tracking scenarios through dynamic weight adjustment, fully utilizes the appearance information of detection boxes with varying confidence levels through a multi-level feature library, and simultaneously associates detection boxes with high and low confidence levels through a global optimization strategy, significantly improving the accuracy, robustness, and continuity of tracking in complex scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision technology, and in particular relates to a multi-target tracking method and system based on dynamic weights and multi-level feature fusion. Background Technology

[0002] Multi-object tracking is a core research direction in computer vision, aiming to continuously and stably track multiple targets from video sequences. It is widely used in practical scenarios such as intelligent security and autonomous driving. Currently, mainstream methods are generally based on a detection-then-association framework, which achieves trajectory and detection box matching by fusing the target's position information and appearance features.

[0003] However, existing methods still face several key challenges in complex scenarios. First, regarding feature fusion mechanisms, current technologies employ fixed weights to fuse position and appearance features. This static fusion strategy struggles to adapt to dynamic changes in the tracking scene. When a target reappears after being lost due to occlusion or motion blur, its position prediction is often unreliable. Continuing to rely on the original fixed weights can easily lead to association failures, thus affecting the robustness of the tracking system.

[0004] Secondly, regarding the utilization of appearance information, most methods only use high-confidence detection boxes to update the target's appearance features, while directly discarding the appearance features in medium- and low-confidence detection boxes. This approach ignores the effective discriminative information that may still be contained in medium- and low-confidence detection boxes, resulting in incomplete appearance features of the target under conditions of occlusion or blurring, and thus insufficient utilization of appearance information in complex scenarios such as occlusion.

[0005] Furthermore, in terms of association matching strategies, common strategies often employ a serial processing mechanism, such as prioritizing the association of high-confidence detection boxes before associating low-confidence detection boxes. This fixed priority can easily introduce mismatches when targets are densely packed and interactions are frequent. A correct trajectory that should match a low-confidence detection box (such as a partially occluded target) may be incorrectly associated with an irrelevant high-confidence detection box, leading to an increase in the number of identity switching attempts.

[0006] These issues limit the performance of existing methods in complex scenes with dense targets and severe occlusion, making it difficult to simultaneously meet the practical application requirements of high accuracy and high robustness. Therefore, there is an urgent need for a multi-target tracking method that can dynamically fuse features, fully utilize multi-confidence detection box features, and achieve global optimized matching to improve tracking performance in complex environments. Summary of the Invention

[0007] To address the above technical problems, this invention provides a multi-target tracking method and system based on dynamic weights and multi-level feature fusion.

[0008] The technical solution adopted by this invention to solve its technical problem is:

[0009] A multi-target tracking method based on dynamic weights and multi-level feature fusion, the method comprising the following steps:

[0010] S100: Acquire input video frames, perform target detection on the input video frames, use the detector to obtain the detection box and its confidence of each target, and extract the corresponding appearance feature vector;

[0011] S200: Predict the position of an existing active trajectory in the current frame and obtain a multi-level appearance feature library for each trajectory. The multi-level appearance feature library stores appearance features according to different confidence intervals.

[0012] S300: For each detection box and each active trajectory in the current frame, calculate the position cost matrix reflecting spatial overlap and the appearance cost matrix reflecting appearance similarity; dynamically calculate the fusion weight of the position cost matrix and the appearance cost matrix according to the continuous tracking state of each trajectory, perform weighted fusion of the position cost matrix and the appearance cost matrix, and combine it with the confidence penalty term based on the confidence of the detection box for correction to generate a comprehensive association cost matrix.

[0013] S400: Based on the comprehensive association cost matrix, the detection box and trajectory are matched; for the successfully matched detection box-trajectory pair, the multi-level appearance feature library and motion state of the corresponding trajectory are updated according to the confidence interval of the detection box.

[0014] S500: Count the number of unmatched trajectories lost. If the number of consecutive unmatched frames exceeds a preset first threshold, the trajectory is terminated. For unmatched detection boxes, different processing is performed according to their preset confidence intervals: if they belong to a low confidence interval, they are discarded; if they belong to a high confidence interval, their overlap with all matched detection boxes in the current frame is checked, and they are initialized as a new trajectory after passing the check.

[0015] Preferably, the location cost matrix in S300 is obtained by calculating the intersection-union ratio between the detection box and the trajectory prediction box in the current frame as the location cost matrix; the appearance cost matrix is ​​obtained by calculating the distance between the appearance feature vector of the detection box and the feature vectors of each level in the multi-level appearance feature library, and taking the minimum value as the appearance cost matrix.

[0016] Preferably, the multi-level appearance feature library contains feature vectors corresponding to three confidence levels: high, medium, and low; the appearance cost matrix The calculation formula is:

[0017] ;

[0018] in, , , These are the cosine distances between the appearance features of the detection box and the feature vectors in the high, medium, and low-level feature libraries corresponding to the trajectory. This is the distance penalty coefficient corresponding to the medium confidence interval, with a value ranging from 1.3 to 1.4. The distance penalty coefficient, corresponding to the low confidence interval, ranges from 1.6 to 1.9, and satisfies 1 < 1.9. < .

[0019] Preferably, in S300, the location cost matrix and appearance cost matrix are weighted and fused, and then corrected by combining a confidence penalty term based on the detection box confidence to generate a comprehensive association cost matrix, specifically:

[0020] ;

[0021] ;

[0022] in, To comprehensively consider the associated costs, This represents the cost of association after dynamic fusion. This represents the location cost matrix calculated based on the intersection-union ratio. This represents the appearance cost matrix calculated based on the cosine distance of appearance features. and These are the location feature weights and appearance feature weights, dynamically calculated based on the number of consecutively lost frames in the trajectory. This is a penalty term calculated based on the confidence level of the detection box.

[0023] Preferably, dynamic weights and Calculated using the following formula:

[0024] ;

[0025] ;

[0026] in, For the number of consecutive frames lost in the trajectory, This is the maximum number of consecutive frames that can be lost in a trajectory; if this value is exceeded, the trajectory will terminate. These are the baseline weighting coefficients for the location cost matrix, with values ​​ranging from 0.7 to 0.9. is the baseline weight coefficient of the appearance cost matrix, with a value range of 2.0-4.0, and cos(·) is the cosine function to achieve a smooth transition of weights.

[0027] Preferably, penalty item The calculation formula is:

[0028] ;

[0029] in, The preset high confidence threshold, This represents the confidence level of the current detection box.

[0030] Preferably, the overlap verification in S500 is as follows: calculate the intersection-union ratio (IUR) of the high-confidence unmatched detection box with each matched detection box in the current frame. If all IUR values ​​are less than the second threshold, the verification is passed.

[0031] A multi-target tracking system based on dynamic weights and multi-level feature fusion includes:

[0032] The detection and feature extraction module is used to acquire input video frames, perform target detection on the input video frames, use the detector to obtain the detection box and its confidence score for each target, and extract the corresponding appearance feature vector.

[0033] The multi-level appearance feature library acquisition module is used to predict the position of an active trajectory in the current frame based on the existing active trajectory, and to acquire the multi-level appearance feature library of each trajectory. The multi-level appearance feature library stores appearance features according to different confidence intervals.

[0034] The dynamic cost calculation module is used to calculate the position cost matrix reflecting spatial overlap and the appearance cost matrix reflecting appearance similarity for each detection box and each active trajectory in the current frame. Based on the continuous tracking status of each trajectory, the fusion weight of the position cost matrix and the appearance cost matrix is ​​dynamically calculated, the position cost matrix and the appearance cost matrix are weighted and fused, and the fusion is corrected by combining the confidence penalty term based on the confidence of the detection box to generate a comprehensive association cost matrix.

[0035] The matching and updating module is used to match detection boxes with trajectories based on the comprehensive association cost matrix; for a successfully matched detection box-trajectory pair, the multi-level appearance feature library and motion state of the corresponding trajectory are updated according to the confidence interval of the detection box.

[0036] The trajectory management module is used to count the loss of unmatched trajectories. If the number of consecutive unmatched frames exceeds a preset first threshold, the trajectory is terminated. For unmatched detection boxes, different processing is performed according to their preset confidence intervals: if they belong to the low confidence interval, they are discarded; if they belong to the high confidence interval, their overlap with all matched detection boxes in the current frame is checked, and they are initialized as new trajectories after passing the check.

[0037] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of a multi-target tracking method based on dynamic weights and multi-level feature fusion.

[0038] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a multi-target tracking method based on dynamic weights and multi-level feature fusion.

[0039] The aforementioned multi-target tracking method and system based on dynamic weights and multi-level feature fusion dynamically adjusts the fusion weights of the position cost matrix and appearance cost matrix according to the continuous tracking status of the trajectory, solving the problem of feature fusion rigidity caused by fixed weights. This enables the algorithm to maintain optimal discrimination ability in different scenarios such as stable target tracking and target loss and re-encounter, significantly improving the robustness of tracking. By constructing and maintaining an appearance feature library based on multi-level confidence detection boxes, the system fully utilizes the effective appearance information in medium and low confidence detection boxes, overcoming the insufficient information utilization caused by simple discarding in existing technologies, and enhancing the model's re-identification accuracy in difficult scenarios such as target occlusion and deformation. By adopting a global optimization strategy to associate high and low confidence detection boxes in the same matching stage and applying confidence penalties to low confidence detection boxes, the system avoids the priority error of traditional serial association strategies, achieving better global matching and effectively reducing target identity switching and mismatches. This results in higher accuracy and higher stability tracking performance in complex scenarios with dense multi-targets and frequent occlusion. Attached Figure Description

[0040] Figure 1 This is a flowchart of a multi-target tracking method based on dynamic weights and multi-level feature fusion in one embodiment of the present invention;

[0041] Figure 2 This is a flowchart of a multi-target tracking method based on dynamic weights and multi-level feature fusion in another embodiment of the present invention. Detailed Implementation

[0042] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0043] In one embodiment, such as Figure 1 and Figure 2 As shown, a multi-target tracking method based on dynamic weights and multi-level feature fusion is proposed, the method comprising the following steps:

[0044] S100: Acquire input video frames, perform target detection on the input video frames, use the detector to obtain the detection box and its confidence of each target, and extract the corresponding appearance feature vector.

[0045] Specifically, in this embodiment, a pre-trained detector (YOLOX) is used to output the position and confidence of all detection boxes in each frame, and the corresponding ReID appearance feature vector is extracted by the pre-trained FastReID model.

[0046] S200: Predict the position of an existing active trajectory in the current frame and obtain a multi-level appearance feature library for each trajectory. The multi-level appearance feature library stores appearance features according to different confidence intervals.

[0047] Specifically, in this embodiment, each trajectory maintains three ReID feature vectors, corresponding to three detection box confidence intervals of high, medium and low confidence (e.g., high confidence: >0.7, medium confidence: 0.5~0.7, low confidence: <0.5). The multi-level appearance feature library contains feature vectors corresponding to the three confidence levels of high, medium and low confidence.

[0048] S300: For each detection box and each active trajectory in the current frame, calculate the position cost matrix reflecting spatial overlap and the appearance cost matrix reflecting appearance similarity; dynamically calculate the fusion weight of the position cost matrix and the appearance cost matrix according to the continuous tracking state of each trajectory, perform weighted fusion of the position cost matrix and the appearance cost matrix, and modify it by combining the confidence penalty term based on the confidence of the detection box to generate a comprehensive association cost matrix.

[0049] Specifically, for each detection box and each active trajectory in the current frame, two association cost matrices are calculated: a location cost matrix and an appearance cost matrix. The location cost matrix is ​​obtained as follows: for each trajectory, the detection boxes of the historical frames are used to predict the detection boxes of the current frame through Kalman filtering, and the intersection-over-union ratio (IoU) between the detection boxes and the predicted trajectory boxes is calculated. The IoU is used as the location cost matrix. The appearance cost matrix is ​​obtained as follows: the distance between the appearance feature vector of the detection box and the feature vectors of each level in the multi-level appearance feature library is calculated, and the minimum value is taken as the appearance cost matrix.

[0050] Furthermore, when calculating the fusion cost of IoU and ReID features, fixed weights are no longer used; instead, they are dynamically adjusted based on the continuous tracking status of the trajectory. IoU features exhibit relatively small matching errors during continuous target tracking because the target position changes gradually. However, when the target reappears after losing some frames, the positional correlation breaks, causing the IoU matching error to increase sharply. ReID features, as global appearance features, are unaffected by trajectory continuity in terms of matching stability. (Definition) The state variable for the trajectory is "number of consecutively lost frames".

[0051] like =0 (target continuity), then increase the IoU weight and decrease the ReID weight;

[0052] like If the value is >0 (the target is lost and then reappears), then gradually reduce the IoU weight and increase the ReID weight.

[0053] In one embodiment, in step S300, the location cost matrix and appearance cost matrix are weighted and fused, and then corrected by incorporating a confidence penalty term based on the detection box confidence to generate a comprehensive association cost matrix, specifically:

[0054] ;

[0055] in, This represents the association cost after dynamic fusion (the smaller the value, the higher the matching degree). This represents the location cost matrix calculated based on the intersection-union ratio. This represents the appearance cost matrix calculated based on the cosine distance of appearance features (ReID). and These are the location feature weights and appearance feature weights, which are dynamically calculated based on the number of consecutively lost frames in the trajectory.

[0056] In one embodiment, dynamic weights and Calculated using the following formula:

[0057] ;

[0058] ;

[0059] in, For the number of consecutive frames lost in the trajectory, The maximum number of consecutive frames that can be lost in the trajectory is allowed. If this value is exceeded, the trajectory will terminate (the value is 30 to 80 frames, preferably 50 frames, otherwise the trajectory will terminate). The base weight coefficients for the location cost matrix have a value range of 0.7-0.9 (preferably 0.8). The base weight coefficients of the appearance cost matrix range from 2.0 to 4.0 (preferably 3.0), and cos(·) is the cosine function, achieving a smooth transition of weights. Furthermore, in another embodiment, an exponential function can be used instead of the cosine function to achieve a smooth transition of weights.

[0060] Furthermore, each trajectory maintains three ReID feature vectors, corresponding to high, medium, and low confidence intervals for the detection boxes (e.g., high confidence: >0.7, medium confidence: 0.5~0.7, low confidence: <0.5). During association, the cosine distance between the detection box ReID features and the trajectory's three-level ReID features is calculated, and the minimum value is taken as the final ReID distance for that trajectory. Simultaneously, a penalty coefficient γ is added to the fusion cost of medium and low confidence detection boxes to reduce their matching priority, mitigate the matching risk caused by insufficient reliability, avoid erroneous association with irrelevant high-confidence detection boxes, and retain their ability to recall occluded targets.

[0061] Appearance Cost Matrix The calculation formula is:

[0062] ;

[0063] in, , , These are the cosine distances between the appearance features of the detection box and the feature vectors in the high, medium, and low-level feature libraries corresponding to the trajectory. The distance penalty coefficient corresponding to the medium confidence interval is set to a value ranging from 1.3 to 1.4 (preferably 1.3). The distance penalty coefficient corresponding to the low confidence interval is set to a value ranging from 1.6 to 1.9 (preferably 1.8), and satisfies 1 < 1.9. < This is to reduce the credibility of low-quality features.

[0064] It is understandable that, in another embodiment, a two-level ReID feature management mechanism can be adopted, that is, the ReID feature library is divided into only two levels: "high confidence" and "low confidence," omitting the medium confidence level. During association, the distance between the ReID features of the detection box and the features at both levels is calculated, and a penalty coefficient is applied to the distance at the low confidence level. This scheme reduces computational and storage overhead while still retaining the ability to utilize information from low-confidence detection boxes.

[0065] In one embodiment, the penalty item The calculation formula is:

[0066] ;

[0067] in, The preset high confidence threshold, Let be the confidence level of the current detection box. The final cost function is: ,in, To comprehensively consider the associated costs, This is a confidence penalty term calculated based on the confidence of the detection box.

[0068] Specifically, the traditional two-level association order of "high first, low later" is eliminated, and a strategy of simultaneously associating high and low confidence detection boxes is adopted. In a single matching process, both high and low confidence detection boxes are considered at the same time, and a penalty term is applied to the association cost of low confidence detection boxes.

[0069] S400: Based on the comprehensive association cost matrix, the detection box and trajectory are matched; for the successfully matched detection box-trajectory pair, the multi-level appearance feature library and motion state of the corresponding trajectory are updated according to the confidence interval of the detection box.

[0070] Specifically, the optimal association between the detection box and the trajectory is achieved through the Hungarian matching algorithm. After a successful match, the ReID feature level corresponding to the trajectory is updated based on the confidence interval of the detection box, and the trajectory state and Kalman filter information are also updated.

[0071] S500: Count the number of unmatched trajectories lost. If the number of consecutive unmatched frames exceeds a preset first threshold, the trajectory is terminated. For unmatched detection boxes, different processing is performed according to their preset confidence intervals: if they belong to a low confidence interval, they are discarded; if they belong to a high confidence interval, their overlap with all matched detection boxes in the current frame is checked, and they are initialized as a new trajectory after passing the check.

[0072] In one embodiment, the overlap verification in S500 is as follows: calculate the intersection-union ratio (IUR) of the high-confidence unmatched detection box with each matched detection box in the current frame. If all IUR values ​​are less than the second threshold, the verification is passed.

[0073] Specifically, unmatched trajectories are lost, and if the number exceeds a certain threshold (30-60 frames), the trajectory is considered terminated. Unmatched low-confidence detection boxes are discarded directly; for unmatched high-confidence detection boxes, to prevent multiple trajectories for the same target (ID splitting), IoU deduplication is performed: the IoU is calculated with all successfully matched detection boxes in the current frame. If any IoU value is greater than the deduplication threshold (e.g., 0.7), it is considered a duplicate detection and filtered out; otherwise, it is initialized as a new trajectory.

[0074] Compared with existing technologies, the technical solution of the present invention brings about many significant benefits by introducing dynamic weight adjustment, three-level feature management and optimized association strategy, specifically manifested in a comprehensive improvement in tracking accuracy, robustness and information utilization efficiency.

[0075] (1) Significantly improves tracking accuracy and robustness in complex scenarios

[0076] To address the issue of insufficient feature fusion adaptability, a "dynamic weight adjustment mechanism" adaptively adjusts the fusion weights of IoU and ReID features based on the continuity or loss status of the trajectory. When the target is stably tracked, higher weights are assigned to position features (IoU) to maintain smoothness; when the target is lost and then reappears, higher weights are assigned to appearance features (ReID) to enhance re-identification capabilities. This dynamic adaptation mechanism fundamentally overcomes the performance degradation problem caused by fixed weights in algorithms such as DeepSORT under dynamic scenarios such as occlusion and reappearance, enabling the tracking algorithm to more flexibly cope with various challenges. This significantly reduces the number of target identity switches, improving the continuity and accuracy of tracking.

[0077] (2) Fully explore and utilize effective information to improve the model's discrimination ability.

[0078] To address the issue of low feature information utilization, a "three-level ReID feature management mechanism" is employed, departing from existing technologies (such as Hybrid-SORT) that simply discard medium- and low-confidence detection boxes. This mechanism classifies and incorporates the remaining valid appearance information contained in medium- and low-confidence detection boxes into the trajectory's feature library. During matching, the three levels of features are considered together for decision-making. This approach significantly enriches the appearance feature representation of the trajectory, enabling the model to maintain strong discriminative power even when the target's pose changes, is partially occluded, or the image is blurred, effectively improving the re-identification success rate in challenging scenarios.

[0079] (3) Optimize the matching decision process and reduce mismatches.

[0080] To address the issue of large association matching errors, this invention employs a "simultaneous association strategy for high and low confidence detection boxes," breaking away from the serial two-level association framework used by algorithms such as ByteTrack, which can lead to error priority propagation. This invention places detection boxes with different confidence levels in the same round of global matching, applying a confidence penalty term only to the cost of low-confidence detection boxes. >1) Adjust its priority. This strategy ensures the global optimality of the matching decision, and in a mechanism, avoids the error of the trajectory that should match the low confidence box being "preempted" by the irrelevant high confidence box, fundamentally reducing the mismatches caused by defects in the association logic.

[0081] In one embodiment, a multi-target tracking system based on dynamic weights and multi-level feature fusion is also provided, comprising:

[0082] The detection and feature extraction module is used to acquire input video frames, perform target detection on the input video frames, use the detector to obtain the detection box and its confidence score for each target, and extract the corresponding appearance feature vector.

[0083] The multi-level appearance feature library acquisition module is used to predict the position of an active trajectory in the current frame based on the existing active trajectory, and to acquire the multi-level appearance feature library of each trajectory. The multi-level appearance feature library stores appearance features according to different confidence intervals.

[0084] The dynamic cost calculation module is used to calculate the position cost matrix reflecting spatial overlap and the appearance cost matrix reflecting appearance similarity for each detection box and each active trajectory in the current frame. Based on the continuous tracking status of each trajectory, the fusion weight of the position cost matrix and the appearance cost matrix is ​​dynamically calculated, the position cost matrix and the appearance cost matrix are weighted and fused, and the fusion is corrected by combining the confidence penalty term based on the confidence of the detection box to generate a comprehensive association cost matrix.

[0085] The matching and updating module is used to match detection boxes with trajectories based on the comprehensive association cost matrix; for a successfully matched detection box-trajectory pair, the multi-level appearance feature library and motion state of the corresponding trajectory are updated according to the confidence interval of the detection box.

[0086] The trajectory management module is used to count the loss of unmatched trajectories. If the number of consecutive unmatched frames exceeds a preset first threshold, the trajectory is terminated. For unmatched detection boxes, different processing is performed according to their preset confidence intervals: if they belong to the low confidence interval, they are discarded; if they belong to the high confidence interval, their overlap with all matched detection boxes in the current frame is checked, and they are initialized as new trajectories after passing the check.

[0087] For specific limitations regarding a multi-target tracking system based on dynamic weights and multi-level feature fusion, please refer to the limitations of a multi-target tracking method based on dynamic weights and multi-level feature fusion described above, which will not be repeated here. Each module in the aforementioned multi-target tracking system based on dynamic weights and multi-level feature fusion can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0088] In one embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of a multi-target tracking method based on dynamic weights and multi-level feature fusion.

[0089] In one embodiment, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of a multi-target tracking method based on dynamic weights and multi-level feature fusion.

[0090] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0091] The foregoing has provided a detailed description of a multi-target tracking method and system based on dynamic weights and multi-level feature fusion provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention, and the descriptions of the embodiments above are merely for the purpose of helping to understand the core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.

Claims

1. A multi-target tracking method based on dynamic weight value and multi-level feature fusion, characterized in that, The method includes the following steps: S100: Acquire input video frames, perform target detection on the input video frames, use the detector to obtain the detection box and its confidence of each target, and extract the corresponding appearance feature vector; S200: Predict the position of an existing active trajectory in the current frame and obtain a multi-level appearance feature library for each trajectory. The multi-level appearance feature library stores appearance features according to different confidence intervals. S300: For each detection box and each active trajectory in the current frame, calculate the location cost matrix reflecting spatial overlap and the appearance cost matrix reflecting appearance similarity; dynamically calculate the fusion weights of the location cost matrix and appearance cost matrix according to the continuous tracking state of each trajectory, perform weighted fusion of the location cost matrix and appearance cost matrix, and correct it with a confidence penalty term based on the confidence of the detection box to generate a comprehensive association cost matrix; the location cost matrix in S300 is obtained by calculating the intersection-union ratio between the detection box and the trajectory prediction box in the current frame as the location cost matrix; the appearance cost matrix is ​​obtained by calculating the distance between the appearance feature vector of the detection box and the feature vectors of each level in the multi-level appearance feature library, and taking the minimum value as the appearance cost matrix; The multi-level appearance feature library includes feature vectors corresponding to high, medium and low confidence levels; and the appearance cost matrix The calculation formula is: ; wherein, , , are the cosine distances of the feature vectors in the high, medium and low level feature libraries corresponding to the appearance features and trajectory features of the detection frame, respectively, is the distance penalty coefficient corresponding to the medium confidence interval, and the value range is 1.3 to 1.4, is the distance penalty coefficient corresponding to the low confidence interval, and the value range is 1.6 to 1.9, and satisfies 1 ;​ In S300, the location cost matrix and appearance cost matrix are weighted and fused, and then corrected by a confidence penalty term based on the detection box confidence to generate a comprehensive association cost matrix, specifically: ; ; in, To comprehensively consider the associated costs, This represents the cost of association after dynamic fusion. This represents the location cost matrix calculated based on the intersection-union ratio. This represents the appearance cost matrix calculated based on the cosine distance of appearance features. and These are the location feature weights and appearance feature weights, dynamically calculated based on the number of consecutively lost frames in the trajectory. This is a confidence penalty term calculated based on the confidence of the detection box. Dynamic weights and Calculated using the following formula: ; ; in, T l For the number of consecutive frames lost in the trajectory, This is the maximum number of consecutive frames that can be lost in a trajectory; if this value is exceeded, the trajectory will terminate. These are the baseline weighting coefficients for the location cost matrix, with values ​​ranging from 0.7 to 0.

9. The base weight coefficients of the appearance cost matrix are 2.0-4.0, and cos(·) is a cosine function to achieve a smooth transition of weights. Penalty items The calculation formula is: ; in, The preset high confidence threshold, The confidence level of the current detection box; S400: Based on the comprehensive association cost matrix, the detection box and trajectory are matched; for the successfully matched detection box-trajectory pair, the multi-level appearance feature library and motion state of the corresponding trajectory are updated according to the confidence interval of the detection box. S500: Count the number of unmatched trajectories lost. If the number of consecutive unmatched frames exceeds a preset first threshold, the trajectory is terminated. For unmatched detection boxes, different processing is performed according to their preset confidence intervals: if they belong to a low confidence interval, they are discarded; if they belong to a high confidence interval, their overlap with all matched detection boxes in the current frame is checked, and they are initialized as a new trajectory after passing the check.

2. The method according to claim 1, characterized in that, In S500, the overlap verification is performed by calculating the intersection-union ratio (IUR) of the high-confidence unmatched detection box with each matched detection box in the current frame. If all IUR values ​​are less than the second threshold, the verification is passed.

3. A multi-target tracking system based on dynamic weights and multi-level feature fusion, performing the method as described in claim 1 or 2, characterized in that, include: The detection and feature extraction module is used to acquire input video frames, perform target detection on the input video frames, use the detector to obtain the detection box and its confidence score for each target, and extract the corresponding appearance feature vector. The multi-level appearance feature library acquisition module is used to predict the position of an existing active trajectory in the current frame and acquire the multi-level appearance feature library of each trajectory. The multi-level appearance feature library stores appearance features according to different confidence intervals. The dynamic cost calculation module is used to calculate the position cost matrix reflecting spatial overlap and the appearance cost matrix reflecting appearance similarity for each detection box and each active trajectory in the current frame. The fusion weights of the position cost matrix and appearance cost matrix are dynamically calculated based on the continuous tracking status of each trajectory. The position cost matrix and appearance cost matrix are then fused with weights and corrected by combining a confidence penalty term based on the confidence of the detection box to generate a comprehensive association cost matrix. The matching and updating module is used to match detection boxes with trajectories based on the comprehensive association cost matrix; for a successfully matched detection box-trajectory pair, the multi-level appearance feature library and motion state of the corresponding trajectory are updated according to the confidence interval of the detection box. The trajectory management module is used to count the loss of unmatched trajectories. If the number of consecutive unmatched frames exceeds a preset first threshold, the trajectory is terminated. For unmatched detection boxes, different processing is performed according to their preset confidence intervals: if they belong to the low confidence interval, they are discarded; if they belong to the high confidence interval, their overlap with all matched detection boxes in the current frame is checked, and they are initialized as new trajectories after passing the check.

4. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 2.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Intelligent building online cross-camera multi-target tracking method

    CN114240997A

  • Improved visual multi-target tracking method based on positioning confidence

    CN118781150A