Dynamic Dual Sampling Module For Fine-Grained Semantic Segmentation

Chen Shi, Xiangtai Li, Yanran Wu, Yunhai Tong, Yi Xu

TL;DR

The Dynamic Dual Sampling Module (DDSM) is a new approach to semantic segmentation that efficiently bridges the gap between high-level "context" and low-level "details." By using a learnable sampling strategy to pick only the most representative pixels and channels from higher layers, it achieves state-of-the-art accuracy on urban scene datasets with significantly lower computational costs than traditional self-attention methods.

What Problem Does This Paper Address?

In semantic segmentation, a model needs to know both what an object is (global context) and where its boundaries are (local details). Standard architectures like Feature Pyramid Networks (FPN) typically combine high-level features (rich in semantics but low resolution) with low-level features (high resolution but weak semantics) through simple addition or concatenation.

However, there is a "semantic gap" between these layers. Directly adding them often results in blurry boundaries. While self-attention mechanisms (like Transformers) can model these relationships more precisely, they are computationally "expensive" because they compare every single pixel to every other pixel. The authors argue this is redundant because natural images are "piece-wise smooth"—neighboring pixels often share the same characteristics, so calculating affinities for every single one is a waste of resources.

Methods

The authors introduce the Dynamic Dual Sampling Module (DDSM), which consists of two main components:

  1. Dynamic Sampler: Inspired by Deformable Convolutional Networks (DCNv2), this sampler doesn't look at a fixed grid. Instead, it learns "offsets" to sparsely sample the most representative pixels and channels. This allows the model to adapt its "receptive field" to the actual shapes of objects in the image.
  2. Spatial-wise Dynamic Affinity Modeling: For every pixel in a low-level feature map, the module samples a small, learned set of $N$ pixels from the high-level map. It calculates the "affinity" (similarity) between them and propagates the high-level semantic information only from those representative points.
  3. Channel-wise Dynamic Affinity Modeling: Since channels often encode class-specific information (e.g., one channel might respond strongly to "cars"), the module applies a similar sampling logic to the channel dimension. This helps the model decide which semantic categories are most relevant to specific local details.

By combining these two (the "Dual" in DDSM), the model enhances low-level features with precise, category-aware context without the heavy lifting of full-image attention.

Datasets

The model was evaluated on two standard benchmarks for urban scene understanding:

  • Cityscapes: A large-scale dataset containing high-quality pixel-level annotations of 5,000 images of urban street scenes.
  • CamVid (Cambridge-driving Labeled Video Database): A dataset of video frames captured from a moving vehicle, used to test the model's consistency and accuracy in driving scenarios.

Key Insights and Ideas

  • Efficiency through Sparsity: The "aha moment" here is that you don't need a dense attention map to get high-quality boundaries. By sampling just 25 pixels and 9 channels, the model captures enough information to outperform dense methods.
  • Overcoming the Semantic Gap: Rather than forcing high and low features together, DDSM uses the high-level features as a "support" for the low-level ones, effectively "painting" semantic meaning onto the high-resolution structural details.
  • Boundary Preservation: Because the sampler is dynamic and learnable, it can "shrink" its sampling area near object edges, leading to much sharper and more accurate boundaries compared to standard UPerNet or DeepLabv3+ baselines.

Key Results

  • State-of-the-Art Performance: On the Cityscapes test set, DDSM reached 81.7% mIoU (mean Intersection over Union), performing favorably against established models like DANet and CCNet.
  • Computational Efficiency: DDSM is remarkably lean. It requires only about 30% of the GFLOPs (computational operations) of DANet (367.5 GFLOPs vs. 1298.8 GFLOPs) while achieving better accuracy.
  • Boundary Accuracy: Using the Boundary F-Score metric, the authors showed that DDSM consistently outperforms baselines across various distance thresholds, proving it is particularly good at "fine-grained" segmentation.
  • Versatility: The module is "plug-and-play." The authors successfully integrated it into both UPerNet and DeepLabv3+, seeing performance gains in both cases.

Limitations and Future Work

While the paper demonstrates impressive efficiency and accuracy, a few areas remain for exploration:

  • Hyperparameter Sensitivity: The performance depends on the number of sampled points ($N$). While 25 points worked well here, finding the optimal balance for different resolutions or domains might require tuning.
  • Implementation Complexity: While computationally efficient during inference, dynamic sampling and learned offsets add more complexity to the training pipeline compared to standard convolutions.
  • Broader Application: The current work focuses on urban street scenes. Future work could investigate how well this dynamic sampling generalizes to medical imaging or satellite imagery, where object scales vary even more drastically.

Summary updated

BibTeX
@inproceedings{shi2021dynamic,
  author = {Chen Shi and Xiangtai Li and Yanran Wu and Yunhai Tong and Yi Xu},
  title = {{Dynamic Dual Sampling Module For Fine-Grained Semantic Segmentation}},
  booktitle = {ICIP},
  year = {2021},
  doi = {10.1109/icip42928.2021.9506628},
}

Loading related content...

Figure