Frequency-Adaptive Dilated Convolution for Semantic Segmentation

Linwei Chen, Lin Gu, Dezhi Zheng, Ying Fu · DOI

Abstract

Dilated convolution, which expands the receptive field by inserting gaps between its consecutive elements, is widely employed in computer vision. In this study, we propose three strategies to improve individual phases of dilated convolution from the perspective of spectrum analysis. Departing from the conventional practice of fixing a global dilation rate as a hyperparameter, we introduce Frequency-Adaptive Dilated Convolution (FADC), which dynamically adjusts dilation rates spatially based on local frequency components. Subsequently, we design two plug-in modules to directly enhance effective bandwidth and receptive field size. The Adaptive Kernel (AdaKern) module decomposes convolution weights into low-frequency and high-frequency components, dynamically adjusting the ratio between these components on a per-channel basis. By increasing the high-frequency part of convolution weights, AdaKern captures more high-frequency components, thereby improving effective bandwidth. The Frequency Selection (FreqSelect) module optimally balances high- and low-frequency components in feature representations through spatially variant reweighting. Extensive experiments on segmentation and object detection consistently validate the efficacy of our approach.

The Frequency Dilemma in Dilated Convolution

In tasks like semantic segmentation, models must balance a large receptive field for context with high-frequency precision for sharp boundaries. Dilated convolution is the standard tool for expanding the receptive field without increasing parameters. However, signal theory dictates that increasing the dilation rate ($D$) is mathematically equivalent to lowering the sampling rate. When the dilation rate is too high for the image's detail level, "gridding artifacts" (aliasing) occur, causing the model to miss fine structures.

Traditionally, a single global dilation rate is chosen as a hyperparameter. This "one size fits all" approach is suboptimal because images are spatially variant. As shown in the figure below, a high-frequency region like a car's rear (Patch 1) requires a different processing strategy than a low-frequency region like a car door (Patch 2).

Frequency analysis of different image patches and the resulting adaptive dilation map.

Frequency-Adaptive Dilated Convolution (FADC)

To address these limitations, we propose FADC, which makes dilated convolution frequency-aware through three integrated "plug-in" modules:

  1. Adaptive Dilation Rate (AdaDR): Instead of a fixed rate, AdaDR predicts a spatial dilation map. It assigns smaller dilation rates to high-frequency areas (like object boundaries) to preserve detail and larger rates to low-frequency areas (like backgrounds) to maximize the receptive field.
  2. Adaptive Kernel (AdaKern): This module decomposes convolution weights into low-frequency (mean) and high-frequency (residual) components. It dynamically mixes these on a per-channel basis, allowing the model to "boost" high-frequency response where needed.
  3. Frequency Selection (FreqSelect): This module decomposes input features into distinct frequency bands using Fourier transforms and applies spatially variant reweighting to focus on the most informative frequencies before performing the convolution.

Analysis of Effective Bandwidth

The core advantage of FADC is its ability to manage the trade-off between receptive field size and effective bandwidth. By adjusting kernel weights and dilation rates dynamically, the model can capture more high-frequency components than standard dilated convolutions, effectively mitigating the aliasing that plagues static kernels.

Frequency response comparison between standard dilated convolution and FADC variants.

Experimental Results

FADC was evaluated on Cityscapes, ADE20K, and COCO benchmarks, demonstrating consistent improvements across various architectures:

  • Semantic Segmentation: On Cityscapes, FADC improved Mask2Former by 1.2% mIoU and PSPNet by 2.6% mIoU.
  • Real-Time Efficiency: A version of the real-time model PIDNet equipped with FADC achieved 81.0 mIoU on Cityscapes at 37.7 FPS, outperforming heavier models while remaining fast enough for practical use.
  • Object Detection: Integrating FADC components into Faster R-CNN on the COCO dataset resulted in a 0.9 AP improvement over the strong DCNv2 baseline.

Conclusion

FADC reframes dilated convolution as a frequency-adaptive operation. By moving away from static hyperparameters and embracing spatial variance, FADC effectively balances a wide field of view with high-frequency precision. Future work will explore extending these principles to attention mechanisms in Vision Transformers.

Summary updated

BibTeX
@misc{chen2024frequency,
  author = {Linwei Chen and Lin Gu and Dezhi Zheng and Ying Fu},
  title = {{Frequency-Adaptive Dilated Convolution for Semantic Segmentation}},
  year = {2024},
  eprint = {2403.05369},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.05369},
}
Figure