Efficient Flow-Guided Multi-frame De-fencing

Stavros Tsogkas, Fengjia Zhang, Allan D. Jepson, Alex Levinshtein

Introduction

Capturing clear photos through obstructions like chain-link fences is a common challenge for photographers at zoos, sports venues, or construction sites. While single-image inpainting can attempt to fill these gaps, the results are often physically inaccurate hallucinations. This paper introduces a high-speed, multi-frame "de-fencing" pipeline that leverages short bursts of images to reconstruct the hidden background with high fidelity.

The Challenge of Multi-frame De-fencing

Using a burst of frames is theoretically superior to single-image methods because slight camera movements reveal different parts of the background behind the fence. However, two primary hurdles remain:

  1. Alignment Artifacts: Standard optical flow algorithms are frequently "distracted" by the high-contrast, repetitive patterns of the fence, leading to misaligned background data.
  2. Computational Cost: Existing state-of-the-art solutions often rely on heavy optimization or iterative processes that are too slow for mobile devices.

The Proposed Pipeline

The authors propose a modular three-stage Convolutional Neural Network (CNN) pipeline designed for both speed and accuracy, operating at approximately 7 FPS on desktop hardware.

The proposed de-fencing pipeline consists of fence segmentation, segmentation-aware optical flow, and frame inpainting.
  1. Fence Segmentation: A U-Net backbone processes each frame to generate a soft "fence mask," identifying pixels belonging to the obstruction.
  2. Segmentation-aware Optical Flow (SPyNet$^m$): This core innovation modifies a lightweight flow network to accept both images and their corresponding fence masks. By conditioning the flow on the mask, the network learns to ignore the fence's motion and focus entirely on the background scene.
  3. Flow-guided Frame Inpainting: Aligned frames are warped to a central keyframe and processed by a Residual Dense Network (RDN) to fuse information and reconstruct missing pixels.

Key Innovations: Mask-Conditioned Learning

The breakthrough of this method lies in treating segmentation and flow as interdependent rather than isolated tasks. By using the segmentation mask to guide the flow estimation, the system effectively "inpaints" the flow field in occluded regions. This prevents the "aperture problem" and geometric confusion caused by the fence.

Visualization of the segmentation-aware optical flow, which successfully ignores the fence to focus on background motion.

Results and Performance

The proposed method achieves state-of-the-art results on both synthetic and real-world datasets. On a new evaluation dataset of 185 real-world bursts, the pipeline achieved a PSNR of 30.46 dB, significantly outperforming single-frame methods (LaMa at 26.25 dB) and previous multi-frame optimization methods (FGVC at 29.73 dB). Qualitatively, the method is more robust to complex background textures, such as tree branches or text, which typically cause "scrambled" artifacts in competing models.

Conclusion and Future Work

By replacing heavy optimization with a feed-forward CNN architecture, the authors demonstrate that high-quality de-fencing can be achieved at near real-time speeds. While the system is currently dependent on the accuracy of the initial segmentation step, future work focusing on more diverse data augmentation and further mobile optimization could bring this technology directly into smartphone viewfinders.

Summary updated

BibTeX
@inproceedings{tsogkas2023efficient,
  author = {Stavros Tsogkas and Fengjia Zhang and Allan D. Jepson and Alex Levinshtein},
  title = {{Efficient Flow-Guided Multi-frame De-fencing}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  doi = {10.1109/wacv56688.2023.00188},
}
Figure