FIFO: Learning Fog-invariant Features for Foggy Scene Segmentation

Sohyun Lee, Taeyoung Son, Suha Kwak · DOI · OpenReview

Abstract

Semantic segmentation is a critical component for autonomous navigation, yet its performance often degrades significantly under adverse weather conditions like fog. This paper introduces FIFO (Fog-invariant Feature Optimization), a novel framework that treats fog as a style-based perturbation. By utilizing a specialized "fog-pass filter" to isolate and minimize fog-related style factors in the feature space, FIFO enables the learning of weather-invariant features. The approach achieves state-of-the-art results on real-world foggy datasets while simultaneously improving performance on clear-weather benchmarks.

Introduction

Semantic segmentation—the task of assigning a categorical label to every pixel in an image—is essential for the safe operation of autonomous vehicles. While modern deep learning models achieve high accuracy on standard clear-weather datasets like Cityscapes, their performance typically plummets when faced with fog. Fog obscures textures, shifts color distributions, and reduces contrast, creating a significant domain gap between training and deployment environments.

Addressing this challenge is difficult due to two primary factors. First, there is a severe scarcity of large-scale, manually annotated real-world foggy datasets, as visibility issues make human labeling unreliable. Second, while synthetic fog can be generated mathematically, a substantial visual gap remains between simulated fog and the heterogeneous, complex nature of real-world atmospheric conditions. Existing methods, such as curriculum learning, often require complex density estimation modules and frequently suffer from "catastrophic forgetting," where the model loses its ability to accurately segment clear-weather scenes after being tuned for fog.

The FIFO Framework

FIFO approaches the problem by viewing the weather condition of an image as a "style" component that can be disentangled from the scene's semantic content. The framework is built upon three core technical pillars:

1. Fog as Style (Gram Matrices)

Drawing from style transfer literature, FIFO uses Gram matrices—which represent correlations between feature channels—to capture the stylistic signature of an image. However, because Gram matrices naturally contain both style and content information, they cannot be used directly to represent weather without interference from the scene layout.

2. The Fog-pass Filter

To isolate the weather effect, the authors introduce the "fog-pass filter," a small multi-layer perceptron (MLP). This module is specifically designed to extract "fog factors" from the Gram matrices. The filter is trained to identify the weather condition while discarding the underlying scene content, effectively isolating the stylistic impact of fog.

3. Alternating Optimization

The training process employs a competitive optimization strategy:

  • Filter Training: The fog-pass filter is trained to discriminate between three distinct domains: Clear Weather (CW), Synthetic Fog (SF), and Real Fog (RF).
  • Network Training: The segmentation network is then optimized to minimize the differences between these extracted fog factors. This forces the encoder to produce features that are indistinguishable across weather conditions, effectively neutralizing the fog in the feature space.

Additionally, a Prediction Consistency Loss is applied to pairs of clear images and their synthetic foggy counterparts. This ensures that the model’s semantic interpretation of a scene remains stable regardless of the presence of simulated fog.

Experimental Results

FIFO was evaluated using a combination of Cityscapes (CW), Foggy Cityscapes-DBF (SF), and real-world datasets including Foggy Zurich (FZ) and Foggy Driving (FD). The results demonstrate significant improvements in both robustness and generalization.

Quantitative Performance

  • Real-World Fog: On the Foggy Zurich dataset, FIFO achieved a state-of-the-art 48.4% mIoU (mean Intersection over Union), surpassing the previous best method (CMAda3+) at 46.8%.
  • Robust Generalization: On the Foggy Driving Dense (FDD) dataset, FIFO reached 48.9% mIoU, a dramatic improvement over the baseline's 35.9%.
  • The Clear Weather Bonus: Unlike many domain adaptation methods that degrade clear-weather performance, FIFO maintained a high 64.8% mIoU on clear scenes. This suggests that learning fog-invariant features acts as a form of regularization, making the model more robust overall.

Qualitative Insights

Visual analysis confirms that FIFO is significantly better at identifying distant objects, such as cars and traffic signs, which are often lost in the gray haze of foggy images when processed by standard models. By closing the gap in the style space, the model effectively "sees through" the fog at a feature level.

Conclusion and Future Work

FIFO represents a significant step forward in weather-robust semantic segmentation. By treating fog as a style factor and utilizing a fog-pass filter to disentangle weather from content, the model achieves superior performance on real-world foggy scenes without sacrificing clear-weather accuracy.

Future research may focus on reducing the reliance on synthetic pairs for consistency loss and extending the framework to handle multi-condition scenarios, such as the combination of rain, fog, and nighttime conditions. While the alternating optimization increases training time, the fog-pass filter is discarded during inference, ensuring that FIFO provides these robustness gains with no additional computational overhead during deployment.

Summary updated

BibTeX
@misc{lee2022fifo,
  author = {Sohyun Lee and Taeyoung Son and Suha Kwak},
  title = {{FIFO: Learning Fog-invariant Features for Foggy Scene Segmentation}},
  year = {2022},
  eprint = {2204.01587},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.01587},
}
Figure