A trajectory timing optimization method for automatic driving label self-labeling
By employing full-sequence estimation and smoothing, local uncertainty assessment, and adaptive window construction, this method addresses the issues of solution distortion and low accuracy in self-labeled trajectory optimization for autonomous driving, achieving high continuity and stability of trajectory labels. It is suitable for labeling autonomous driving datasets and model training.
Patent Information
- Application Number
- CN202611397828.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-27
AI Technical Summary
Existing self-labeled trajectory optimization methods for autonomous driving are prone to solution distortion, poor adaptability of self-labeled empirical parameters, and insufficient fusion of extreme value constraints and multi-dimensional geometric features in complex scenarios, resulting in trajectory parameter oscillation, low accuracy, and poor stability.
We employ a method that combines full sequence estimation and smoothing, local uncertainty assessment, adaptive window construction, and constraint optimization. By using motion consistency terms and global prior constraints within the local adaptive window, we optimize trajectory labels, achieving synergistic linkage between full-segment smoothing and local correction. This reduces erroneous corrections and improves trajectory continuity.
It improves the overall smoothness of trajectory labels and the correction capability for complex time periods, reduces computational overhead, ensures high continuity and adaptability of labels in the time dimension, is applicable to detection and tracking results from different sources, and significantly improves the trajectory quality of autonomous driving datasets.
Smart Images

