Flow-Guided Sparse Transformer for Video Deblurring

Jing Lin, Yuanhao Cai, Xiaowan Hu, Haoqian Wang, Youliang Yan, Xueyi Zou, Henghui Ding, Yulun Zhang, Radu Timofte, Luc Van Gool

Introduction

The Flow-Guided Sparse Transformer (FGST) introduces a novel architecture for video deblurring that leverages optical flow to direct the Transformer's attention toward the most relevant, sharp patches in neighboring frames. By replacing computationally heavy global attention with motion-aware sparse sampling, FGST achieves state-of-the-art restoration quality while remaining significantly more efficient than previous methods.

The Challenge of Video Deblurring

Video deblurring—restoring sharp frames from a sequence blurred by camera shake or fast-moving objects—relies on finding "sharp" versions of a scene patch in nearby frames. Current approaches face a balancing act with distinct drawbacks:

  1. CNNs are efficient but have a limited "receptive field," making it difficult to connect information across long spatial distances or time gaps.
  2. Standard Transformers can model long-range dependencies but are computationally heavy due to quadratic complexity. They also suffer from "over-smoothing" because they attend to every pixel, including irrelevant background noise.
  3. Flow-based CNNs often "warp" neighboring frames to align them before processing. However, this warping requires interpolation, which can destroy the fine textures and sharp details the model is actively trying to restore.

The authors aim to combine the long-range modeling capabilities of Transformers with the motion-awareness of flow-based methods, entirely avoiding the destructive side effects of image warping.

Core Methodology

The core innovation of FGST is the Flow-Guided Sparse Window-based Multi-head Self-Attention (FGSW-MSA). Instead of looking at every pixel in a neighboring frame (Global) or just a fixed box around the current pixel (Local Window), the model uses an optical flow estimator to predict where a specific object has moved.

Comparison of FGS-MSA and FGSW-MSA
  • FGS-MSA: For every "query" pixel in the blurry frame, the model uses optical flow to sample a "key" element from the exact corresponding location in neighboring frames. This allows the model to globally sample spatially sparse but highly relevant information.
  • FGSW-MSA (The Robust Version): Because optical flow is rarely perfect, the authors improved upon FGS-MSA by sampling a small window of keys around the predicted flow location. This makes the model robust to small errors in motion estimation.

Architecture and Temporal Context

These attention modules are integrated into a U-shaped (Encoder-Decoder) network built from Flow-Guided Attention Blocks (FGAB).

Overall FGST Architecture

To capture long-term temporal context beyond just the immediate neighboring frames, the authors employ a Recurrent Embedding (RE) mechanism. Similar to a Recurrent Neural Network (RNN), this hidden state mechanism allows information from the beginning of a video to propagate through the entire sequence, ensuring temporal consistency.

Key Insights

  • Attention as "Non-Destructive" Alignment: Unlike traditional warping (which alters pixels via interpolation), flow-guided attention simply selects which original pixels to look at. This preserves the raw, sharp textures found in neighboring frames.
  • Sparse is Smart: By using flow to prune the search space, the model avoids the "redundant key" problem of global Transformers. This prevents the model from getting confused by background noise and drastically speeds up computation.
  • Receptive Field Flexibility: While local window Transformers (like Swin) are restricted to nearby pixels, FGST’s receptive field can effectively cover the entire frame. If the motion is fast, the flow simply "points" the attention wherever the object went.

Evaluation and Results

The model was evaluated on standard benchmarks, including DVD (Deep Video Deblurring) (71 videos at 240 fps) and GOPRO (3,300 blurry-sharp image pairs), as well as a collection of real-world blurry videos to test "in-the-wild" generalization.

FGST sets a new bar for both quality and efficiency:

  • Superior Accuracy: On the DVD dataset, it achieved a PSNR of 33.36 dB, outperforming the previous best (ARVo) by 0.56 dB. On GOPRO, it reached 32.90 dB, a massive 1.23 dB improvement over the CNN-based TSP.
  • Efficiency Gains: Compared to the state-of-the-art TSP model, FGST uses 60% fewer parameters (9.7M vs 16.2M) and 63% fewer FLOPs (131.6G vs 357.9G).
  • Speed: It is roughly 2.3x faster during inference than previous top-tier models, making it highly practical for real-world applications.

Limitations and Future Work

While FGSW-MSA is robust to small flow errors, the model still relies on an external optical flow estimator (SPyNet). If the flow estimation fails completely—such as during extreme occlusions or drastic lighting changes—the attention mechanism may look at the wrong part of the frame. Future work could involve training the flow estimator and the deblurring Transformer jointly in an end-to-end fashion to further improve robustness in extreme motion scenarios.

Summary updated

BibTeX
@inproceedings{lin2022flow,
  author = {Jing Lin and Yuanhao Cai and Xiaowan Hu and Haoqian Wang and Youliang Yan and Xueyi Zou and Henghui Ding and Yulun Zhang and Radu Timofte and Luc Van Gool},
  title = {{Flow-Guided Sparse Transformer for Video Deblurring}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=34cl8JuBQY},
}
Figure