Spatio-Temporal Pixel-Level Contrastive Learning-based Source-Free Domain Adaptation for Video Semantic Segmentation

Shao-Yuan Lo, Poojan Oza, Sumanth Chennupati, Alejandro Galindo, Vishal M. Patel · DOI

Abstract

Unsupervised Domain Adaptation (UDA) of semantic segmentation transfers labeled source knowledge to an unlabeled target domain by relying on accessing both the source and target data. However, the access to source data is often restricted or infeasible in real-world scenarios. Under the source data restrictive circumstances, UDA is less practical. To address this, recent works have explored solutions under the Source-Free Domain Adaptation (SFDA) setup, which aims to adapt a source-trained model to the target domain without accessing source data. Still, existing SFDA approaches use only image-level information for adaptation, making them sub-optimal in video applications. This paper studies SFDA for Video Semantic Segmentation (VSS), where temporal information is leveraged to address video adaptation. Specifically, we propose Spatio-Temporal Pixel-Level (STPL) contrastive learning, a novel method that takes full advantage of spatio-temporal information to tackle the absence of source data better. STPL explicitly learns semantic correlations among pixels in the spatio-temporal space, providing strong self-supervision for adaptation to the unlabeled target domain. Extensive experiments show that STPL achieves state-of-the-art performance on VSS benchmarks compared to current UDA and SFDA approaches.

Introduction

Deep learning models for semantic segmentation often struggle when moved from their training environment (source domain) to a new one (target domain)—for example, moving from synthetic "GTA-style" data to real-world driving footage. Standard Unsupervised Domain Adaptation (UDA) addresses this by training on both labeled source data and unlabeled target data simultaneously. However, in real-world applications, source data is often unavailable due to privacy concerns, legal restrictions, or the sheer impracticality of moving large datasets to edge devices.

Source-Free Domain Adaptation (SFDA) aims to adapt a pre-trained model using only the unlabeled target data. While SFDA exists for images, it typically performs poorly on video because it ignores rich temporal information—how pixels move and relate across frames. This paper introduces STPL, a framework designed to bridge this gap by leveraging spatio-temporal correlations.

Methodology

The core of the proposed framework is the Spatio-Temporal Pixel-Level (STPL) contrastive learning method, which operates in two main stages:

1. Spatio-Temporal Feature Extraction

The system processes a video sequence and utilizes FlowNet 2.0 to estimate optical flow between frames. A novel Spatio-Temporal Fusion Block (incorporating a Spatio-Temporal Attention Module, or STAM) merges features from the current frame with warped features from the previous frame. This ensures the model maintains a consistent understanding of objects as they persist over time. Additionally, cross-frame augmentation is applied to create perturbed versions of the video for contrastive learning.

Overview of the STPL framework, featuring spatio-temporal feature extraction and pixel-level contrastive learning.

2. Pixel-Level Contrastive Learning

In the absence of ground-truth labels, the model generates pseudo-labels based on high-confidence predictions (using a top-k threshold). The STPL Loss then forces the model to pull together representations of pixels belonging to the same class across different frames and augmentations ("positives") while pushing apart pixels from different classes ("negatives"). This unified spatio-temporal space makes feature representations more robust to noise and domain shifts.

Experimental Results

The authors evaluated STPL on two major synthetic-to-real video adaptation benchmarks: VIPER → Cityscapes-Seq and SYNTHIA-Seq → Cityscapes-Seq.

Performance and Consistency

STPL achieved state-of-the-art performance, reaching 52.5% mIoU on the VIPER → Cityscapes-Seq benchmark. Remarkably, STPL outperformed several established UDA methods that require full access to source data, despite operating in the more restrictive source-free setting. Furthermore, STPL significantly improved temporal consistency to 82.14%, compared to 72.93% for the source-only model, effectively reducing segmentation "flicker."

Accuracy vs. Restriction level for various UDA and SFDA methods. STPL (Ours) achieves superior performance under the more restrictive SFDA setting.

Key Insights

  • Temporal Information as Self-Supervision: By tracking pixel movement across frames, the model gains a much stronger self-supervisory signal than static image-based methods.
  • Unified Framework: The authors demonstrate that "Spatial-only" and "Temporal-only" contrastive learning are limited special cases of STPL. A unified approach is experimentally superior to naive combinations.
  • Feature Clustering: t-SNE visualizations confirm that STPL reduces intra-class variance and increases inter-class variance, leading to more distinct and robust feature clusters.

Conclusion and Future Work

STPL demonstrates that temporal information is a critical asset for source-free adaptation in video tasks. While highly effective, the method's performance remains dependent on the quality of the initial source-trained model. Future work may explore handling highly sub-optimal source models and reducing the computational overhead associated with optical flow estimation. Additionally, as SFDA improves privacy, future research should consider security mechanisms to prevent the malicious adaptation of pre-trained models.

Summary updated

BibTeX
@misc{lo2023spatio,
  author = {Shao-Yuan Lo and Poojan Oza and Sumanth Chennupati and Alejandro Galindo and Vishal M. Patel},
  title = {{Spatio-Temporal Pixel-Level Contrastive Learning-based Source-Free Domain Adaptation for Video Semantic Segmentation}},
  year = {2023},
  eprint = {2303.14361},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2303.14361},
}
Figure