Skip to main content
QUICK REVIEW

[Paper Review] Not All Tokens Are Equal: Human-centric Visual Analysis via Token Clustering Transformer

Wang Zeng, Sheng Jin|arXiv (Cornell University)|Apr 19, 2022
Human Pose and Action RecognitionComputer Science9 citations
TL;DR

This paper proposes Token Clustering Transformer (TCFormer), a vision transformer that dynamically generates tokens of varying shapes and sizes through progressive clustering, focusing finer resolution on human body regions and coarser on backgrounds. TCFormer achieves state-of-the-art performance on human-centric tasks like whole-body pose estimation and 3D mesh reconstruction by preserving fine details through a novel Clustering Token Merge (CTM) block and Multi-stage Token Aggregation (MTA) head.

ABSTRACT

Vision transformers have achieved great successes in many computer vision tasks. Most methods generate vision tokens by splitting an image into a regular and fixed grid and treating each cell as a token. However, not all regions are equally important in human-centric vision tasks, e.g., the human body needs a fine representation with many tokens, while the image background can be modeled by a few tokens. To address this problem, we propose a novel Vision Transformer, called Token Clustering Transformer (TCFormer), which merges tokens by progressive clustering, where the tokens can be merged from different locations with flexible shapes and sizes. The tokens in TCFormer can not only focus on important areas but also adjust the token shapes to fit the semantic concept and adopt a fine resolution for regions containing critical details, which is beneficial to capturing detailed information. Extensive experiments show that TCFormer consistently outperforms its counterparts on different challenging human-centric tasks and datasets, including whole-body pose estimation on COCO-WholeBody and 3D human mesh reconstruction on 3DPW. Code is available at https://github.com/zengwang430521/TCFormer.git

Motivation & Objective

  • To address the limitation of fixed-grid vision transformers that treat all image regions equally, regardless of semantic importance.
  • To enable vision transformers to allocate more tokens to critical human body regions, such as the face and hands, while reducing tokens for background.
  • To develop a dynamic token generation mechanism that adapts token shape, size, and location based on semantic content and task requirements.
  • To preserve high-resolution details during multi-stage feature aggregation without losing spatial fidelity.
  • To achieve superior performance on human-centric vision benchmarks such as COCO-WholeBody and 3DPW.

Proposed method

  • TCFormer initializes every pixel as a vision token in the first stage, each representing a single-pixel region.
  • It applies a k-nearest-neighbor-based density peaks clustering (KNN-DPC) algorithm to group similar tokens based on their features.
  • Tokens in the same cluster are merged via feature averaging, and the merged token's region is the union of its input regions.
  • The merged tokens are processed through a transformer block for feature aggregation, enabling long-range attention across non-rectangular, irregularly shaped regions.
  • A Multi-stage Token Aggregation (MTA) head progressively upsamples tokens from later stages and aggregates features across all stages to reconstruct pixel-aligned feature maps.
  • The MTA head ensures that each pixel corresponds to a unique token, avoiding feature loss from overlapping tokens in fixed-grid transformations.

Experimental results

Research questions

  • RQ1Can dynamic, non-uniform token generation improve performance on human-centric vision tasks compared to fixed-grid tokenization?
  • RQ2How does progressive clustering of vision tokens affect the preservation of fine-grained details in critical body parts like the face and hands?
  • RQ3To what extent does the proposed Clustering Token Merge (CTM) block enhance feature representation compared to standard average pooling or fixed grid methods?
  • RQ4Does the Multi-stage Token Aggregation (MTA) head effectively preserve spatial details during multi-scale feature fusion?
  • RQ5Can TCFormer adapt its token distribution to different task-specific priorities, such as face vs. hand keypoint detection?

Key findings

  • TCFormer achieves 58.7 AP on COCO-WholeBody for whole-body pose estimation, outperforming the baseline by 2.1 AP.
  • On 3DPW, TCFormer achieves 28.6 mean MPJPE for 3D human mesh reconstruction, a 1.8 improvement over the baseline.
  • The CTM block reduces performance drop on fine-grained regions: hand AP drops by only 5.6% and face by 13.6% when using coarse tokens, indicating strong detail preservation.
  • Replacing the MTA head with a deconvolutional head causes a 4.0% AP drop on foot keypoint detection, demonstrating MTA's effectiveness in preserving fine details.
  • Qualitative analysis shows that TCFormer allocates fine tokens to high-detail regions such as the face and hands, and the token distribution is task-adaptive, as seen in models trained for face vs. hand keypoint detection.
  • The method is the first to use clustering for dynamic vision token generation, enabling flexible, semantic-aware token shapes and sizes in vision transformers.

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.