Figure CN123179164A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of autonomous driving and intelligent data annotation technology, specifically involving a trajectory timing optimization method for autonomous driving self-annotation. Background Technology
[0002] With the rapid development of autonomous driving technology, offline data mining and automatic labeling using massive amounts of real-world road test data have become an important way to replace high-cost manual labeling and build high-quality perception and prediction datasets. Among them, trajectory temporal optimization technology for autonomous driving self-labeling aims to smooth and correct the structured target trajectory given by upstream detection and tracking offline, so as to obtain a continuous, smooth, and high-precision labeled trajectory that conforms to the physical characteristics of real motion.
[0003] Existing self-labeling trajectory optimization methods for autonomous driving typically rely on classic self-labeling optimization algorithms such as least-squares fitting, traditional matrix inversion, or discrete time-series smoothing to solve for the continuous state and trajectory parameters of dynamic targets (e.g., vehicles, pedestrians, non-motorized vehicles) in the environment. However, when faced with complex real-world autonomous driving road conditions and long-term time-series data, existing self-labeling technologies generally suffer from the following defects and bottlenecks:
[0004] Distortion in complex degradation scenarios: In data degradation scenarios such as the target moving straight, making sharp turns, being occluded, or the detection box jittering, time-series observation data often exhibits high-dimensional redundancy. Existing self-labeled inversion algorithms are sensitive to measurement noise when processing such ill-conditioned data, which can easily lead to drastic fluctuations in the numerical values of the solved trajectory parameters, deviating from the true trajectory of the target.
[0005] Poor adaptability and accuracy bottleneck of self-labeled empirical parameters: When introducing regularization constraints, existing self-labeled trajectory optimization algorithms typically rely on empirical settings or manual tuning for their regularization parameters, making it impossible to dynamically and adaptively adjust them according to different road conditions. This makes it difficult for the algorithm to achieve a balance between "residual minimization" and "temporal smoothness constraints." When dealing with complex multivariate scenarios, traditional self-labeling optimization methods have slow convergence speeds, and the accuracy of trajectory labels is insufficient to meet the requirements of high-precision self-labeling.
[0006] Insufficient fusion of extreme value constraints and multidimensional geometric features: Autonomous driving trajectories contain rich extreme value features and modulus geometric constraints in the spatiotemporal dimensions. Existing autonomous driving self-labeling optimization algorithms fail to deeply integrate the extreme value geometric features, physical modulus constraints, and local correction processes of the trajectory, which easily leads to problems such as local minimum convergence and blurred convergence boundaries. This not only reduces the stability of trajectory temporal optimization but also limits the applicability of self-labeling systems in complex evolutionary trajectory scenarios.
[0007] Therefore, how to provide a high-precision trajectory timing optimization scheme that can take into account both the continuity of the whole segment and the details of local motion, and reduce erroneous corrections and boundary jumps for autonomous driving self-annotation scenarios is a technical problem that urgently needs to be solved in the field of autonomous driving self-annotation. Summary of the Invention
[0008] To address the problems in existing technologies, such as the disconnect between overall smoothing and local correction, excessive redundant calculations and erroneous corrections due to unnecessary segment trajectory optimization, non-adjustable window size, and difficulty in unifying inputs caused by diverse sources of upstream detection and tracking results, this application proposes a trajectory temporal optimization method for self-labeling of autonomous driving tags, which specifically includes the following steps:
[0009] Step S1, Full Sequence Estimation and Smoothing: Obtain at least one target state sequence arranged by time as the structured target trajectory to be refined. Preprocess the structured target trajectory, wherein the state at each time step includes at least time information, observation state vector, and observation confidence. Perform forward state estimation and full backward smoothing on the structured target trajectory to obtain the global smoothed state and global smoothed covariance corresponding to each time step. And positive observation innovation;
[0010] Step S2, Local Uncertainty Assessment: Based on the global smoothing covariance and the positive observation innovation at each time point, calculate the local uncertainty at the corresponding time point. ;
[0011] Step S3, Adaptive window construction: Based on the local uncertainty, identify the interval to be corrected, and dynamically expand it in the earlier and later time directions to determine the local adaptive window;
[0012] Step S4, Constraint optimization solution: Within the local adaptive window, a local motion consistency term is constructed based on neighborhood observations, and a global prior constraint term is constructed based on the global smooth state and global smooth covariance at the corresponding time. The objective function is then solved to obtain the local optimized state.
[0013] S5, Write Back and Fuse Results: Write the local optimized state back to the structured trajectory, and perform weighted fusion on the estimated state at repeated coverage times to output a spatiotemporally continuous optimized trajectory label.
[0014] Specifically, in step S1, the observation state vector includes at least the position. ,speed acceleration Orientation Other attributes Target trajectory Represented as:
[0015] ,
[0016] in, Indicates the first The state of observation at any given moment. This represents the corresponding observation confidence level. Indicates the length of the trajectory
[0017] No. Observation status at any moment It can be represented as:
[0018] ,
[0019] The preprocessing method for structured target trajectories is as follows: the target state sequence is sorted by time information, missing observations are marked, the consistency of category and identity identifiers within the same structured target trajectory is checked, and the observation confidence scores are normalized to a uniform range; if no confidence score is obtained, the confidence score of the effective observations is set to a preset constant. Then, based on the category or motion characteristics of the target object, a corresponding state propagation model is matched. The state model includes constant velocity, constant acceleration, constant turning rate and velocity, or constant turning rate and acceleration model.
[0020] Specifically, in step S1, the method for performing the forward state estimation is as follows:
[0021] First, calculate the predicted state and the predicted covariance. For a linear motion model, the... Predicted state at time and predicted covariance They are respectively:
[0022] ,
[0023] ,
[0024] in, Here is the state transition matrix. Transpose it. For process noise covariance;
[0025] Then, the observed innovation and innovation covariance are calculated, where the first... Innovation in the observation of time The innovation covariance is as follows:
[0026] ,
[0027] ,
[0028] in, For the observation matrix, Transpose it. To observe the noise covariance; the first The Kalman gain at time t is:
[0029] ,
[0030] Based on current observations, the current state and covariance are updated as follows:
[0031] ,
[0032] ;
[0033] in, The identity matrix is used. When a nonlinear motion model is adopted, extended Kalman filtering is performed through the state propagation function and its Jacobian matrix, or unscented Kalman filtering is performed through unscented transformation. If there is no effective observation at a certain moment, the predicted state and prediction covariance at that moment are retained.
[0034] The specific method for performing whole-segment backward smoothing is as follows:
[0035] After completing the forward state estimation for all time points, a backward recursion is performed, and the th... The backward smoothing gain at time t is :
[0036] ,
[0037] in, Non-negative regularization coefficients are used to prevent ill-conditioned matrices; global smoothing state. for:
[0038] ,
[0039] The global smoothing covariance is:
[0040] ,
[0041] in, For the first The global smooth state at any given moment. For the corresponding global smoothing covariance, To smooth the gain The transpose of .
[0042] After completing the forward recursion, save the global smoothing state, global smoothing covariance, observation innovation obtained in the forward estimation stage, innovation covariance, and observation confidence at each time step. When the matrix is not invertible, add a regularization term to the matrix, or use the Moore-Penrose pseudo-inverse. For nonlinear motion models, extended RTS smoothing or unscented RTS smoothing can be used.
[0043] Specifically, in step S2, the calculation method for the local uncertainty at each time point is as follows:
[0044] Using a preset selection matrix to extract the dimensions of the state to be refined Extract the global smoothed covariance trace as a covariance characterization measure. ,
[0045] ,
[0046] in, The trace of a matrix is the sum of the elements on its main diagonal. and These are the selection matrix and its transpose used to extract the dimensions of the state to be refined.
[0047] Based on the positive observed innovation and the corresponding innovation covariance, the normalized squared innovation is calculated as a measure of innovation. ,
[0048] ,
[0049] in, For the first Innovation in the observation of time Transpose it. For the corresponding innovation covariance, The non-negative regularization coefficient is set to prevent ill-conditioned matrices, where I is the identity matrix.
[0050] Normalized squared innovation is a statistic used in state estimation to measure the consistency between observations and predictions. An increase in its value indicates a greater discrepancy between actual observations and the predictions of the motion model. After normalizing the covariance and innovation metrics respectively, the local uncertainty is derived by weighting and summing them according to preset weights. Specifically:
[0051] ;
[0052] in, , Preferred to satisfy ; For normalization, the maximum-minimum normalization method is preferred.
[0053] When a valid observation is missing at a certain moment, the local uncertainty at that moment is determined solely based on the covariance characterization.
[0054] Specifically, in step S3, the method for determining the local adaptive window is as follows:
[0055] Set high threshold and low threshold ,satisfy , will continuously satisfy the above The time intervals are merged and defined as the initial interval to be corrected;
[0056] For each initial interval to be corrected, the process expands towards both earlier and later times until either of the following conditions is met, at which point the local adaptive window is constructed: The local uncertainty is satisfied... The reliable boundary, the preset maximum window length, the start or end point of the trajectory, or the preset minimum number of effective observations are met.
[0057] Specifically, the method of determining the local adaptive window also includes: when multiple local adaptive windows overlap in time, merging the overlapping windows into a larger window, or solving independently in each local adaptive window and then performing weighted fusion.
[0058] Specifically, in step S4, the objective function includes the local motion consistency term, the global prior constraint term, and the boundary continuity term, as follows:
[0059] For the time to be corrected Based on the state at that moment For local optimization variables, use the state propagation function Propagate the state to the time within the window Then use the observation function The corresponding predicted observations are obtained, and their local observation residuals are:
[0060] ;
[0061] Based on observation confidence level and global smoothing covariance Jointly set the observation weights within the window :
[0062] ;
[0063] in, The normalized observation confidence level; For the set of times within the window, For indexing; The positive regularization coefficient is non-negative. For unnormalized observation weights,
[0064] ,
[0065] in, The selection matrix used to extract the state dimensions to be refined can be used to select state dimensions such as position, velocity, and heading, as needed. Transpose it;
[0066] The local motion consistency term for:
[0067] ,
[0068] The global prior constraints for:
[0069] ,
[0070] The boundary continuity term for:
[0071] ,
[0072] in, For loss function, These are the global prior constraint coefficients. and These represent the front and back reliable boundaries of the local adaptive window, respectively. and These are the boundary constraint coefficients; For local observation residuals, For the first Observe the noise covariance at all times. It is the identity matrix. For the local state to be optimized, and Let represent the global smooth state and its covariance at the corresponding time point. , Here is the state propagation function;
[0073] Further construct the local optimization objective function :
[0074] .
[0075] Specifically, the boundary continuity term uses the global smooth state of the front and back reliable boundaries of the local variable window as a constraint condition; during optimization, the corresponding global smooth state is used as the initial state for local optimization, and the Levenberg-Marquardt algorithm is used for nonlinear least squares solution; if the number of effective observations in the local window is insufficient, local optimization is not performed; if the window is located at the starting or ending point of the trajectory and lacks two-sided reliable boundaries, a one-sided boundary constraint is used.
[0076] Specifically, in step S5, the result write-back and fusion process includes finally writing the local results back to the entire trajectory: reliable time periods continue to use the global smoothing state, while successfully optimized time periods use the local results; if multiple windows cover the same moment, weighted fusion is performed based on covariance. Specifically:
[0077] For moments not covered by the local adaptive window, the global smoothness obtained in step S1 is directly retained as the final fusion state. ,Right now:
[0078] ;
[0079] For the same moment when the local adaptive window repeatedly covers the same area, the estimated state is obtained based on the optimization of each window. and its corresponding covariance The final fusion state and fusion covariance at this moment are derived using an inverse covariance weighted fusion method, where... To cover the local adaptive window number at that moment, i.e.:
[0080] ;
[0081] ;
[0082] in, To cover the local adaptive window number at that moment, the above formula includes a superscript. The state and covariance represent the state of the first... The estimated state and its covariance are obtained for each window at that moment. Finally, the refined state is written back to the target trajectory in chronological order. The target category and identification remain unchanged; the target's position, velocity, acceleration, and orientation are updated based on the optimization results. Whether the target size participates in the optimization can be determined according to application requirements.
[0083] Preferably, the trajectory temporal optimization method for autonomous driving tag self-labeling is applied to offline 3D multi-object tracking and 4D annotation scenarios for autonomous driving; wherein, the observation state vector of the structured trajectory at least includes the center coordinates of the 3D target box. 3D target bounding box size Planar velocity and heading angle Furthermore, the target category and identity identifier remain fixed and are not used as continuous optimization variables in the constraint optimization described in step S4.
[0084] Compared with existing whole-segment smoothing and fixed-window correction methods, the present invention has the following main advantages when used for self-label optimization:
[0085] (1) Achieving synergistic linkage between whole-segment smoothing and local correction improves the overall smoothness of labels and the correction capability in complex time periods. This invention does not simply connect whole-segment smoothing and local windows, but directly introduces the state obtained from whole-segment smoothing and its uncertainty information into the local correction process to guide the correction initiation position, window size determination, and the degree to which local results are constrained by the overall trend. As a result, erroneous corrections can be effectively avoided in stable time periods, while more targeted corrections can be implemented in complex scenarios such as sharp turns, occlusion, and detection jitter, making it more suitable for 4D automatic annotation and model training labels.
[0086] (2) Local optimization is performed only during unreliable periods to reduce erroneous corrections and computational overhead. This invention judges local uncertainty based on the estimated stability and observation consistency, and performs local optimization only on high uncertainty intervals; for periods with stable motion and reliable observations, the entire smoothing result is directly retained. This strategy avoids computational redundancy and erroneous corrections caused by large-scale point-by-point corrections of the entire trajectory, and better meets the stability and controllability requirements of self-labeled production lines.
[0087] (3) The window size adapts and changes adaptively, while maintaining a smooth transition at the boundaries. In this invention, the window length is not a fixed value, but rather extends to both sides to the more reliable boundaries based on the degree of unreliability. At the same time, local corrections are constrained by the overall smoothing result and utilize the reliable states before and after the window to achieve a smooth transition. This mechanism effectively avoids the problem of discontinuity at the boundaries after local corrections, enabling the optimized labels to have higher continuity in the time dimension.
[0088] (4) Low input requirements, high versatility, and quantifiable results. This invention relies solely on structured target trajectories, requiring no original images, point clouds, high-precision maps, or specific upstream tracker internal features. Therefore, it is easily integrated into automatic annotation processes composed of detection and tracking results from different sources. Validated on the large-scale autonomous driving dataset nuScenes, this method significantly improves the quality of the output trajectories of existing self-annotation methods. Attached Figure Description
[0089] Figure 1 This is the overall flowchart of the present invention;
[0090] Figure 2 A diagram showing the global and local collaborative relationships;
[0091] Figure 3 This is a schematic diagram of a partially variable window;
[0092] Figure 4 Refine the system structure diagram for the target trajectory;
[0093] Figure 5 Comparison charts showing the refined visualization effects of trajectories during turning motion;
[0094] Figure 6 A comparison chart showing the refined visualization of the trajectory under straight-line motion. Detailed Implementation Specific implementation method one:
[0096] Combination Figure 1 This embodiment describes the overall process. This embodiment provides a trajectory timing optimization method for self-labeling of autonomous driving tags, specifically as follows:
[0097] Step S1, Full Sequence Estimation and Smoothing: Obtain at least one target state sequence arranged by time as the structured target trajectory to be refined. Preprocess the structured target trajectory, wherein the state at each time step includes at least time information, observation state vector, and observation confidence. Perform forward state estimation and full backward smoothing on the structured target trajectory to obtain the global smoothed state and global smoothed covariance corresponding to each time step. And positive observation innovation;
[0098] Specifically, in step S1, the observation state vector includes at least the position. ,speed acceleration Orientation Other attributes Target trajectory Represented as:
[0099] ,
[0100] in, Indicates the first The state of observation at any given moment. This represents the corresponding observation confidence level. Indicates the length of the trajectory
[0101] No. Observation status at any moment It can be represented as:
[0102] ,
[0103] The preprocessing method for structured target trajectories is as follows: the target state sequence is sorted by time information, missing observations are marked, the consistency of category and identity identifiers within the same structured target trajectory is checked, and the observation confidence scores are normalized to a uniform range; if no confidence score is obtained, the confidence score of the effective observations is set to a preset constant. Then, based on the category or motion characteristics of the target object, a corresponding state propagation model is matched. The state model includes constant velocity, constant acceleration, constant turning rate and velocity, or constant turning rate and acceleration model.
[0104] Specifically, in combination Figure 2 The explanation is as follows: In step S1, the method for performing forward state estimation is as follows:
[0105] First, calculate the predicted state and the predicted covariance. For a linear motion model, the... Predicted state at time and predicted covariance They are respectively:
[0106] ,
[0107] ,
[0108] in, Here is the state transition matrix. Transpose it. For process noise covariance;
[0109] Then, the observed innovation and innovation covariance are calculated, where the first... Innovation in the observation of time The innovation covariance is as follows:
[0110] ,
[0111] ,
[0112] in, For the observation matrix, Transpose it. To observe the noise covariance; the first The Kalman gain at time t is:
[0113] ,
[0114] Based on current observations, the current state and covariance are updated as follows:
[0115] ,
[0116] ;
[0117] in, The identity matrix is used. When a nonlinear motion model is adopted, extended Kalman filtering is performed through the state propagation function and its Jacobian matrix, or unscented Kalman filtering is performed through unscented transformation. If there is no effective observation at a certain moment, the predicted state and prediction covariance at that moment are retained.
[0118] The specific method for performing whole-segment backward smoothing is as follows:
[0119] After completing the forward state estimation for all time points, a backward recursion is performed, and the th... The backward smoothing gain at time t is :
[0120] ,
[0121] in, Non-negative regularization coefficients are used to prevent ill-conditioned matrices; global smoothing state. for:
[0122] ,
[0123] The global smoothing covariance is:
[0124] ,
[0125] in, For the first The global smooth state at any given moment. For the corresponding global smoothing covariance, To smooth the gain The transpose of .
[0126] After completing the forward recursion, save the global smoothing state, global smoothing covariance, observation innovation obtained in the forward estimation stage, innovation covariance, and observation confidence at each time step. When the matrix is not invertible, add a regularization term to the matrix, or use the Moore-Penrose pseudo-inverse. For nonlinear motion models, extended RTS smoothing or unscented RTS smoothing can be used.
[0127] Step S2, Local Uncertainty Assessment: Based on the global smoothing covariance and the positive observation innovation at each time point, calculate the local uncertainty at the corresponding time point. ;
[0128] Specifically, in step S2, the calculation method for the local uncertainty at each time point is as follows:
[0129] Using a preset selection matrix to extract the dimensions of the state to be refined Extract the global smoothed covariance trace as a covariance characterization measure. ,
[0130] ,
[0131] in, The trace of a matrix is the sum of the elements on its main diagonal. and These are the selection matrix and its transpose used to extract the dimensions of the state to be refined.
[0132] Based on the positive observed innovation and the corresponding innovation covariance, the normalized squared innovation is calculated as a measure of innovation. ,
[0133] ,
[0134] in, For the first Innovation in the observation of time Transpose it. For the corresponding innovation covariance, The non-negative regularization coefficient is set to prevent ill-conditioned matrices, where I is the identity matrix.
[0135] Normalized squared innovation is a statistic used in state estimation to measure the consistency between observations and predictions. An increase in its value indicates a greater discrepancy between actual observations and the predictions of the motion model. After normalizing the covariance and innovation metrics respectively, the local uncertainty is derived by weighting and summing them according to preset weights. Specifically:
[0136] ;
[0137] in, , Preferred to satisfy ; For normalization, the maximum-minimum normalization method is preferred.
[0138] When a valid observation is missing at a certain moment, the local uncertainty at that moment is determined solely based on the covariance characterization.
[0139] Combination Figure 3 Step S3, adaptive window construction: Based on the local uncertainty, the interval to be corrected is identified and dynamically expanded in the earlier and later time directions to determine the local adaptive window;
[0140] Specifically, in step S3, the method for determining the local adaptive window is as follows:
[0141] Set high threshold and low threshold ,satisfy , will continuously satisfy the above The time intervals are merged and defined as the initial interval to be corrected;
[0142] For each initial interval to be corrected, the process expands towards both earlier and later times until either of the following conditions is met, at which point the local adaptive window is constructed: The local uncertainty is satisfied... The reliable boundary, the preset maximum window length, the start or end point of the trajectory, or the preset minimum number of effective observations are met.
[0143] Specifically, the method of determining the local adaptive window also includes: when multiple local adaptive windows overlap in time, merging the overlapping windows into a larger window, or solving independently in each local adaptive window and then performing weighted fusion.
[0144] Step S4, Constraint optimization solution: Within the local adaptive window, a local motion consistency term is constructed based on neighborhood observations, and a global prior constraint term is constructed based on the global smooth state and global smooth covariance at the corresponding time. The objective function is then solved to obtain the local optimized state.
[0145] Specifically, in step S4, the objective function includes the local motion consistency term, the global prior constraint term, and the boundary continuity term, as follows:
[0146] For the time to be corrected Based on the state at that moment For local optimization variables, use the state propagation function Propagate the state to the time within the window Then use the observation function The corresponding predicted observations are obtained, and their local observation residuals are:
[0147] ;
[0148] Based on observation confidence level and global smoothing covariance Jointly set the observation weights within the window:
[0149] ;
[0150] in, The normalized observation confidence level; For the set of times within the window, For indexing; The positive regularization coefficient is non-negative. For unnormalized observation weights,
[0151] ,
[0152] in, The selection matrix used to extract the state dimensions to be refined can be used to select state dimensions such as position, velocity, and heading, as needed. Transpose it;
[0153] The local motion consistency term is:
[0154] ,
[0155] The global prior constraint term is:
[0156] ,
[0157] The boundary continuity term is:
[0158] ,
[0159] in, For loss function, These are the global prior constraint coefficients. and These represent the front and back reliable boundaries of the local adaptive window, respectively. and These are the boundary constraint coefficients; For local observation residuals, For the first Observe the noise covariance at all times. It is the identity matrix. For the local state to be optimized, and Let represent the global smooth state and its covariance at the corresponding time point. , This is the state propagation function.
[0160] Further construct the local optimization objective function:
[0161] .
[0162] Specifically, the boundary continuity term uses the global smooth state of the front and back reliable boundaries of the local variable window as a constraint condition; during optimization, the corresponding global smooth state is used as the initial state for local optimization, and the Levenberg-Marquardt algorithm is used for nonlinear least squares solution; if the number of effective observations in the local window is insufficient, local optimization is not performed; if the window is located at the starting or ending point of the trajectory and lacks two-sided reliable boundaries, a one-sided boundary constraint is used.
[0163] Combination Figure 5 This embodiment describes the target trajectory processing flow.
[0164] S5, Write back and fuse the results: Write the local optimized state back to the structured trajectory, and perform weighted fusion on the estimated state at repeated coverage times to output spatiotemporally continuous optimized trajectory labels.
[0165] Specifically, in step S5, the result write-back and fusion process includes finally writing the local results back to the entire trajectory: reliable time periods continue to use the global smoothing state, while successfully optimized time periods use the local results; if multiple windows cover the same moment, weighted fusion is performed based on covariance. Specifically:
[0166] For moments not covered by the local adaptive window, the global smoothness obtained in step S1 is directly retained as the final fusion state. ,Right now:
[0167] ;
[0168] For the same moment when the local adaptive window repeatedly covers the same area, the estimated state is obtained based on the optimization of each window. and its corresponding covariance The final fusion state and fusion covariance at this moment are derived using an inverse covariance weighted fusion method, where m is the local adaptive window number covering this moment, i.e.:
[0169] ;
[0170] ;
[0171] in, To cover the local adaptive window number at that moment, the above formula includes a superscript. The state and covariance represent the state of the first... The estimated state and its covariance are obtained for each window at that time. Finally, the refined state is written back to the target trajectory in chronological order. The dimensions of the 3D target bounding box. For planar velocity, For the target heading angle, For observation confidence level, CLS represents the target category and ID represents the target identity identifier.
[0172] Target category and identity are not considered as continuous optimization variables. For targets such as vehicles that may turn, a constant turning rate and acceleration model is used; for targets such as pedestrians, a constant velocity model or a constant acceleration model can be used, with appropriate process noise set.
[0173] First, RTS smoothing is performed on the complete 3D target trajectory. Then, local uncertainty is calculated based on the covariance and innovative residuals corresponding to position, velocity, and heading. When the vehicle makes a sharp turn, experiences a short-term occlusion, or the detection frame changes significantly, the local uncertainty increases in the corresponding time period. The system automatically forms and expands a local window, within which past and future observations are used to jointly optimize the target state.
[0174] Local optimization uses the RTS smoothed state as the initial state and global prior. High-confidence, low-covariance neighborhood observations have higher weights; low-confidence, high-covariance states, or states obtained by filling in missing observations, have lower weights. The final output is a spatiotemporally continuous 3D target trajectory, which can be directly used for 4D automatic annotation, detection and tracking model training, trajectory prediction training, and manual annotation preprocessing.
[0175] Combination Figure 5 , Figure 6 The experimental results demonstrate that, after refinement using the above procedure, the overall trajectory is more continuous, and local maneuvers such as sharp turns and occlusions more closely resemble actual observations. There are fewer jumps in position, velocity, and heading at the window boundaries. Furthermore, periods of stable motion and reliable observation are typically not additionally rewritten, thus reducing erroneous corrections. The method relies solely on structured trajectories, facilitating the integration of offline tracking results from various sources.
[0176] Meanwhile, this method was tested on the large-scale autonomous driving dataset nuScenes. The test results show that the optimization strategy proposed in this method can significantly improve the quality of the trajectory labels output by the self-labeling algorithm. On the one hand, it improves the smoothness and motion rationality of the trajectory, and on the other hand, it can effectively reduce the localization error and attitude error of each label, thereby reducing the false detection and false negative detection of the target.
[0177] The scope of this invention is not limited to the above-described embodiments; a combination of one or more specific embodiments can also achieve the purpose of the invention.
Claims
1. A trajectory timing optimization method for self-labeling of autonomous driving tags, characterized in that, Includes the following steps: Step S1, Full Sequence Estimation and Smoothing: Obtain at least one target state sequence arranged by time as the structured target trajectory to be refined. Preprocess the structured target trajectory, wherein the state at each time step includes at least time information, observation state vector, and observation confidence. Perform forward state estimation and full backward smoothing on the structured target trajectory to obtain the global smoothed state and global smoothed covariance corresponding to each time step. And positive observation innovation; Step S2, Local Uncertainty Assessment: Based on the global smoothing covariance and the positive observation innovation at each time point, calculate the local uncertainty at the corresponding time point. ; Step S3, Adaptive window construction: Based on the local uncertainty, identify the interval to be corrected, and dynamically expand it in the earlier and later time directions to determine the local adaptive window; Step S4, Constraint optimization solution: Within the local adaptive window, a local motion consistency term is constructed based on neighborhood observations, and a global prior constraint term is constructed based on the global smooth state and global smooth covariance at the corresponding time. The objective function is then solved to obtain the local optimized state. S5, Write Back and Fuse Results: Write the local optimized state back to the structured trajectory, and perform weighted fusion on the estimated state at repeated coverage times to output a spatiotemporally continuous optimized trajectory label.
2. The trajectory timing optimization method for self-labeling of autonomous driving tags according to claim 1, characterized in that, In step S1, the observation state vector includes at least the position. ,speed acceleration Orientation Other attributes Target trajectory Represented as: , in, Indicates the first The state of observation at any given moment. This represents the corresponding observation confidence level. Indicates the length of the trajectory No. Observation status at any moment It can be represented as: , The preprocessing method for structured target trajectories is as follows: the target state sequence is sorted by time information, missing observations are marked, the consistency of category and identity identifiers within the same structured target trajectory is checked, and the observation confidence scores are normalized to a uniform range; if no confidence score is obtained, the confidence score of the effective observations is set to a preset constant. Then, based on the category or motion characteristics of the target object, a corresponding state propagation model is matched. The state model includes constant velocity, constant acceleration, constant turning rate and velocity, or constant turning rate and acceleration model.
3. The trajectory timing optimization method for self-labeling of autonomous driving tags according to claim 1, characterized in that, In step S1, the method for performing forward state estimation is specifically as follows: First, calculate the predicted state and the predicted covariance. For a linear motion model, the... Predicted state at time and predicted covariance They are respectively: , , in, Here is the state transition matrix. Transpose it. For process noise covariance; Then, the observed innovation and innovation covariance are calculated, where the first... Innovation in the observation of time The innovation covariance is as follows: , , in, For the observation matrix, Transpose it. To observe the noise covariance; the first The Kalman gain at time t is: , Based on current observations, the current state and covariance are updated as follows: , ; in, The identity matrix is used. When a nonlinear motion model is adopted, extended Kalman filtering is performed through the state propagation function and its Jacobian matrix, or unscented Kalman filtering is performed through unscented transformation. If there is no effective observation at a certain moment, the predicted state and prediction covariance at that moment are retained. The specific method for performing whole-segment backward smoothing is as follows: After completing the forward state estimation for all time points, a backward recursion is performed, and the th... The backward smoothing gain at time t is : , in, Non-negative regularization coefficients are used to prevent ill-conditioned matrices; global smoothing state. for: , The global smoothing covariance is: , in, For the first The global smooth state at any given moment. For the corresponding global smoothing covariance, To smooth the gain transpose; After completing the forward recursion, save the global smoothing state, global smoothing covariance, observation innovation, innovation covariance, and observation confidence at each time step; when the matrix is not invertible, add a regularization term to the matrix, or use Moore-Penrose pseudo-inverse; for nonlinear motion models, extended RTS smoothing or unscented RTS smoothing can be used.
4. The trajectory timing optimization method for self-labeling of autonomous driving tags according to claim 1, characterized in that, In step S2, the calculation method for the local uncertainty at each time point is as follows: Using a preset selection matrix to extract the dimensions of the state to be refined Extract the trace of the global smoothing covariance as a covariance characterization measure. ; Based on the positive observed innovation and the corresponding innovation covariance, the normalized squared innovation is calculated as a measure of innovation. ; After normalizing the covariance and innovation metrics respectively, the local uncertainty is derived by weighted summation according to preset weights. Specifically: ; in, , ; For normalization processing; When a valid observation is missing at a certain moment, the local uncertainty at that moment is determined solely based on the covariance characterization.
5. The trajectory timing optimization method for self-labeling of tags in autonomous driving according to claim 1, characterized in that, In step S3, the method for determining the local adaptive window is specifically as follows: Set high threshold and low threshold ,satisfy , will continuously satisfy the above The time intervals are merged and defined as the initial interval to be corrected; For each initial interval to be corrected, the process expands towards both earlier and later times until either of the following conditions is met, at which point the local adaptive window is constructed: The local uncertainty is satisfied... The reliable boundary, the preset maximum window length, the start or end point of the trajectory, or the preset minimum number of effective observations are met.
6. The trajectory timing optimization method for self-labeling of autonomous driving tags according to claim 5, characterized in that, The method for determining the local adaptive window also includes: when multiple local adaptive windows overlap in time, merging the overlapping windows into a larger window, or solving independently within each local adaptive window and then performing weighted fusion.
7. The trajectory timing optimization method for self-labeling of autonomous driving tags according to claim 1, characterized in that, In step S4, the objective function includes the local motion consistency term, the global prior constraint term, and the boundary continuity term, specifically: For the time to be corrected Based on the state at that moment For local optimization variables, use the state propagation function Propagate the state to the time within the window Then use the observation function The corresponding predicted observations are obtained, and their local observation residuals are: ; Based on observation confidence level and global smoothing covariance Jointly set the observation weights within the window : ; in, This represents the normalized observation confidence level. For the set of times within the window, For indexing; The positive regularization coefficient is non-negative. For unnormalized observation weights, ; in, The selection matrix used to extract the state dimensions to be refined can be used to select state dimensions such as position, velocity, and heading, as needed. Its transpose; the local motion consistency term for: , The global prior constraints for: , The boundary continuity term for: , in, For loss function, These are the global prior constraint coefficients. and These are the front and back reliable boundaries of the local adaptive window, respectively. and These are the boundary constraint coefficients; For local observation residuals, For the first Observe the noise covariance at all times. It is the identity matrix. For the local state to be optimized, and Let represent the global smooth state and its covariance at the corresponding time point. , Here is the state propagation function; Further construct the local optimization objective function : 。 8. The trajectory timing optimization method for self-labeling of autonomous driving tags according to claim 7, characterized in that, The boundary continuity term uses the global smooth state of the front and back reliable boundaries of the local variable window as a constraint condition. During optimization, the corresponding global smooth state is used as the initial state for local optimization, and the Levenberg-Marquardt algorithm is used for nonlinear least squares solution. If the number of effective observations in the local window is insufficient, local optimization is not performed. If the window is located at the starting or ending point of the trajectory and lacks two-sided reliable boundaries, a one-sided boundary constraint is used.
9. The trajectory timing optimization method for self-labeling of autonomous driving tags according to claim 1, characterized in that, In step S5, the specific steps of writing back and fusing the results include: For moments not covered by the local adaptive window, the global smoothness obtained in step S1 is directly retained as the final fusion state; for moments repeatedly covered by multiple local adaptive windows, the final fusion state and fusion covariance at that moment are derived by using an inverse covariance weighted fusion method based on the estimated state and its corresponding covariance obtained by each window optimization.
10. A trajectory timing optimization method for self-labeling of autonomous driving tags according to claim 7, characterized in that, The trajectory temporal optimization method for autonomous driving label self-annotation is applied to offline 3D multi-object tracking and 4D annotation scenarios for autonomous driving; wherein, the observation state vector of the structured trajectory at least includes the center coordinates of the 3D target box. 3D target bounding box size Planar velocity and heading angle Furthermore, the target category and identity identifier remain fixed and are not used as continuous optimization variables in the constraint optimization described in step S4.
