SegBlocks: Block-Based Dynamic Resolution Networks for Real-Time Segmentation

Thomas Verelst, Tinne Tuytelaars · DOI

Introduction

Semantic segmentation—the process of assigning a semantic category to every pixel in an image—is a cornerstone of computer vision, particularly for autonomous driving and robotics. However, as input resolutions scale toward 2K and 4K, the computational cost of standard "static" neural networks becomes a significant bottleneck. These networks apply uniform computation across the entire image, treating simple, homogeneous regions like clear skies or flat road surfaces with the same intensity as complex, high-frequency objects like distant pedestrians or intricate traffic signs.

SegBlocks introduces a framework designed to break this symmetry. By dynamically processing image regions at varying resolutions based on their local complexity, SegBlocks achieves substantial inference speedups with negligible impact on accuracy.

The Challenge of Dynamic Processing

While the concept of dynamic resolution is intuitive, previous attempts have struggled with two primary hurdles:

  1. The Boundary Problem: When an image is processed in independent patches or blocks, the network often loses global context at the edges. This typically results in "seams" or discontinuities in the final segmentation map where the blocks meet.
  2. Implementation Overhead: Many methods that reduce theoretical FLOPs (floating-point operations) fail to deliver actual "wall-clock" speedups on GPUs. The overhead of managing sparse data or irregular memory access often cancels out the computational savings.

The SegBlocks Framework

SegBlocks addresses these challenges through a block-based pipeline that treats the image as a grid (e.g., 128x128 pixel blocks) and utilizes specialized hardware-aware modules.

The Policy Network

At the heart of the system is a lightweight policy network. This tiny CNN analyzes a downsampled version of the input image to generate a "difficulty map." It decides which blocks require high-resolution processing and which can be safely downsampled. Because the decision to process a block at high or low resolution is discrete and non-differentiable, the authors employ Reinforcement Learning (REINFORCE) to train the policy network jointly with the segmenter.

Custom CUDA Modules

To ensure theoretical efficiency translates to real-world performance, SegBlocks utilizes three custom CUDA modules:

  • BlockSample: Efficiently splits the image and downsamples blocks designated as "simple."
  • BlockPad: This is the framework's core innovation. Instead of standard zero-padding, which causes boundary artifacts, BlockPad copies features from neighboring blocks into the padding area. This allows features to propagate across boundaries during the forward pass, maintaining the accuracy of a global network.
  • BlockCombine: Upsamples the low-resolution outputs and stitches the blocks back into a seamless, high-resolution prediction map.

Experimental Results

The authors evaluated SegBlocks on three major urban scene benchmarks: Cityscapes, CamVid, and Mapillary Vistas. By integrating SegBlocks into the SwiftNet architecture, the researchers demonstrated significant efficiency gains:

  • Efficiency and Speed: For the SwiftNet-RN18 model, SegBlocks reduced operations (GMACs) by 60%, resulting in a 50% increase in real-world inference speed.
  • Accuracy Preservation: This performance boost came at a cost of only 0.3% mIoU (mean Intersection over Union), a nearly imperceptible drop in quality.
  • Real-Time Throughput: On a GTX 1080 Ti, the RN50 version of the model improved from 16 FPS to 30 FPS, successfully crossing the threshold for real-time high-resolution processing.

Qualitative visualizations confirm that the policy network intelligently allocates its computational budget, consistently choosing high resolution for pedestrians and traffic signs while processing the road and sky at lower resolutions.

Limitations and Future Outlook

Despite its success, SegBlocks currently relies on custom CUDA kernels, which may limit immediate "plug-and-play" deployment on non-NVIDIA hardware or certain specialized AI accelerators. Additionally, the current implementation uses a fixed grid size; future research into hierarchical or quad-tree-based partitioning could further optimize how the network fits complex object boundaries.

By proving that hardware-aware dynamic processing can eliminate the trade-off between speed and boundary continuity, SegBlocks provides a scalable path forward for dense prediction tasks like depth estimation and instance segmentation in real-time environments.

Summary updated

BibTeX
@article{verelst2020segblocks,
  author = {Thomas Verelst and Tinne Tuytelaars},
  title = {{SegBlocks: Block-Based Dynamic Resolution Networks for Real-Time Segmentation}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2020},
  doi = {10.1109/tpami.2022.3162528},
}
Figure