Skip to main content
QUICK REVIEW

[Paper Review] Pyramid Fusion Transformer for Semantic Segmentation

Zipeng Qin, Jianbo Liu|arXiv (Cornell University)|Jan 11, 2022
Advanced Neural Network ApplicationsComputer Science11 citations
TL;DR

This paper proposes Pyramid Fusion Transformer (PFT), a multi-scale transformer decoder for per-mask semantic segmentation that enhances feature fusion via cross-scale inter-query attention. By leveraging features from a 1/8, 1/16, and 1/32 resolution pyramid and using learnable queries with cross-attention, PFT achieves state-of-the-art performance, attaining 57.4 mIoU on ADE20K with a Swin-L backbone under multi-scale inference.

ABSTRACT

The recently proposed MaskFormer gives a refreshed perspective on the task of semantic segmentation: it shifts from the popular pixel-level classification paradigm to a mask-level classification method. In essence, it generates paired probabilities and masks corresponding to category segments and combines them during inference for the segmentation maps. In our study, we find that per-mask classification decoder on top of a single-scale feature is not effective enough to extract reliable probability or mask. To mine for rich semantic information across the feature pyramid, we propose a transformer-based Pyramid Fusion Transformer (PFT) for per-mask approach semantic segmentation with multi-scale features. The proposed transformer decoder performs cross-attention between the learnable queries and each spatial feature from the feature pyramid in parallel and uses cross-scale inter-query attention to exchange complimentary information. We achieve competitive performance on three widely used semantic segmentation datasets. In particular, on ADE20K validation set, our result with Swin-B backbone surpasses that of MaskFormer's with a much larger Swin-L backbone in both single-scale and multi-scale inference, achieving 54.1 mIoU and 55.7 mIoU respectively. Using a Swin-L backbone, we achieve single-scale 56.1 mIoU and multi-scale 57.4 mIoU, obtaining state-of-the-art performance on the dataset. Extensive experiments on three widely used semantic segmentation datasets verify the effectiveness of our proposed method.

Motivation & Objective

  • Address the limitation of per-mask classification models like MaskFormer that underperform when using single-scale features due to insufficient fine-grained or global context.
  • Improve segmentation accuracy by effectively fusing multi-scale features without incurring prohibitive computational cost.
  • Design an efficient cross-scale attention mechanism that enables query tokens to exchange semantic information across different feature scales.
  • Optimize the query-pixel attention mechanism using a novel attention weight loss to suppress spurious attention on non-existing categories.
  • Achieve state-of-the-art performance on standard benchmarks while maintaining computational efficiency.

Proposed method

  • Propose a multi-scale transformer decoder that processes feature maps from 1/8, 1/16, and 1/32 input resolutions in parallel using shared learnable object queries.
  • Introduce cross-scale inter-query attention to enable communication between queries of different scales, allowing them to attend to complementary semantic information without direct cross-scale token computation.
  • Use a learnable query-based cross-attention mechanism between queries and multi-scale features to generate paired probability and mask predictions.
  • Apply a novel attention weight loss that regularizes queries not corresponding to existing categories, reducing spurious attention on irrelevant image regions.
  • Optimize the attention weight loss only for the first 3/4 of training iterations to balance regularization and model capacity.
  • Average per-scale predictions from the decoder to produce the final segmentation map, improving robustness and accuracy.

Experimental results

Research questions

  • RQ1Can a transformer-based decoder effectively fuse multi-scale features for per-mask semantic segmentation without excessive computational cost?
  • RQ2How does cross-scale inter-query attention improve feature communication across different resolution levels compared to naive concatenation or self-attention over all tokens?
  • RQ3What is the impact of introducing an attention weight loss that suppresses attention on non-existing categories during training?
  • RQ4Does removing the attention weight loss at a certain training stage improve model generalization and performance?
  • RQ5What is the optimal number and resolution of multi-scale features for balancing performance and FLOPs in per-mask segmentation?

Key findings

  • PFT achieves 55.7 mIoU on ADE20K with a Swin-B backbone under multi-scale inference, surpassing MaskFormer with a much larger Swin-L backbone.
  • With a Swin-L backbone, PFT achieves 57.4 mIoU on ADE20K under multi-scale inference, setting a new state-of-the-art result on the dataset.
  • The ablation study shows that using 1/8, 1/16, and 1/32 resolution features yields the best performance-computation trade-off, with 48.7 mIoU, while adding a 1/4 resolution feature only marginally improves performance to 48.9 mIoU at a higher FLOP cost.
  • Applying the attention weight loss only until 120k iterations yields the best performance (48.7 mIoU) and lowest variance, indicating that early removal of regularization improves model capacity.
  • Removing the extra supervision on initial queries slightly degrades performance (from 48.7 to 48.5 mIoU), suggesting that early supervision helps align queries with network dynamics.
  • Visualizations confirm that removing the attention weight loss leads to reduced correlation between attention weights and category masks, indicating that queries attend more to regions outside the target category after removal.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.