Abstract
Joint image filters are used to transfer structural details from a guidance picture used as a prior to a target image, in tasks such as enhancing spatial resolution and suppressing noise. Previous methods based on convolutional neural networks (CNNs) combine nonlinear activations of spatially-invariant kernels to estimate structural details and regress the filtering result. In this paper, we instead learn explicitly sparse and spatially-variant kernels. We propose a CNN architecture and its efficient implementation, called the deformable kernel network (DKN), that outputs sets of neighbors and the corresponding weights adaptively for each pixel. The filtering result is then computed as a weighted average. We also propose a fast version of DKN that runs about seventeen times faster for an image of size 640 x 480. We demonstrate the effectiveness and flexibility of our models on the tasks of depth map upsampling, saliency map upsampling, cross-modality image restoration, texture removal, and semantic segmentation. In particular, we show that the weighted averaging process with sparsely sampled 3 x 3 kernels outperforms the state of the art by a significant margin in all cases.
Introduction
Joint image filtering is a fundamental task in computer vision where a high-quality "guidance" image (e.g., an RGB photo) is used to refine a lower-quality "target" image (e.g., a noisy or low-resolution depth map). While traditional methods like the Bilateral Filter rely on hand-crafted mathematical priors, modern deep learning approaches typically employ standard Convolutional Neural Networks (CNNs). However, these CNNs often struggle with a fundamental limitation: they rely on fixed-grid, spatially-invariant kernels. To capture intricate structural details, these networks frequently require very deep architectures or excessively large kernel sizes.
The Deformable Kernel Network (DKN) addresses this by allowing the network to adaptively choose which neighboring pixels to sample for every individual pixel in the image, regardless of their position on a standard grid.
Methodology: The Deformable Kernel Network
The core innovation of DKN is the move from fixed-grid convolutions to explicitly spatially-variant filtering. The architecture uses a two-stream network to process both the guidance and target images.
As shown in the architecture diagram, the network regresses two key components for every pixel:
- Sampling Offsets ($\Delta q$): These coordinates determine the specific locations of neighbors to be sampled, effectively "deforming" the standard 3x3 grid to find the most relevant structural information.
- Kernel Weights ($W$): These define the contribution of each sampled neighbor to the final pixel value.
The final filtered pixel is computed as a weighted average of these adaptively sampled neighbors. This approach ensures that the filtering process is inherently tied to the local structure of the image. To address computational efficiency, the authors also introduced Fast DKN (FDKN), which utilizes a resampling technique to achieve a 17x speedup, processing 640x480 images in approximately 0.01 seconds.
Key Insights
- The Power of Sparsity: A key finding is that a sparse 3x3 kernel with learned offsets can outperform massive 17x17 fixed-grid filters. By intelligently selecting just 9 relevant pixels, the network captures more detail than a dense local neighborhood.
- Learning "Where" vs. "What": Learning sampling locations (offsets) provides a more significant performance boost than simply learning weights on a fixed grid. This allows the network to "jump" across edges to find relevant pixels.
- Robustness through Weighted Averaging: By constraining the final step to a weighted average (summing to 1), DKN avoids the "hallucination" artifacts often seen in direct regression-based CNNs.
Experimental Results
The DKN and FDKN models were evaluated across several tasks, including depth map upsampling (NYU v2, Middlebury), saliency map upsampling, and semantic segmentation (Pascal VOC 2012).
In depth upsampling, DKN reduced the average Root Mean Square Error (RMSE) by approximately 30% compared to previous state-of-the-art methods like DJFR. Furthermore, applying FDKN as a refinement tool for semantic segmentation improved the Mean IoU on Pascal VOC 2012 from 70.69 to 73.60, demonstrating its versatility beyond simple image restoration.
Conclusion and Future Work
DKN represents a significant shift in joint image filtering by introducing learnable, deformable kernels. While highly effective, the model can still occasionally "copy" textures from the guidance image if gradients are misleading. Future research directions include extending this deformable logic to other sparse-to-dense problems, such as optical flow estimation and LIDAR-based depth completion.
Summary updated