DFNet: Semantic Segmentation on Panoramic Images with Dynamic Loss Weights and Residual Fusion Block

Wei Jiang, Yan WuarXiv 2018 · arXiv

Abstract

For self-driving and automatic parking systems, perception is a critical foundational technique. Specifically, the detection of lane markings and parking slots is a vital component of visual perception. In this paper, we propose DFNet for semantic segmentation on the panoramic surround view (PSV) dataset. Our contributions include dynamic loss weights to address class imbalance and a Residual Fusion Block (RFB) to refine object boundaries. DFNet achieves state-of-the-art results on the PSV dataset with significantly fewer parameters than existing models.

Introduction

Autonomous parking systems rely heavily on surround-view perception to navigate complex environments. While standard front-facing cameras are sufficient for highway driving, panoramic images are essential for low-speed maneuvers. However, segmenting these images presents three major challenges: extreme class imbalance (where background pixels dominate), boundary blurring during upsampling, and strict hardware constraints on embedded systems.

DFNet addresses these by introducing batch-level adaptability and a novel multiplicative fusion mechanism, achieving a 12% improvement in mean Intersection over Union (mIoU) over baseline models while maintaining a compact model size.

Methodology

The DFNet architecture builds upon a DenseNet backbone and incorporates a Pyramid Pooling Module (PPM) to capture multi-scale context. To address the specific challenges of panoramic segmentation, we introduce two key components:

Dynamic Loss Weights

Standard training often uses fixed class weights, which may not reflect the distribution within a specific training batch. We propose dynamic loss weights that are calculated on-the-fly for every batch. The weight is inversely proportional to the number of pixels of a given class in that batch, ensuring the model remains sensitive to rare but critical features like lane markings, even when they occupy only a tiny fraction of the image.

Residual Fusion Block (RFB)

To mitigate noise introduced by upsampling feature maps, we implement a refinement module called the Residual Fusion Block (RFB). Unlike standard residual blocks that use addition, the RFB employs pixel-wise multiplication to combine feature paths. This multiplicative fusion acts as a spatial mask, effectively suppressing noise and sharpening the boundaries between distinct semantic regions.

The overall architecture of DFNet, highlighting the integration of the DenseNet backbone, Pyramid Pooling Module, and the Residual Fusion Block (RFB).

Experiments and Results

We evaluated DFNet on the Panoramic Surround View (PSV) dataset, which contains 4,249 RGB images categorized into six classes: Background, Parking Slots, White Solid Line, White Dashed Line, Yellow Solid Line, and Yellow Dashed Line.

Quantitative Performance

DFNet achieved a mean Intersection over Union (mIoU) of 48.13% and a pixel accuracy of 96.75%. Notably, DFNet maintains a compact footprint with only 147M parameters—approximately 3.7 times smaller than the previous state-of-the-art VH-HFCN model (544M parameters). Ablation studies confirmed that placing the auxiliary loss after the second layer block and using multiplicative fusion in the RFB were critical for these gains.

Qualitative Analysis

Visual comparisons demonstrate that DFNet excels at identifying fine details, such as the gaps within dashed lines, which baseline models often misclassify as solid lines or background noise. The RFB successfully produces sharper boundaries for parking slots and lane markings compared to FCN or HFCN architectures.

Qualitative comparison of DFNet against baseline models on the PSV dataset. DFNet shows superior boundary definition and accuracy in identifying dashed lane markings.

Conclusion

DFNet provides an efficient and accurate solution for panoramic semantic segmentation. By leveraging dynamic loss weights and multiplicative residual fusion, the model overcomes class imbalance and boundary noise while remaining lightweight enough for practical deployment. Future work will explore further model compression techniques, such as pruning and quantization, to enable real-time performance on ultra-low-power embedded platforms.

Summary updated

Abstract

For the self-driving and automatic parking, perception is the basic and critical technique, moreover, the detection of lane markings and parking slots is an important part of visual perception. In this paper, we use the semantic segmentation method to segment the area and classify the class of lane makings and parking slots on panoramic surround view (PSV) dataset. We propose the DFNet and make two main contributions, one is dynamic loss weights, and the other is residual fusion block (RFB). Dynamic loss weights are varying from classes, calculated according to the pixel number of each class in a batch. RFB is composed of two convolutional layers, one pooling layer, and a fusion layer to combine the feature maps by pixel multiplication. We evaluate our method on PSV dataset, and achieve an advanced result.
BibTeX
@misc{jiang2018dfnet,
  author = {Wei Jiang and Yan Wu},
  title = {{DFNet: Semantic Segmentation on Panoramic Images with Dynamic Loss Weights and Residual Fusion Block}},
  year = {2018},
  eprint = {1806.07226},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.07226},
}
Figure