A key frame sampling-based multi-target tracking model training acceleration method
By combining keyframe-based extended segment sampling and mixed segment length sampling with video frame difficulty assessment and adaptive differential sampling, the problems of long training time and insufficient performance of multi-object tracking methods are solved, achieving more efficient model training and performance improvement.
Patent Information
- Application Number
- CN202410293412.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-14
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-03-14
AI Technical Summary
Existing multi-object tracking methods employ a strategy of randomly and uniformly sampling the starting frame and randomly setting the sampling video frame interval during training. This results in long training times and insufficient sequence length, failing to effectively utilize the characteristics of multi-object tracking data and affecting the model's correlation performance.
We employ keyframe-based extended segment sampling and mixed segment length sampling, combined with video frame difficulty assessment and adaptive differential sampling. By using keyframe extended segment sampling and mixed segment length sampling, we construct a training dataset for a multi-target tracking model. We also adaptively adjust the sampling weights to oversample difficult frames and undersample simple frames, thereby reducing the impact of data redundancy.
While shortening the training time, the model's performance was improved. Experiments show that the HOTA performance score on the test set was increased by 2 times when the total number of training frames was reduced by about half.
Smart Images

Figure CN118397385B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer software technology and relates to multi-target tracking technology, specifically a method for accelerating the training of multi-target tracking models based on keyframe sampling. Background Technology
[0002] Multi-Object Tracking (MOT) aims to detect objects of interest in a video sequence, assign each detected object a unique ID, and maintain consistency of the same object's ID across the video sequence. Many deep learning-based methods divide MOT into two stages: object detection and object association, attempting to design separate algorithm models for each stage to achieve multi-object tracking. However, such methods require determining numerous hyperparameters during training and inference, and end-to-end training is not feasible, resulting in typically complex algorithm design.
[0003] In recent years, the "Detection Transformer" (DETR) series based on attention mechanisms treats the detection problem as a set-prediction task. This class of methods, known as query-based detection methods, has gradually become one of the mainstream approaches in object detection due to its end-to-end training capability and simple architecture. In the field of Motion Detection (MOT), the "End-to-End Multiple-Object Tracking with TRansformer" (MOTR) based on the DETR method treats the trajectory as a query in the DETR model and passes the track query across different video frames. This naturally integrates the detection and association stages, avoiding the need for manually designed intermediate modules such as Non-Maximum Suppression (NMS), making the MOT architecture simple and unified, and achieving very advanced performance.
[0004] During training, MOTR series models require certain video frames as input segments. Existing methods generally employ a training strategy of randomly and uniformly sampling the starting frame, randomly setting the sampling interval, and gradually increasing the sequence length. However, this training strategy suffers from short sequence lengths and treats all video frames the same. In reality, multi-object tracking data exhibits significant redundancy and a large disparity in the ratio of easy to difficult samples. Existing sampling methods do not consider these characteristics and rarely design targeted sampling strategies based on the importance of video frames in the dataset for tracking performance training, resulting in low training efficiency. Therefore, a new training strategy needs to be designed based on the characteristics of the MOT task and dataset to shorten training time and improve model evaluation performance. Summary of the Invention
[0005] The problem this invention aims to solve is that query-based multi-target tracking methods typically employ a training strategy that randomly and uniformly samples the starting frame, randomly sets the sampling video frame interval, and gradually increases the sequence length. This strategy does not take into account the characteristics of the multi-target tracking task itself and the labeled data, resulting in long training times, slow training speed in the later stages, and excessively short sequence lengths, which are not conducive to improving the model's target association performance.
[0006] The technical solution of this invention is: a method for accelerating the training of a multi-target tracking model based on keyframe sampling, comprising the following steps:
[0007] 1) The training dataset for multi-target tracking employs hybrid fragment length sampling and keyframe extended fragment sampling, and is preprocessed to obtain a hybrid training dataset:
[0008] Mixed segment length sampling: Suppose the total number of keyframes to be sampled in one epoch is N, and segment sampling is performed on the original training set M times, resulting in N m =B m N, B m N represents the proportion of the total number of frames sampled in the m-th segment. m Let C be the total number of video keyframes sampled in the m-th segment. In each segment sampling, the collected keyframes are expanded into a segment set by keyframe expansion sampling. The segment set contains segments of the same length, and different sets have different segment lengths C. m ;
[0009] Keyframe extended fragment sampling: For the i-th training video in the training set, based on its length L i The number of keyframes n to be sampled in the video is calculated based on the ratio of the total number of frames A in the training set. i , N m =B mN; Based on the set single-frame sampling weights, n weighted samples are performed in the i-th video. i A frame is used as a keyframe. For each keyframe, several frames are sampled at equal intervals before and after the keyframe to form a segment of length c together with the keyframe. The time step position of the keyframe in the segment is random.
[0010] Each segment sample yields a length of C. m N m A set of fragments constitutes a data subset. Fragments from different data subsets are mixed to obtain a mixed training dataset consisting of fragments of different lengths obtained by expanding keyframes, which is used as input for network training.
[0011] 2) During the training process, the loss function value Loss for each frame is obtained, and the standard score Zscore of the video frame is obtained based on the sliding window, which is used to evaluate the difficulty of the video frame.
[0012] 2.1) Set Loss sliding window: For the loss of each frame, set a first-in-first-out sliding window and its hyperparameters. The hyperparameters are the number of warm-up frames k. When the loss reaches the number of warm-up frames, that is, when the sliding window is full, calculate the standard score Zscore of frame k+1.
[0013] 2.2) Zscore calculation: Based on the mean and standard deviation of the loss data in the sliding window, calculate the standard score of the current loss relative to the data in the sliding window, which is used as the standard score of the video frame, that is, the difficulty score of the video frame. Then pop out the oldest loss in the sliding window, push the current loss into the sliding window, and then examine and calculate the standard score of the next loss, and so on, to complete the video frame difficulty assessment.
[0014] 3) Before the start of each Epoch (except the first Epoch), adaptively discriminate the keyframes of the current Epoch based on the difficulty of the video frames calculated in the previous Epoch to improve training speed:
[0015] 3.1) Zscore denoising: Set high and low thresholds for Zscore to remove extremely high or low Zscores and avoid noise interference;
[0016] 3.2) Zscore sampling weight calculation: Zscore is proportional to the difficulty of video frames. The more difficult the video frame, the greater the probability that it will be sampled as a key frame of the segment. The corresponding weight f(z) is set to represent the degree to which the video frame corresponding to a certain Zscore is sampled as a key frame.
[0017] 3.3) Zscore density estimation: Using the Gaussian kernel density estimation algorithm, the probability density distribution p(z) of the zscore obtained in step 3.1) is fitted.
[0018] 3.4) Single-frame sampling weight calculation: The single-frame sampling weight for the first Epoch is initialized to all equal positive values. For each subsequent Epoch, the single-frame sampling weight is calculated for each video frame based on its standard score Zscore. The updated single-frame sampling weights are used for keyframe sampling in the current Epoch to achieve weighted and differentiated sampling of keyframes.
[0019] During the training of the multi-target tracking model, steps 1)-3) are repeated continuously until training stops.
[0020] This invention proposes a method to accelerate the training of multi-target tracking models based on keyframe sampling. It uses keyframe-based extended sampling, integrates mixed sequence lengths, and adaptively differentiates sampling based on difficulty to reduce the data gap between training and testing, thereby shortening the training time and effectively improving model performance.
[0021] Compared with the prior art, the present invention has the following advantages:
[0022] The keyframe extended sampling strategy proposed in this invention combines keyframe-based extended fragment sampling and mixed fragment length sampling to obtain fragments of different lengths for mixing. This approach ensures training data diversity and expands fragment lengths without requiring complex sampling increment strategies. Based on the concept of keyframes, differentiated fragment sampling techniques can be further implemented.
[0023] The video frame difficulty evaluation and keyframe adaptive differential sampling proposed in this invention take into account the redundancy characteristics in multi-target tracking datasets and the differences in the contribution of video frames to network performance. An algorithm for evaluating the difficulty of video frames is designed, which selectively oversamples important difficult frames and undersamples simple frames. This allows the model algorithm to focus more on training the difficult parts of the data, reduces the impact of data redundancy in MOT, and speeds up the training process.
[0024] This invention achieves superior testing performance without altering the algorithm model itself, and significantly reduces the total training time. Experiments show that on the SportsMOT dataset, the method of this invention can complete model training with approximately 1 / 10 of the original number of training frames, and achieves a HOTA performance score gain of more than 2 on the test set. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of keyframe extended sampling according to the present invention.
[0026] Figure 2These are the original Loss histogram and the histogram of the logarithm of Loss in this embodiment of the invention. (a) is the distribution histogram of the original loss value Loss during training, and (b) is the distribution histogram of the natural logarithm of the loss value Loss.
[0027] Figure 3 This is a schematic diagram of the Zscore histogram obtained in the embodiments of the present invention and the probability density p(z) fitted by Gaussian KDE.
[0028] Figure 4 This is a schematic diagram of the Zscore histogram and the macroscopic weight f(z) corresponding to the Zscore obtained in the embodiments of the present invention.
[0029] Figure 5 This is a schematic diagram of the Zscore histogram and the corresponding micro-weight m(z) obtained in the embodiments of the present invention.
[0030] Figure 6 These are the Zscore histogram and the cumulative distribution bar chart of video frame hit counts obtained from the embodiments of the present invention, based on micro-weights.
[0031] Figure 7 This is the result obtained by keyframe differentiation sampling in the embodiments of the present invention. Each sub-graph is a bar chart of the total number of samplings obtained for each video frame of a certain video up to a certain Epoch. Detailed Implementation
[0032] This invention is a method for accelerating the training of multi-target tracking models based on keyframe sampling. It uses extended and hybrid segment sampling techniques to evaluate the difficulty of video frames. More difficult video frames are more likely to be sampled as keyframes. By oversampling difficult frames and undersampling simple frames in the multi-target tracking dataset, the impact of data redundancy in the multi-target dataset is reduced, allowing the model to pay more attention to the more difficult key parts in the original data, thereby improving the model's detection and tracking capabilities in complex situations and thus improving the model's evaluation performance.
[0033] The method of this invention includes three parts: a keyframe-based segment sampling strategy, video frame difficulty assessment, and keyframe adaptive differential sampling. It uses keyframe-based extended sampling, comprehensively adopts mixed sequence length, and adaptive differential sampling based on difficulty to reduce the data gap between training and testing, thereby improving model performance while shortening training time. The method includes the following steps, which are described in detail below.
[0034] 1) Keyframe-based segment sampling strategy: Weighted sampling of keyframes from the original video of the multi-target tracking dataset, which is then expanded to obtain segments with different lengths. The training data subset is obtained by mixing segments of different lengths and preprocessing. The sampling strategy includes mixed segment length sampling and keyframe-extended segment sampling, as detailed below.
[0035] 1.1) Mixed Segment Length Sampling: Suppose the total number of video frames to be sampled in one Epoch is N. Perform M segment sampling operations on the original training set, resulting in N... m =B m N, B m N represents the proportion of the total number of frames sampled in the m-th segment. m Let C be the total number of video keyframes sampled in the m-th segment. In each segment sampling, keyframes are expanded into a segment set through keyframe expansion. Each segment set contains segments of the same length, but different sets have different segment lengths C. m .
[0036] The total number of video frames to be sampled can be specified as needed. For example, if the total number of frames in the dataset is D, the total number of frames sampled can be equal to D, or it can be 10 times D, meaning that there may be duplicate sampling in the current epoch. The number of times a segment is sampled, M, is a hyperparameter. Each sampling yields a set of segments of a certain length, so that the preprocessed dataset contains segments of different lengths. In this embodiment, the original training set is sampled 3 times, with the total number of frames sampled each time being N1 = 0.3N, N2 = 0.4N, and N3 = 0.3N, corresponding to segment lengths C1 = 3, C2 = 6, and C3 = 18, respectively. This embodiment mixes three segment lengths, with a segment length of 3 being a relatively short sequence length and 18 being a relatively long sequence length. In practice, other combinations of shorter and longer lengths can also be used, such as 3 and 10, 5 and 30, etc.
[0037] 1.2) Keyframe Extended Fragment Sampling: For the i-th training video in the training set, based on the set single-frame sampling weights, n weighted samples are taken from the i-th video. i In this embodiment, for the m-th sampling (m = 1, 2, 3), let the total number of frames in the training set be A, and based on the length L of each video... i Calculate the number of keyframes n that need to be sampled in the video. i , N m =B mN. In the first epoch, the single-frame sampling weights are initialized to all equal positive values, and adaptive updates are performed in subsequent epochs to achieve differentiated sampling. For each keyframe, several frames are sampled at equal intervals before and after the keyframe to form a segment of length c. The time step position of the keyframe within the segment is random. Each segment sampling yields a segment of length C. m N m A set of fragments constitutes a data subset. Fragments from different data subsets are mixed to obtain a mixed training dataset consisting of fragments of different lengths obtained by expanding keyframes, which is then used as input for network training.
[0038] In this embodiment, each keyframe and several randomly sampled frames before and after the keyframe constitute a segment of length c, where c∈{C1,C2,C3}, resulting in a segment of fixed length n. i These segments constitute a subset of data. Let the time step of the keyframe be τ, randomly selected from 0 to c-1. Let the index of the keyframe in the original video be t, and the sampling interval Δ be randomly selected from positive integers from 1 to 5. Then, we sample forward t-τΔ, t-(τ-1)Δ, ..., t-Δ frames, and sample backward t+Δ, t+2Δ, ..., t+(c-τ)Δ frames. These sampled frames, plus the keyframe itself, constitute a segment of length c, as shown below. Figure 1 As shown. Furthermore, if the frames required for forward or backward sampling exceed the original video boundaries and cannot be sampled to expand into a segment of length c, the time step position of the keyframe in the segment is changed and resampling is performed until the sampling of the video frames before and after the keyframe is completed, resulting in an expanded segment of length c.
[0039] Hybrid segment length sampling ensures training data diversity while improving training efficiency. Based on the three-sampling setting of hybrid segment length sampling, the original training set is expanded by keyframes to obtain three data subsets with segment lengths of 3, 6, and 18. After completing the three samplings of the original training set, data subsets with segment lengths of 3, 6, and 18 can be obtained.
[0040] 2) Video frame difficulty assessment: The difficulty of each video frame is assessed based on the loss value, as follows.
[0041] 2.1) Setting a Loss Sliding Window: In the MOT dataset, the difficulty of different video frames varies greatly due to factors such as the degree of occlusion and the complexity of object motion. During a period of training, the logarithm of the loss function values (Loss) for all video frames roughly follows a normal distribution, such as... Figure 2 As shown in (b), for a specific video frame, its standard score in this set of data can be obtained to judge the difficulty of the video frame.
[0042] Because the total number of video frames is enormous, and the loss value gradually decreases during training (meaning its distribution constantly changes), it's not possible to directly calculate the standard score for a specific loss value among all losses. This invention does not count loss values at the beginning of training. Instead, it waits until the loss value enters a relatively stable decreasing phase before calculating the standard score. Specifically, a first-in, first-out sliding window is used, with the hyperparameter being the number of warm-up frames, k. When the loss value reaches the number of warm-up frames (i.e., the window is full), the standard score for frame k+1 is calculated. In this embodiment, the hyperparameter of the sliding window is 100, allowing it to hold a maximum of 100 loss values. If the window is full, the standard score is calculated for frame 101. Then, the oldest loss value is popped, the current loss value is pushed into the window, and the standard score for the next loss value is calculated, and so on, until the standard score for each video frame is calculated.
[0043] 2.2) Z-score calculation: Based on the mean and standard deviation of the loss data within the sliding window, calculate the standard score of the current loss relative to the data within the sliding window. This score serves as the standard score for the video frame, i.e., the difficulty score of the video frame. For each loss value l, calculate... As Zscore, where μ W ,σ W These are the mean and standard deviation of all loss values within the sliding window, respectively, and are used as the difficulty score.
[0044] Furthermore, in the calculation of the standard score, if the same video frame is repeatedly sampled in the same Epoch or between different Epochs, then the average of all the corresponding Zscores is taken as the final Zscore value of the video frame.
[0045] 3) Adaptive Differentiated Keyframe Sampling: Before the start of each Epoch (excluding the first Epoch), adaptive differential sampling is performed on the keyframes of the current Epoch based on the difficulty score of the video frames calculated in the previous Epoch. The single-frame sampling weights in the keyframe sampling are updated according to the statistically obtained difficulty scores, to moderately oversample difficult frames and moderately undersample easy frames. Adaptive differential sampling is performed to improve training speed, as follows.
[0046] 3.1) Z-score denoising: Due to data augmentation, noise data labeling, etc., the loss value of video frames may exhibit extremely high or low outliers. This invention sets high and low thresholds for Z-scores to remove extremely high or low Z-scores, thus avoiding the influence of noise. This embodiment retains all data between the 1st and 99th percentiles in all Z-scores, removing extremely high or low Z-scores.
[0047] 3.2) Zscore sampling weight calculation: Zscore is directly proportional to the difficulty of video frames. A higher Zscore corresponds to a more difficult video frame, which should have a greater probability of being sampled as a keyframe. Conversely, frames with a lower Zscore should have a smaller sampling weight.
[0048] The corresponding weight f(z) represents the sampling weight of the video frame corresponding to a certain Zscore, and is called the macro weight:
[0049]
[0050] like Figure 4 As shown, the light-colored bar chart represents the distribution histogram of Zscore for all video frames, and the dark blue curve represents the macroscopic weight f(z) value corresponding to the Zscore.
[0051] 3.3) Z-score density estimation: In reality, the distribution of Z-scores is not uniform, but follows a bell-shaped distribution. That is to say, the difficulty represented by a certain Z-score value actually corresponds to many different video frames. The sum of the sampling weights of these video frames is the sampling weight of this Z-score at the macroscopic level.
[0052] This invention uses the Gaussian kernel density estimation algorithm to fit the probability density distribution p(z) of the zscore obtained in step 3.1), as follows: Figure 3 As shown, it can represent the proportion of the total number within a certain Zscore neighborhood. Figure 3 The light-colored bars represent the histogram of Z-score distribution across all video frames, while the dark blue curve represents the probability density function p(z) of the Z-score distribution obtained by fitting the Gaussian KDE algorithm.
[0053] 3.4) Single-frame sampling weight calculation: The single-frame sampling weight for the first Epoch is initialized to all equal positive values. For each subsequent Epoch, for each video frame, the single-frame sampling weight is calculated based on its logarithmic loss standard score z. The updated single-frame sampling weights are obtained and used for keyframe sampling in the current Epoch to achieve weighted differentiated sampling. We call m(z) the micro-weights, and the sampling effect is as follows: Figure 5 and Figure 6 As shown. Figure 5 In the diagram, the light-colored bars represent the histogram of Z-score distribution across all video frames, while the dark blue curve represents the micro-weight m(z) value. Figure 6The diagram shows the Zscore histogram obtained by this invention and the cumulative distribution histogram of video frame hits based on micro-weights. The light-colored histogram represents the distribution histogram of Zscores for all video frames. Each bar in the dark-colored histogram represents the cumulative number of samples obtained for all video frames with the corresponding Zscore in each Zscore interval after 500 samplings in a certain video.
[0054] 4) Training phase: This invention can be applied to any MOTR series algorithm based on track query. In order to reduce the pressure on the graphics memory, a segment of the preprocessed training data subset is divided into multiple sub-batches and input into the model in several consecutive steps. Between each sub-batch, the computation graph detach operation is performed on the tensor features held by all tracks to reduce the graphics memory usage. Then the feature values are inherited to ensure the continuity of tracking.
[0055] The model's loss is the sum of three loss components: the first is the Focal Sigmoid Loss between the prediction confidence and the ground truth trajectory label; the second is the L1 loss between the predicted and tracked boxes; and the third is the Generalized Intersection over Union (GIoU) loss between the predicted and tracked boxes. The model is optimized using the Adam optimizer with an initial learning rate of 2 × 10⁻⁶. -4 The learning rate is decayed to 2×10⁻⁶ at the 16th epoch. -5 The network parameters are updated using the backpropagation algorithm.
[0056] Repeat steps 1), 2), and 3) continuously until training stops after 20 epochs. Figure 7 The image shows the results of keyframe differential sampling in this embodiment. Twenty sub-plots are displayed as bar charts showing the total number of samples obtained for each video frame in a given video within each epoch. The horizontal axis of each sub-plot represents the video frame number in a given video from the training set, and the vertical axis represents the cumulative number of samples for each frame up to a given epoch. The number after "total" in the title of each sub-plot represents the total number of frames sampled for that video frame up to a given epoch.
[0057] 5) Testing phase: Input the video to be tested frame by frame into the trained model to obtain the tracking results and perform subsequent performance evaluations, including training speed and model accuracy.
[0058] The method of this invention does not require changes to the multi-target tracking model itself, can be applied to various multi-target tracking models, accelerates training speed, and improves the tracking performance of the model under the new training method with adaptive sampling.
Claims
1. A method for accelerating the training of a multi-target tracking model based on keyframe sampling, characterized by: Includes the following steps: 1) The training dataset for multi-target tracking employs hybrid fragment length sampling and keyframe extended fragment sampling, and is preprocessed to obtain a hybrid training dataset: Mixed segment length sampling: Suppose the total number of keyframes to be sampled in one epoch is N, and segment sampling is performed on the original training set M times, resulting in N m =B m N, B m N represents the proportion of the total number of frames sampled in the m-th segment. m Let C be the total number of video keyframes sampled in the m-th segment. In each segment sampling, the collected keyframes are expanded into a segment set by keyframe expansion sampling. The segment set contains segments of the same length, and different sets have different segment lengths C. m ; Keyframe extended fragment sampling: For the i-th training video in the training set, based on its length L i The number of keyframes n to be sampled in the video is calculated based on the ratio of the total number of frames A in the training set. i , N m =B m N; Based on the set single-frame sampling weights, n weighted samples are performed in the i-th video. i A frame is used as a keyframe. For each keyframe, several frames are sampled at equal intervals before and after the keyframe to form a segment of length c together with the keyframe. The time step position of the keyframe in the segment is random. Each segment sample yields a length of C. m N m A set of fragments constitutes a data subset. Fragments from different data subsets are mixed to obtain a mixed training dataset consisting of fragments of different lengths obtained by expanding keyframes, which is used as input for network training. 2) During the training process, the loss function value Loss for each frame is obtained, and the standard score Zscore of the video frame is obtained based on the sliding window, which is used to evaluate the difficulty of the video frame. 2.1) Set Loss sliding window: For the loss of each frame, set a first-in-first-out sliding window and its hyperparameters. The hyperparameters are the number of warm-up frames k. When the loss reaches the number of warm-up frames, that is, when the sliding window is full, calculate the standard score Zscore of frame k+1. 2.2) Zscore calculation: Based on the mean and standard deviation of the loss data in the sliding window, calculate the standard score of the current loss relative to the data in the sliding window, which is used as the standard score of the video frame, that is, the difficulty score of the video frame. Then pop out the oldest loss in the sliding window, push the current loss into the sliding window, and then examine and calculate the standard score of the next loss, and so on, to complete the video frame difficulty assessment. 3) Before the start of each Epoch (except the first Epoch), adaptively discriminate the keyframes of the current Epoch based on the difficulty of the video frames calculated in the previous Epoch to improve training speed: 3.1) Zscore denoising: Set high and low thresholds for Zscore to remove extremely high or low Zscores and avoid noise interference; 3.2) Zscore sampling weight calculation: Zscore is proportional to the difficulty of video frames. The more difficult the video frame, the greater the probability that it will be sampled as a key frame of the segment. The corresponding weight f(z) is set to represent the degree to which the video frame corresponding to a certain Zscore is sampled as a key frame. 3.3) Zscore density estimation: Using the Gaussian kernel density estimation algorithm, the probability density distribution p(z) of the Zscore obtained in step 3.1) is fitted; 3.4) Single-frame sampling weight calculation: The single-frame sampling weight for the first Epoch is initialized to all equal positive values. For each subsequent Epoch, the single-frame sampling weight is calculated for each video frame based on its standard score Zscore. The updated single-frame sampling weights are obtained and used for keyframe sampling in the current Epoch to achieve weighted and differentiated sampling of keyframes. During the training of the multi-target tracking model, steps 1)-3) are repeated continuously until training stops.
2. The method for accelerating training of a multi-target tracking model based on keyframe sampling according to claim 1, characterized in that: In step 1), during the keyframe extended segment sampling, let the segment length be c, the time step position of the keyframe in the segment be τ, τ be randomly selected from 0 to c-1, the index of the keyframe in the original video be t, and the sampling interval Δ be randomly selected from positive integers from 1 to 5. Then, forward sampling of frames t-τΔ, t-(τ-1)Δ, ..., t-Δ and backward sampling of frames t+Δ, t+2Δ, ..., t+(c-τ)Δ, together with the keyframe, constitutes a segment of length c. If the frame required for forward or backward sampling exceeds the boundary of the original video, the time step position of the keyframe is changed and resampling is performed until the sampling of the video frames before and after the keyframe is completed to obtain the extended segment.
3. The method for accelerating the training of a multi-target tracking model based on keyframe sampling according to claim 1, characterized in that: In step 2), Zscore is calculated as follows: the loss value of the video frame is l, and the calculation... As Zscore, where μ W ,σ W These are the mean and standard deviation of all loss values within the sliding window, respectively.
4. The method for accelerating the training of a multi-target tracking model based on keyframe sampling according to claim 1, characterized in that: In step 2), if the same video frame is repeatedly sampled in the same Epoch or between different Epochs, the average of all the corresponding Zscores is taken as the final Zscore value of the video frame.
5. The method for accelerating training of a multi-target tracking model based on keyframe sampling according to claim 1, characterized in that: In step 3), the weight f(z) is calculated as follows: z is the Zscore value of the current frame. max z min These are the maximum and minimum Zscore values for all video frames globally.
6. The method for accelerating training of a multi-target tracking model based on keyframe sampling according to claim 1, characterized in that: For the trajectory query-based multi-target tracking converter (MOTR), during multi-target tracking model training, a segment is divided into multiple sub-batches and input into the model several times consecutively. Between each sub-batch, a computational graph detach operation is performed on the tensor features held by all trajectories, while inheriting all trajectory queries to ensure the continuity of tracking. The model's loss value is the sum of three loss values: the first part is the focused sigmoid loss between the prediction confidence and the ground truth label of the trajectory; the second part is the L1 loss between the predicted box and the tracked box; and the third part is the generalized intersection-union (CUI) loss between the predicted box and the tracked box. The Adam optimizer is used for optimization, and the network parameters are updated through the backpropagation algorithm. Steps 1)-3) are repeated continuously until the set epoch is completed, at which point training stops.
Citation Information
Patent Citations
Multi-target tracking method and system based on depth condition random field model
CN110047096A
Light tracking: system and method for online top-down human body posture tracking
CN114787865A
