Video Deblurring by Fitting to Test Data

Xuanchi Ren, Zian Qian, Qifeng ChenarXiv 2020

Abstract

Deep learning models for video deblurring often struggle with the "domain gap" between synthetic training datasets and real-world motion blur. We present a novel "internal learning" framework that bypasses external datasets by training a lightweight neural network directly on the test video. By identifying naturally occurring sharp frames and simulating realistic blur in the raw data space, our method learns video-specific textures and statistics. To make this approach practical, we employ Model-Agnostic Meta-Learning (MAML) to reduce optimization time from hours to minutes. Experimental results on real-world datasets demonstrate significant improvements in visual quality and temporal consistency over state-of-the-art methods.

Introduction

The primary challenge in real-world video deblurring is the lack of perfectly aligned blurry and sharp image pairs for training. Conventional models rely on synthetic datasets created by averaging high-framerate video frames, which fails to capture the complexity of camera sensor noise and non-linear motion. Consequently, these models often produce artifacts when applied to dashcam or smartphone footage. We address this by proposing a self-supervised approach that treats each video as its own training set, leveraging the high correlation between frames in a continuous stream.

Methodology

Our pipeline consists of four main stages: frame selection, blur generation, network training, and meta-learning acceleration.

Internal Learning Pipeline

The system first scans the input video to identify the sharpest frames (typically 5% of the total) using the variance of the image Laplacian. These frames serve as the ground truth for internal training. To create training pairs, we extract patches from these sharp frames and apply synthetic blur.

Overview of the internal learning pipeline, showing training on sharp frames from the test video and subsequent inference.

Crucially, we improve blur realism by reversing gamma correction to apply blur in the physically accurate "raw" space. We also utilize symmetric linear blur kernels, which assume the sharp frame corresponds to the midpoint of the exposure time, ensuring better temporal stability.

Optimization and Acceleration

A simple U-Net is trained on these generated pairs using a combination of perceptual loss (VGG-19) and a WGAN-GP discriminator. To overcome the prohibitive cost of training from scratch for every video, we use MAML to find a robust initialization. This allows the model to adapt to a new video's specific blur characteristics in approximately five minutes during test-time fine-tuning.

Experimental Results

We evaluated our method on a new dataset of 70 real-world blurry videos and the BDD100K dataset. Since ground truth is unavailable for real-world data, we conducted extensive user studies.

Qualitative Performance

Our method consistently outperformed state-of-the-art baselines like EDVR and DeblurGAN-v2 in human preference tests. Users preferred our MAML-accelerated results in 79% of cases compared to DeblurGAN-v2 on real-world footage.

Qualitative comparison of our method against state-of-the-art baselines on real-world blurry videos.

Temporal Consistency

Despite the frame-by-frame processing nature of our lightweight network, the use of symmetric kernels resulted in superior temporal stability. Our method achieved the lowest warping error ($E_{warp} = 0.2599$) among all tested baselines, effectively minimizing flicker.

Conclusion

By shifting from external to internal learning, we effectively bridge the domain gap in video deblurring. Our approach demonstrates that the information required to deblur a video is often contained within the video itself. While the method depends on the presence of at least some sharp frames, it provides a robust and adaptable solution for real-world applications where synthetic models fail.

Summary updated

BibTeX
@misc{ren2020video,
  author = {Xuanchi Ren and Zian Qian and Qifeng Chen},
  title = {{Video Deblurring by Fitting to Test Data}},
  year = {2020},
  eprint = {2012.05228},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.05228},
}
Figure