Learning Factorized Weight Matrix for Joint Filtering

Xiangyu Xu, Yongrui Ma, Wenxiu SunICML 2020

Introduction

Joint image filtering is a classic computer vision task where a target image (such as a noisy or low-resolution depth map) is enhanced using a high-quality "guidance" image (like a sharp RGB photo). Traditionally, this is achieved via a weighted average: every pixel in the output is a combination of pixels in the input, weighted by their similarity in the guidance image.

The primary bottleneck in this process is the weight matrix ($W$). For an image with $m$ pixels, $W$ is an $m \times m$ matrix. Even for a modest $256 \times 256$ image, $W$ contains over 4 billion entries. Directly learning this massive matrix with a neural network is computationally intractable. Existing solutions typically rely on hand-crafted heuristics (like Bilateral Filters) that struggle with complex scenes, or they use "black-box" Convolutional Neural Networks (CNNs) that abandon the weighted-average structure entirely, often resulting in blurry edges or artifacts when the guidance and target images are misaligned.

Proposed Methodology: Factorizing the Weight Matrix

To address this dimensionality problem, the authors propose a deep learning framework that retains the mathematically sound weighted-average structure but uses neural networks to intelligently learn the weights. Borrowing concepts from Robust PCA, they factorize the intractable weight matrix into two manageable components: $W \approx L + S$.

1. Low-Rank Component ($L$) for Global Structure

This component captures global correlations across the image. Instead of storing the massive full matrix, the model learns a feature extractor $\phi$ that maps pixels into a low-dimensional space ($d \ll m$). The weights in $L$ are then computed as the inner product of these features. By utilizing a mathematical trick, the model computes the filtering operation ($Lx$) without ever explicitly building the full $L$ matrix, making it highly memory- and compute-efficient.

2. Sparse Component ($S$) for Local Refinements

Global correlations alone are insufficient for preserving sharp, high-frequency edges. To address this, a second network branch learns "sparse residuals." A CNN ($\kappa$) predicts the locations of the most informative neighboring pixels—an adaptive sampling approach—while another network ($\eta$) predicts the specific weight adjustments for those sampled spots.

The entire system, encompassing the feature extractors, adaptive sampling logic, and residual predictors, is trained end-to-end using a standard Mean Squared Error (MSE) loss.

Key Results and Performance

The model was rigorously evaluated across diverse benchmarks, including NYUv2 (depth upsampling/denoising), Sintel (optical flow), and MIRFLICKR 25K/BSD68 (natural image denoising).

The proposed factorization method consistently outperformed both classical hand-crafted filters and modern deep-learning baselines:

  • Depth Upsampling: On the NYUv2 dataset for $8\times$ upsampling, the method achieved a Root Mean Square Error (RMSE) of 4.32, significantly outperforming previous state-of-the-art methods like PAC (4.59) and DJF (5.86).
  • Optical Flow: On the Sintel dataset, it reduced the End-Point-Error (EPE) by nearly 50% compared to the next best method (PAC) at $8\times$ upsampling.
Visual comparison of depth upsampling results, showing the proposed method against baselines like DJF and PAC.

Qualitatively, the structural integrity of the model shines. Because it is explicitly designed as a weighted average ($y = Wx$), it inherently preserves the structure of the input image better than black-box regression networks. Visual results demonstrate much sharper boundaries and a significant reduction in "bleeding" artifacts, where textures from the RGB guidance image incorrectly leak into the depth map.

Limitations and Future Work

While the framework achieves state-of-the-art performance, the authors note a few areas for future exploration:

  • Computational Complexity: Although factorization makes the $m \times m$ matrix tractable, running two separate deep learning branches (for $L$ and $S$) may still be too heavy for real-time mobile applications compared to a simple U-Net.
  • Fixed Sampling Count: The number of sparse samples ($k$) is currently a fixed hyperparameter (e.g., $k=9$). Future iterations could investigate dynamic sampling, allowing the network to decide how many pixels to evaluate based on local image complexity.
  • Broader Generalization: The authors suggest this affinity-based framework could be naturally extended to other tasks, such as semantic segmentation or image matting.

Summary updated

BibTeX
@inproceedings{xu2020learning,
  author = {Xiangyu Xu and Yongrui Ma and Wenxiu Sun},
  title = {{Learning Factorized Weight Matrix for Joint Filtering}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
}
Figure