Source-linked AI summary

AAformer: Auto-Aligned Transformer for Person Re-Identification

Kuan Zhu, Haiyun Guo, Shiliang Zhang, Yaowei Wang, Jing Liu, Jinqiao Wang, Ming Tang

arXiv:2104.00921v3cs.CV

TL;DR

Person re-identification methods often align human parts coarsely or miss identifiable nonhuman parts. AAformer introduces [PART] tokens and OT-based online patch grouping within Transformer self-attention, and experiments validate the approach across standard benchmarks.

  • Problem

    Existing person re-ID methods can align human parts coarsely or fail to locate identifiable nonhuman parts such as knapsacks.

    Source: §I · p. 1
  • Method

    AAformer uses learnable [PART] tokens as prototypes and fast Optimal Transport to online group patches into human and nonhuman part subsets within self-attention.

    Source: §I · p. 2, B. Auto-Aligned Transformer · p. 4
  • Results

    AAformer is reported superior to various state-of-the-art methods on Market-1501, CUHK03, DukeMTMC-reID, and MSMT17.

    Source: §I · p. 2
  • Takeaways & Limitations

    The output [PART] tokens can be directly used as part features for person re-identification, while visualizations show attention to human and nonhuman parts.

    Source: §I · p. 2, C. Ablation Studies · p. 8

Abstract

from arXiv · show

In person re-identification (re-ID), extracting part-level features from person images has been verified to be crucial to offer fine-grained information. Most of the existing CNN-based methods only locate the human parts coarsely, or rely on pretrained human parsing models and fail in locating the identifiable nonhuman parts (e.g., knapsack). In this article, we introduce an alignment scheme in transformer architecture for the first time and propose the auto-aligned transformer (AAformer) to automatically locate both the human parts and nonhuman ones at patch level. We introduce the "Part tokens ([PART]s)", which are learnable vectors, to extract part features in the transformer. A [PART] only interacts with a local subset of patches in self-attention and learns to be the part representation. To adaptively group the image patches into different subsets, we design the auto-alignment. Auto-alignment employs a fast variant of optimal transport (OT) algorithm to online cluster the patch embeddings into several groups with the [PART]s as their prototypes. AAformer integrates the part alignment into the self-attention and the output [PART]s can be directly used as part features for retrieval. Extensive experiments validate the effectiveness of [PART]s and the superiority of AAformer over various state-of-the-art methods.

I. INTRODUCTION

AAformer addresses coarse human-part alignment and missed nonhuman cues in person re-identification by introducing patch-level adaptive alignment in a Transformer.

  • Person re-identification needs fine-grained part features because detection, pose, and viewpoint changes cause body-part misalignment.Source: §I · p. 1
  • Existing Transformer re-ID methods had not yet addressed part alignment, while CNN-based approaches often align parts coarsely or miss identifiable nonhuman items.Source: §I · pp. 1–2
  • [PART]s are learnable vectors that attend only to local patch subsets and learn their representations as part features.Source: §I · p. 2
  • Auto-alignment uses fast Optimal Transport to cluster patches online around [PART] prototypes, covering both human and nonhuman parts.Source: §I · p. 2
  • AAformer’s experiments validate [PART]s and report superiority over state-of-the-art methods on Market-1501, CUHK03, DukeMTMC-reID, and MSMT17.Source: §I · p. 2

II. RELATED WORK

Prior aligned person re-ID methods use fixed stripes, rectangular regions, external semantics, or attention, each with limitations in precision, coverage, or consistency.

Stripe-based approaches

Bounding box-based Approaches

Extra semantics-based methods

Attention-based methods

B. Visual Transformer

Visual Transformers represent images as patch sequences and extend Transformer tokenization with learnable grouping mechanisms, including AAformer’s OT-based assignment.

  • ViT divides an image into patches, linearly maps them to vectors, adds a learnable class token, and processes the sequence with a Transformer encoder.Source: B. Visual Transformer · p. 3
  • GroupViT groups patches toward learnable group tokens using Gumbel Softmax, whereas AAformer assigns patches to [PART]s with Optimal Transport.Source: B. Visual Transformer · p. 3
  • AAformer’s OT assignment is designed to avoid the trivial solution in which all patches are assigned to one [PART].Source: B. Visual Transformer · p. 3

A. The Main Architecture

