Continual BatchNorm Adaptation (CBNA) for Semantic Segmentation

Marvin Klingner, Mouadh Ayache, Tim Fingscheidt · DOI

Introduction

Deep Neural Networks (DNNs) deployed in autonomous driving systems face a significant challenge known as domain shift. A model trained on synthetic, sunny data (the Source Domain) often experiences a drastic drop in performance when encountering real-world rainy or foggy conditions (the Target Domain). While Unsupervised Domain Adaptation (UDA) has been developed to bridge this gap, most existing methods are unsuitable for real-time deployment due to their reliance on original source data or high computational latency.

This paper introduces Continual BatchNorm Adaptation (CBNA), a "source-free" and "online-capable" method designed to adapt semantic segmentation models to new environments on a single-image basis with virtually zero computational overhead.

The Challenge of Real-Time Adaptation

Practical deployment in vehicles imposes two strict constraints that standard UDA methods often fail to meet:

  1. Data Privacy and Storage: Many methods require access to the source training set to prevent "catastrophic forgetting." However, source data is often proprietary or too large to store on edge devices.
  2. Latency and Continuity: Existing source-free methods typically require an offline adaptation phase or multiple passes over a batch of images. In a dynamic environment—such as a car driving into a tunnel—the domain shift is instantaneous. The system must adapt continually and instantly to every single frame without waiting for a batch to accumulate.

Methods: The CBNA Approach

CBNA focuses on the Batch Normalization (BN) layers of a pre-trained network. During standard inference, BN layers use fixed "running statistics" (mean and variance) derived from the source training set. CBNA modifies this process through three key mechanisms:

Single-Pass Statistic Mixing

Unlike previous methods that require a "warm-up" pass to calculate target statistics followed by a second pass for segmentation, CBNA operates in a single forward pass. For every incoming image, the model calculates the local mean and variance of the features at each BN layer. These "target" statistics are then blended with the stored "source" statistics using a weighting factor, $\eta^{DS}$. This mixing provides a balance between the flexibility needed for the new domain and the stability of the original training.

Layer-by-Layer Updates

Because features in any given layer $L$ are dependent on the normalization applied in the preceding layer $L-1$, CBNA updates statistics progressively as the image flows through the network. This ensures that the adaptation is consistent across the entire architecture.

Stability through Re-initialization

To prevent the model from "drifting" or being corrupted by an anomalous frame, the BN statistics are reset to their original source values before processing each new image. This ensures stable, continual adaptation without the risk of long-term error accumulation.

Experimental Evaluation

The researchers evaluated CBNA across several "Source $\rightarrow$ Target" scenarios to test its versatility:

  • Synthetic to Real: Training on GTA-5 or SYNTHIA and testing on Cityscapes.
  • Real to Real: Training on Cityscapes and testing on KITTI, BDD100K, and Mapillary Vistas.

CBNA was compared against standard UDA benchmarks and other BN-adaptation methods to assess its performance under the constraint of single-image, online adaptation.

Key Results and Insights

Accuracy and Robustness

On the GTA-5 to Cityscapes task, CBNA improved the Mean Intersection-over-Union (mIoU) by 3.1% to 5.3% absolute over the non-adapted baseline. The method consistently ranked 1st or 2nd across 16 different adaptation conditions, proving more reliable than previous methods that often failed when restricted to a single-image basis.

Computational Efficiency

Efficiency is a primary advantage of CBNA. Using a VGG-16 backbone on a Tesla P100 GPU, the baseline model runs at 20 fps. CBNA maintains this 20 fps speed because it integrates directly into the standard forward pass. In contrast, competing continual methods (such as C-Klingner) require two passes, effectively halving the frame rate to 10 fps.

Complementarity to Domain Generalization

CBNA is not limited to standard models; it can be applied on top of models already trained for robustness (Domain Generalization). When applied to a DG-initialized model, CBNA provides additional performance gains, demonstrating its utility as a modular enhancement.

Conclusion and Future Work

CBNA provides a practical solution for the domain shift problem in autonomous driving. By mixing source and target statistics in a single pass, it achieves significant accuracy gains with zero algorithmic delay. While the method requires the tuning of the weighting factor $\eta^{DS}$ and currently focuses on semantic segmentation, it represents a major step toward reliable, real-time model adaptation at the edge. Future research will explore the application of CBNA to other computer vision tasks, such as object detection and instance segmentation.

Summary updated

BibTeX
@article{klingner2022continual,
  author = {Marvin Klingner and Mouadh Ayache and Tim Fingscheidt},
  title = {{Continual BatchNorm Adaptation (CBNA) for Semantic Segmentation}},
  journal = {IEEE Trans. Intell. Transp. Syst.},
  year = {2022},
  url = {https://openreview.net/forum?id=qUSFf3WAqxu},
}
Figure