MS-Former: Memory-Supported Transformer for Weakly Supervised Change Detection With Patch-Level Annotations

Zhenglai Li, Chang Tang, Xinwang Liu, Changdong Li, Xianju Li, Wei Zhang

TL;DR

This paper introduces MS-Former, a novel weakly supervised change detection framework that leverages "patch-level annotations" to reduce labeling costs while maintaining high accuracy. By incorporating a memory bank and a bi-directional attention mechanism, MS-Former effectively captures and utilizes semantic variations between bi-temporal images, outperforming existing methods and narrowing the gap with fully supervised approaches.

What Problem Does This Paper Address?

Change detection (CD) in remote sensing is crucial for monitoring urban development, land use, and disaster assessment. Traditional CD methods achieve high performance but rely on expensive, pixel-level annotations. While weakly supervised methods offer alternatives like image-level labels, they often struggle to achieve fine-grained detection. This paper addresses the challenge of achieving accurate change detection with less labor-intensive annotations by proposing a novel "patch-level annotation" scheme. This scheme strikes a balance between the cost of annotation and the performance of the CD task, offering a more practical solution for large-scale remote sensing applications.

Methods

The core of the proposed method is the MS-Former, a transformer-based architecture designed for weakly supervised change detection using patch-level annotations. It comprises three key modules:

  • Feature Extractor: A standard backbone (ResNet18) is used to extract multi-level features from bi-temporal images. These features are then combined using an element-wise subtraction to capture temporal differences. A decoder aggregates these features into a unified representation.
  • Bi-directional Attention Block (BAB): This novel module is central to MS-Former. It utilizes a memory bank to store "prototypes" representing semantic variations of changed and unchanged regions across the entire training dataset. The BAB consists of two attention mechanisms:
  • Pixel-to-Memory (P2M) Attention: This mechanism extracts salient features from the pixel-wise temporal difference representations and uses them to update the prototypes stored in the memory bank. This allows the memory bank to learn from the data dynamically.
  • Memory-to-Pixel (M2P) Attention: This mechanism uses the updated memory prototypes to refine the temporal difference features. By attending to the learned prototypes, the model can better distinguish between changed and unchanged regions.
  • Patch-level Supervision Scheme (PSS): This scheme guides the network's learning process using the patch-level annotations. It includes:
  • Patch Classification Loss (Lpcl): This loss supervises the network to classify whether a given patch contains changes or not, directly using the patch-level labels.
  • Unchanged Patch Consistency Loss (Lupcl): This loss helps to filter out false positives in regions that are supposed to be unchanged, further improving accuracy.

The overall loss function is a combination of the patch-level supervision loss and a semantic loss applied to intermediate representations within the BAB.

Datasets

The proposed MS-Former was evaluated on three widely used remote sensing change detection datasets:

  • BCDD: A high-resolution urban building CD dataset.
  • LEVIR: A high-resolution building CD dataset.
  • SYSU: A dataset containing various complex change scenes.

Additionally, the paper demonstrates the generalization capability of MS-Former on the GLVM dataset for landslide detection. The authors note that for BCDD and LEVIR, they leverage pre-processed data or crop images into specific patch sizes (e.g., 256x256) for experiments.

Key Insights and Ideas

  • Patch-level annotations as a sweet spot: The paper convincingly demonstrates that patch-level annotations offer a practical trade-off between annotation cost and detection performance. As patch size decreases, performance improves, approaching pixel-level accuracy without the prohibitive labeling effort.
  • Memory bank for semantic context: The memory bank mechanism is crucial for capturing global semantic variations across the entire dataset. This allows the model to learn robust representations of "changed" and "unchanged" states, which are then used to enhance local feature representations.
  • Bi-directional attention for effective fusion: The P2M and M2P attention mechanisms in the BAB are key to effectively integrating information from pixel-level features into the memory bank and vice-versa. This bi-directional flow ensures that both local details and global semantic context are leveraged.
  • Weak supervision can rival strong supervision: The results show that MS-Former, even with weaker patch-level supervision, can achieve performance comparable to, and in some cases exceeding, fully supervised methods, especially when considering computational cost and annotation effort.

Key Results

  • Performance Improvement with Patch Size: On the BCDD dataset, the F1 score increased from 0.7431 (256x256 patches) to 0.9024 (32x32 patches), highlighting the benefit of smaller patch sizes for capturing finer details.
  • Outperforming Weakly Supervised Methods: MS-Former consistently outperformed other weakly supervised methods on the BCDD dataset across various patch sizes. For instance, it achieved superior IoU and F1 scores compared to methods like WCDNet, WS-C, and BGMix.
  • Narrowing the Gap with Fully Supervised Methods: On LEVIR and SYSU datasets, MS-Former with patch-level annotations significantly reduced the performance gap compared to state-of-the-art fully supervised methods. For example, the F1 score gap on LEVIR was reduced to around 10.32% and 4.77% on SYSU with 32x32 patches.
  • Ablation Studies Confirm Component Effectiveness: Ablation studies confirmed the importance of the Bi-directional Attention Block (BAB) and the Patch-level Supervision Scheme (PSS). Removing the BAB led to significant performance drops, and removing components of the PSS also degraded results.
  • Generalization to Landslide Detection: The method showed promising results on the GLVM landslide detection dataset, demonstrating its generalization capabilities.

Limitations and Future Work

  • Limitations of Patch-Level Supervision: While effective, patch-level annotations still have limitations. The paper notes that errors mainly lie at the boundaries of changed buildings due to the inherent coarseness of patch-level supervision compared to pixel-level.
  • Future Work: The authors suggest that future research could explore more advanced attention mechanisms or incorporate additional contextual information to further improve performance, particularly at object boundaries. The potential for applying this framework to other remote sensing tasks beyond change detection could also be explored.

Summary updated

BibTeX
@article{li2023ms,
  author = {Zhenglai Li and Chang Tang and Xinwang Liu and Changdong Li and Xianju Li and Wei Zhang},
  title = {{MS-Former: Memory-Supported Transformer for Weakly Supervised Change Detection With Patch-Level Annotations}},
  journal = {IEEE Trans. Geosci. Remote. Sens.},
  year = {2023},
}
Figure