AAformer builds on the standard patch-based Vision Transformer architecture, adding [PART] representations and replacing self-attention for them with auto-alignment.

  • The input image is reshaped into flattened patches, linearly projected into D-dimensional embeddings, combined with a class token and position embeddings, then encoded by a Transformer.Source: A. The Main Architecture · p. 3
  • Standard self-attention computes query-key affinities, applies scaled softmax weighting, and combines value vectors across the sequence.Source: A. The Main Architecture · p. 3
  • AAformer adds learnable [PART] tokens alongside the class token to represent local parts and replaces the MSA layer with Multi-head Auto-Alignment.Source: Figure 2 · p. 4, A. The Main Architecture · p. 4
  • Auto-alignment operates in parallel across attention heads, concatenates their outputs, and uses the resulting [PART]s for person re-identification.Source: Figure 2 · p. 4, A. The Main Architecture · p. 4

B. Auto-Aligned Transformer

AAformer uses [PART]s and optimal-transport auto-alignment to assign patches into mutually exclusive part groups, integrating alignment into self-attention and producing adaptive part representations.

C. Objective Function

AAformer trains global and part representations with identity classification and separately mined triplet objectives, then concatenates CLS and [PART]s for testing.

IV. EXPERIMENTS

The experiments compare AAformer with state-of-the-art methods on holistic and occluded re-ID benchmarks and use ablations to assess its components and design choices.

  • Experiments evaluate AAformer against state-of-the-art methods on holistic and occluded person re-ID benchmarks.Source: §IV · p. 6
  • Ablations examine [PART]s, AAformer, Optimal Transport versus Nearest Neighbor, and AAformer visualizations.Source: §IV · p. 6
  • The authors state that the reported results validate the effectiveness of the proposed method.Source: §IV · p. 6

A. Implementation Details and Datasets

AAformer is implemented with a ViT-Base backbone and standard re-ID preprocessing, optimization, datasets, and CMC/mAP evaluation protocols.

B. Comparison with State-of-the-art Methods

AAformer is compared with state-of-the-art methods on holistic and occluded person re-ID benchmarks. It achieves leading performance across the reported datasets, with especially large gains on CUHK03, MSMT17, and Occluded-DukeMTMC.

Holistic benchmarks

Occluded benchmark

  • On Occluded-DukeMTMC, AAformer sets the new state-of-the-art, outperforming other methods by at least 2.6% in Rank-1 and 4.6% in mAP.The [PART]s can adaptively focus on visible areas in occluded images and extract discriminative features from them.Source: B. Comparison with State-of-the-art… · pp. 6–7

C. Ablation Studies

The ablations evaluate [PART]s, patch-assignment strategies, and part granularity, showing benefits from layer-wise local extraction, constrained OT grouping, and adaptive part counts.

Effectiveness of [PART]s

  • [PART]s with MGN’s partitioning surpass the baseline by 2.8%/4.5% in Rank-1/mAP on MSMT17.Source: C. Ablation Studies · p. 7
  • [PART]s extract local features through self-attention in every Transformer layer, whereas part pooling obtains local features only through the last layer.Source: C. Ablation Studies · pp. 7–8
  • Adding more CLS tokens only slightly improves performance because their information is similar and redundant, separating [PART] gains from feature-dimension increases.Source: C. Ablation Studies · p. 8

Effectiveness of AAformer

  • Optimal Transport outperforms Nearest Neighbor because unconstrained nearest assignment tends to group most patch embeddings into the same [PART].Source: C. Ablation Studies · p. 8

Different numbers of [PART]s

  • The {2, 3} granularity setting usually obtains the best accuracy, while increasing the number of [PART]s is not uniformly beneficial.Source: C. Ablation Studies · p. 8

Visualization of AAformer

  • AAformer’s [PART]s focus on human and nonhuman parts, handle pose variation and occlusion, suppress background responses, and maintain semantic consistency across images.Source: C. Ablation Studies · p. 8

V. CONCLUSION

AAformer introduces [PART]s and integrates part localization into Transformer self-attention, using Optimal Transport to align human and nonhuman parts online. The method’s experiments validate [PART] effectiveness and AAformer’s superiority over many state-of-the-art methods.

  • [PART]s are learnable Transformer vectors that extract part-level features by interacting with local patch subsets.Source: §V · p. 8
  • AAformer integrates localization into self-attention and uses Optimal Transport to online align human and nonhuman parts without extra semantics.Source: §V · p. 9
  • Experiments validate the effectiveness of [PART]s and AAformer’s superiority over many state-of-the-art methods.Source: §V · p. 9
Loading 2104.00921v3…