Temporally Consistent Depth Prediction With Flow-Guided Memory Units

Chanho Eom, Hyunjong Park, Bumsub Ham

TL;DR

This paper introduces a novel deep learning architecture for monocular depth estimation that eliminates "flickering" artifacts in videos. By using a flow-guided memory module (based on ConvGRUs) that explicitly aligns past information with the current frame using optical flow, the model achieves state-of-the-art accuracy and superior temporal stability.

What Problem Does This Paper Address?

Predicting depth from a single camera (monocular depth estimation) is a cornerstone of autonomous driving and robotics. While Convolutional Neural Networks (CNNs) have become quite good at estimating depth from a single still image, they struggle with video.

Most existing models process video frames independently. Because the network's "guess" for a pixel's depth can change slightly frame-to-frame due to noise or minor viewpoint shifts, the resulting video suffers from temporal flickering. This inconsistency isn't just a visual nuisance; it makes the depth data unreliable for downstream tasks like path planning or obstacle avoidance. The challenge is: how do we "remember" depth information from previous frames and apply it correctly to the current frame, even as the camera and objects move?

Methods

The authors propose a three-part architecture designed to enforce long-term temporal consistency:

  1. Two-Stream Encoder: Instead of a single input, the model uses two streams. One encodes spatial features (appearance and layout from the current frame), and the other encodes temporal features (motion cues from optical flow). The authors argue that decoupling these allows the model to better exploit motion parallax—the phenomenon where closer objects appear to move faster across the field of view.
  2. Flow-Guided Memory Module: This is the core innovation. It uses Convolutional Gated Recurrent Units (ConvGRUs) to maintain a "hidden state" (a memory of the scene). Crucially, because the camera moves, a pixel at coordinates $(x, y)$ in the previous frame doesn't represent the same physical point in the current frame. The module uses a refined optical flow to warp the previous hidden state, aligning it with the current frame before updating the memory.
  3. Flow Refine Network: Since standard optical flow can be noisy (especially at object boundaries), the authors include a sub-network that refines the flow specifically to improve feature alignment within the memory module.

The system is trained using a combination of scale-invariant loss (to handle the inherent ambiguity of monocular depth), photometric consistency (to train the flow refinement), and smoothness terms.

Datasets

The model was trained and evaluated on:

  • KITTI: The standard benchmark for autonomous driving, providing stereo images and LiDAR ground truth.
  • Cityscapes: Used for pre-training and fine-tuning to demonstrate the model's ability to handle diverse urban environments.
  • NYU Depth V2: Used to test the model's generalization capabilities on indoor scenes.

Key Insights and Ideas

  • Alignment is Everything: Simply adding an RNN (like an LSTM or GRU) to a depth network isn't enough. Without explicit spatial alignment (warping) via optical flow, the "memory" becomes a blurred mess of misaligned features, which can actually increase flickering.
  • Decoupling Spatial and Temporal Cues: Learning appearance and motion separately is more effective than feeding a "stack" of frames into a single CNN. Optical flow provides a direct geometric cue for depth that appearance-based streams often overlook.
  • Selective Memory: The ConvGRU's gating mechanism allows the model to "choose" which parts of the previous depth estimate to keep and which to update based on new visual evidence or occlusions.

Key Results

  • State-of-the-Art Performance: At the time of publication, the model achieved the highest accuracy on the KITTI benchmark among monocular methods.
  • Temporal Stability: The authors introduced a metric called Temporal Difference of Depth (TDT). Their model significantly outperformed competitors (like Godard et al. and Zhou et al.), producing depth maps that are visually smooth and temporally stable.
  • Efficiency: Despite the complexity of the two-stream encoder and memory module, the model runs at approximately 0.13 seconds per frame on an NVIDIA Titan X, representing a strong trade-off between real-time performance and accuracy.
  • Robustness: Qualitative results show the model is much better at preserving thin structures (like poles) and handling occluded areas compared to frame-by-frame approaches.

Limitations and Future Work

  • Flow Dependency: The model's consistency relies heavily on the quality of the optical flow. In scenarios with extreme lighting changes or very rapid motion where flow estimation fails, the temporal alignment may degrade.
  • Supervision Requirements: While the flow refinement is unsupervised (photometric loss), the depth prediction still benefits significantly from ground-truth depth during training. Moving toward a fully self-supervised temporal framework is a likely next step.
  • Computational Overhead: While 0.13s is fast, it is still slower than the simplest single-frame CNNs. Optimizing the two-stream architecture for edge devices (like those found on actual drones or cars) remains a challenge.

Summary updated

BibTeX
@article{eom2020temporally,
  author = {Chanho Eom and Hyunjong Park and Bumsub Ham},
  title = {{Temporally Consistent Depth Prediction With Flow-Guided Memory Units}},
  journal = {IEEE Trans. Intell. Transp. Syst.},
  year = {2020},
  doi = {10.1109/tits.2019.2942096},
}
Figure