Skip to main navigation Skip to search Skip to main content

Spatial-Aware Metric Network via Patchwise Feature Alignment for Few-Shot Learning

  • Yucheng Zhang
  • , Shuo Zhang*
  • , Biao Leng
  • *Corresponding author for this work
  • Beihang University
  • Beijing Jiaotong University

Research output: Contribution to journalArticlepeer-review

Abstract

Few-shot learning focuses on recognizing novel classes by learning from extremely limited instances, offering solutions for industrial applications that lack sufficient training data, such as photovoltaic module microcrack recognition. An effective approach for few-shot classification is to learn discriminative features and measure the similarity between support and query instances. However, the inconsistent target locations and sizes in support-query pairs lead to spatial mismatch, adversely affecting similarity measurement. In this work, we propose a novel spatial-aware metric network (SAMNet) for few-shot classification, by which the features of support-query pairs are aligned based on patch-level spatial information interactions. Specifically, the patchwise feature alignment is performed via a bidirectional guided interaction structure. We first generate residual query features under the guidance of support patches and embed them into support features to enhance correlation. The support features are then reaggregated under the guidance of query patches to achieve patchwise feature alignment. Based on the aligned support-query pairs, the spatial-aware metric is proposed for few-shot classification by calculating the spatial importance weighted distance. We evaluate the classification ability of the SAMNet on general, fine-grained, and cross-domain benchmarks, including miniImageNet, tieredImageNet, Caltech-UCSD Birds-200-2011 (CUB), and miniImageNet→CUB few-shot datasets. Experimental results show that the proposed metric network outperforms other state-of-the-art methods on both one- and five-shot tasks. In addition, the proposed method is used to detect microcracks in photovoltaic modules across production lines. The excellent performance in practical scenarios proves the industrial value of the SAMNet.

Original languageEnglish
Article number5010011
JournalIEEE Transactions on Instrumentation and Measurement
Volume74
DOIs
StatePublished - 2025

UN SDGs

This output contributes to the following UN Sustainable Development Goals (SDGs)

  1. SDG 7 - Affordable and Clean Energy
    SDG 7 Affordable and Clean Energy

Keywords

  • Feature alignment
  • few-shot learning
  • metric learning
  • microcrack recognition
  • spatial-aware

Fingerprint

Dive into the research topics of 'Spatial-Aware Metric Network via Patchwise Feature Alignment for Few-Shot Learning'. Together they form a unique fingerprint.

Cite this