DeepKalPose: An Enhanced Deep-Learning Kalman Filter for Temporally Consistent Monocular Vehicle Pose Estimation
Leandro Di Bella Yangxintong Lyu Adrian Munteanu





af1,af2]Leandro Di Bella
0009-0000-1731-7205
af1,af2]Yangxintong Lyu
0000-0002-2501-9010
af1,af2]Adrian Munteanu
0000-0001-7290-0428

[af1]Department of Electronics and Informatics, Vrije Universiteit Brussel, B-1050 Brussels, Belgium
[af2]imec, Kapeldreef 75, B-3001 Leuven, Belgium
Email: yangxintong.lyu@vub.be


This paper presents DeepKalPose, a novel approach for enhancing temporal consistency in monocular vehicle pose estimation applied on video through a deep-learning-based Kalman Filter. By integrating a Bi-directional Kalman filter strategy utilizing forward and backward time-series processing, combined with a learnable motion model to represent complex motion patterns, our method significantly improves pose accuracy and robustness across various conditions, particularly for occluded or distant vehicles. Experimental validation on the KITTI dataset confirms that DeepKalPose outperforms existing methods in both pose accuracy and temporal consistency.


DeepKalPose:  An Enhanced Deep-Learning Kalman Filter for Temporally Consistent Monocular Vehicle Pose Estimation
    [
    Received XX XX 2024; accepted XX XX XX
=================================================================================================================





§ INTRODUCTION

In recent years, the importance of scene understanding has become increasingly important, particularly in the development of technologies for smart mobility and intelligent transportation systems. The need to comprehend dynamic urban environments underscores the growing need for accurate video-based vehicle 6D pose estimation as real-world environments inherently give rise to dynamic data, such as video streams. However, traditional approaches <cit.> in this domain have primarily focused on image-based methodologies, which often yield temporal pose inconsistencies when applied to video data, processing each frame independently. These inconsistencies manifest as flickering artifacts, where vehicles exhibit jittery or unstable poses across successive frames. This phenomenon is primarily attributed to the absence of temporal constraints and coherency in the estimation process, significantly affecting scenarios involving occluded or distant vehicles leading to huge differences in predicted pose. This means they do not account for the continuity between frames in a video. To address this challenge, a range of innovative methods have been developed in the field of vehicle pose estimation that typically incorporate mechanisms to ensure temporal consistency, thereby reducing such artifacts.

A large body of research <cit.>  has focused on shape completion where candidate shapes are encoded and compared against a predicted model shape, imposing temporal constraint. Yet, these methods often depend on additional data such as CAD models or dense point clouds, which are not always available. More recent works <cit.> propose to impose temporal relationship between frames by leveraging an LSTM-based model for motion learning. Nevertheless, LSTM approaches can suffer from challenges related to far-away detection as well as long-term dependencies. In contrast, particle filter-based methods, like Poisson multi-Bernoulli mixture (PMBM) tracking filter <cit.>, have demonstrated robustness against such challenges. Moreover, <cit.> integrate a 3D Kalman Filter (KF) into their frameworks, leveraging the kinematic motion of vehicles for smoothing and tracking tasks. However, challenges arise when dealing with systems where the underlying dynamics are unknown or have highly nonlinear behavior. Under these conditions, creating a mathematical model for motion becomes very complex.

In this letter, we propose an enhanced deep-learning Kalman Filter-based method (EDLFK) for temporally consistent vehicle pose estimation, dubbed DeepKalPose which is adept at reinforcing temporal consistency that overcomes the mentioned drawbacks. It can effectively address flickering artifacts in vehicle pose estimation by providing more stable and consistent tracking of the vehicle's pose. Our method advances beyond the standard KF by incorporating a bi-branch network for forward and backward time-series analysis. Additionally, our filter integrates deep learning techniques to effectively handle the nonlinear and complex motion patterns of vehicles. By employing an encoder-decoder architecture motion model, our method aims to design a more nuanced representation of vehicular dynamics.
To summarize, our contributions are the following:



     
  * We introduce a novel Bi-directional KF strategy for offline vehicle pose smoothing, which employs both forward and backward processing, allowing an image-based pose estimator to process video.
    
  * We propose a learnable motion model integrated into our Kalman filter, thereby enabling the network to learn more complex and non-linear vehicle motion.
    
  * Comprehensive experimental validation demonstrates that the proposed method outperforms the existing image-based techniques by adding temporal consistency, leading to robustness against occlusion and distant vehicles.






§ NOTATIONS

DeepKalPose estimates and adjusts vehicle pose estimates over sequential frames given the predictions of an existing pose estimator. Given the importance of the yaw angle in vehicle pose estimation, this letter focuses exclusively on the yaw angle within the rotation components. Our dataset, denoted as 𝒟, comprises a series of samples S_i,𝒯, each representing a time-series of vehicle poses. S_i,𝒯 can be formally expressed as:

    S_i,𝒯 = {r_i,k}^𝒯_k=1

Here, 𝒟 =  {S_i,𝒯}^𝒩_i=1 where i ∈{1, ..., 𝒩} with 𝒩 representing the total number of samples. The variable k ∈{1, ... ,𝒯} denotes the discrete time steps with 𝒯 being a fixed time length of the time-series S_i,𝒯. A vehicle pose is represented as r_i,k = [x_i,k, y_i,k, z_i,k,  θ_i,k] ∈ℝ^4 where x_i,k,y_i,k,z_i,k are the 3D translation components of the i^th vehicle sample at timestep k and θ_i,k denotes the yaw or heading angle component. 



§ PROPOSED METHOD

An overview of the methodology is illustrated in Figure <ref>. This method will refine the pose predictions of an existing pose estimator to produce a more accurate and temporally consistent pose time-series output Ŝ_𝒯 using KF algorithm; Refer to <cit.> for a comprehensive explanation of the Kalman filter algorithm. To achieve this, the filter takes the inconsistent pose prediction sequence S_𝒯 as input. At each iteration k, the measurement vector is updated as r_k = [x̅_k, y̅_k, z̅_k, θ̅_k] ∈ S_𝒯. For clarity, the symbol  is used to denote measurements belonging to S_𝒯, differentiating them from the state vector used in the KF. Given the objective of tracking and correcting pose measurements, the state vector is defined as x_k = [x_k, y_k, z_k, θ_k], thereby directing the KF to track the vehicle's pose. However, existing model-based KF methods <cit.> have difficulties solving the temporal consistency since most time-series data from the autonomous driving dataset typically depict vehicles approaching or receding from the camera. Thus, the precision of pose estimation is significantly influenced by the vehicle’s position within the image. Specifically, the accuracy of the estimates is higher for vehicles positioned closer to the camera than for vehicles farther away. This variability in accuracy impacts the effectiveness of KF tracking as the initial measurement and the corresponding precision play a crucial role in setting the starting point of the KF. 

To address this challenge, we propose a bi-branch Kalman Filter approach. The first branch, the forward KF, processes the time-series from timestep k=0 to 𝒯 where 𝒯 is the context length of the input time sequence. Conversely, the backward KF branch processes the time-series in reverse, from the timestep k=𝒯  to 0. By selecting, through the conditional output block (COB), the most favorable samples from the time-series—closer to the camera at the initial step—we enhance the model's ability to accurately predict and track vehicle movements. The algorithm is outlined in Algorithm <ref>. We note that the proposed method acts as an offline smoother and processes the input data on chunks of 𝒯 frames. While this approach does not render the method online, selecting sufficiently small 𝒯 can enable near real-time processing. This method capitalizes on the higher quality of pose estimations near the camera, regardless of their position within the time-series. By feeding each time-series through both the forward and the backward EDLKF, our methodology aims to enhance the robustness and accuracy of pose estimations for distant and partially observed vehicles, as both scenarios present challenges for baseline estimations.






The Kalman Filter necessitates a thorough understanding of the system’s dynamics and noise characteristics to function effectively. However, for the pose estimation task, our limited knowledge of the vehicle’s systems presents a significant challenge. Therefore, instead of using a traditional model-based Kalman Filter, inspired by KalmanNet <cit.>, our DeepKalPose replaces the computation the Kalman gain 𝒦 and both of the covariances v_k and w_k by a Recurrent Neural Network (RNN). Moreover, we propose a novel module, named Future State Predictor (FSP), which is able to learn a predictive motion model, as illustrated in Figure <ref>.  The FSP block follows an encoder-decoder architecture where the encoder takes as input the state  x_k-1 and the sequence that is being processed S_𝒯 with 𝒯 the context length of the sequence and k ∈{0, ... ,𝒯} representing the timestep of the KF iterative process. More precisely, the top branch of the encoder, namely the State Feature Extraction Module (SFEM), processes the current state x_k-1 to derive a feature vector 𝐍. The SFEM captures the relevant aspects of the current state that may influence the future state. The lower branch of the encoder, namely Spatio-Temporal Feature Extraction Module (STFEM) is dedicated to extracting features 𝐏 from the entire sequence S_𝒯. This module analyzes local spatial and temporal patterns in the sequence of 3D position vectors, aiding in predicting the next state. Spatial patterns show the relationships among features like translation and rotation at each timestep, while temporal patterns track changes over time. In contrast, the SFEM focuses on immediate characteristics of the current state. The feature vectors from the SFEM and the STFEM are concatenated into a combined feature vector 𝐀.
The decoder consists of four State Estimation Modules (SEM) which will transform individually the feature vector 𝐀 into the three translation components and the rotation component of the predicted state vector x̂_k.
To train this model, we have used an L1-loss for the translation components as follows :
ℒ_α = |α̂ - α| where α∈{x, y, z} and α̂ denotes the predicted translation values. The rotation loss is defined as: ℒ_θ = 1 - cos(θ̂, θ) where cos is the cosine similarity between the predicted heading angle θ̂ and the ground truth θ. The loss per mini-batch ℬ with the mini-batch size M < 𝒩 is denoted as : 
ℒ_ℬ = 1/M∑_j=1^M1/𝒯∑_k=0^𝒯 (ℒ_x + ℒ_y+ ℒ_z+ ℒ_θ)_j,k





§ EXPERIMENTAL SETUP

The KITTI RAW dataset <cit.> is a widely used dataset for monocular object pose estimation <cit.> and tracking <cit.>. The dataset comprises 51 videos, divided into 39 for training and 12 for validation. It includes a total of 9903 images for training and 2977 images for validation. We segment each sequence into fixed length with 20 timesteps using a stride of 1 for continuity. In total, we have 674 vehicle trajectory patches for training and 375 for validation. To train  DeepKalPose, we extract the pose predictions from an existing vehicle pose estimator <cit.> as r_k. To handle missing data from a non-detected vehicle by the vehicle pose estimator, we applied mean substitution. The network is optimized by Adam Optimizer <cit.> with a learning rate of 0.001 and a weight decay of 0.00001. We take a batch size of 128 on 1 Nvidia GeForce RTX 2080 (12G). The iteration number for the training process is set to 4,000. Evaluation metrics used to compare against D4LCN <cit.> include 3D precision-recall curves with a 3D bounding box IoU threshold of 0.7 and 0.5 for cars as this method performs an object detection step. Against Mono6D <cit.>, evaluation is performed using, for translation, the Average Relative Euclidean Distance (ARED). For rotation, we use the accuracy with threshold δ, denoted Acc(δ), and the median error, Mederr, in degrees. Following the evaluation of D4LCN in <cit.>, we only consider the detected vehicle with a 2D bounding box IoU threshold of 0.5.



§ EXPERIMENTAL RESULTS

 In Table <ref>, we compared our proposed method, DeepKalPose, with the state-of-the-art (SOTA) method D4LCN <cit.>.  One can note that with DeepKalPose, we can significantly outperform D4LCN <cit.>. The average precision @70 of D4LCN improves to 31.12% for Easy, 24.82% for Moderate, and 16.70% for Hard scenarios, compared to 28.07%, 21.56%, and 14.13% respectively without DeepKalPose. The same behavior is observed for the AP@50.
 
 


 
In Table <ref>, the results illustrate the performance differences among the original Mono6D, Mono6D combined with a model-based Kalman filter (MB-KF), and Mono6D enhanced with DeepKalPose. The design of the MB-KF is inspired by the state-of-the-art tracking methodology presented in <cit.>. In the table, the best results are in bold and the second-best are underlined. One can observe that the integration of DeepKalPose led to notable improvements in vehicle 6D pose estimation. As such, the ARED sees an improvement from 5.34% to 3.90% while the MB-KF barely decreases the error. In addition, our method improves the heading angle orientation accuracy (Acc(δ)) by 4.52% for δ = π/6 and 2.08% for δ=π/18 although Mederr slightly increases, where the traditional method tends to replicate the results from the baseline. This result suggests that the EDL Kalman filter's smoothing operation leads to more stable rotations but at the expense of smaller, more frequent errors.
 
 


Furthermore, in scenarios of partial or complete vehicle occlusion in Table <ref>, this experiment reveals that DeepKalPose is robust against occlusion demonstrating a reduction of ARED error from 6.97% to 4.21%. Thanks to the predictive capabilities of the KF and the use of the temporal information from past measurements, DeepKalPose can adjust the initial noisy measurements from the pose estimator due to occlusion and put more emphasis on the learned predicted state vector. Moreover, in Table <ref>, we evaluate both methods for various vehicle distances from the camera. Specifically, for distances exceeding 40 meters (considered as far-away-object detection), our proposed method demonstrates a notable decrease in ARED from 6.28% to 3.55%, indicating a 2.73% improvement. One can note that DeepKalPose utilizes past detections and temporal information effectively to mitigate the impact of distance on model performance, in contrast to the standard pose estimator whose performance diminishes with increasing distance. Figure <ref> confirms the efficacy of DeepKalPose against far-vehicles pose estimation as illustrated by a bigger gap in ARED between the two methods when the distance is increasing. In Figure <ref>, we introduce a comparative visualization on a far-away and occluded vehicle highlighting the flickering artifacts present in the Mono6D estimates, where the 3D bounding boxes show significant rotational fluctuations over time. In contrast, our method introduces a temporal component that significantly enhances stability, with poses temporally coherent and reduced visual artifacts.

In Table <ref>, we mainly study the impact of the STFEM, and the impact of both the forward branch (𝐁_𝐟𝐨𝐫𝐰) and backward branch (𝐁_𝐛𝐚𝐜𝐤). One can observe that for better translation performance, both directions should be taken into account. On top of that, Table <ref> highlights the importance of the STFEM in the Kalman filtering process. A notable limitation of DeepKalPose is its operation as an offline algorithm, processing and analyzing the video data after it is fully processed by the pose estimator, which constrains its online applicability. While the method provides high accuracy and consistency in vehicle pose estimation, it's not ideal for scenarios where a frame needs to be processed immediately once captured. Future work will address this problem, moving from an offline method to an online method. Furthermore, for further improvements, we plan to replace the current empirical Conditional Output Block (COB) with a deep-learning-based confidence network.










§ CONCLUSION

In this letter, we present DeepKalPose, an innovative approach integrating a deep learning-based Kalman Filter to enhance temporal consistency in monocular vehicle 6D pose estimation for video data. Leveraging a learnable motion model, DeepKalPose effectively captures the complex, nonlinear motion patterns of vehicles, significantly surpassing existing methods in accuracy and consistency for 4D object detection and 6D pose estimation tasks. The experimental results demonstrate the model's effectiveness in improving pose estimation accuracy and consistency from single-view images, particularly in challenging conditions such as far-object detection and occlusion. These results affirm the efficacy of our deep-learning-based Kalman Filter in video-based pose estimation and suggest its potential to enhance intelligent transport systems.




This work is funded by Innoviris within the research project TORRES.

Conflict of interest statement: The authors declare no conflict of interest.

Data availability statement: The data that support the findings of this study are available in KITTI RAW
Dataset at [https://www.cvlibs.net/datasets/kitti/], reference number <cit.>.

Credit contribution statement:

    
  * Leandro Di Bella: Conceptualization – Data Curation – Formal Analysis – Investigation - Methodology – Software - Validation – Visualization – Writing-Original Draft – Writing-Review & Editing
    
  * Yangxintong Lyu: Conceptualization - Methodology – Validation - Project Administration – Supervision - Writing-Review & Editing
    
  * Adrian Munteanu: Conceptualization - Project Administration – Supervision - Writing- Review & Editing – Funding Acquisition







ieeetr
















































































































































































































