SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2204.08680 · CVPR · 2022

Not All Tokens Are Equal: Human-centric Visual Analysis via Token Clustering Transformer

Ping Luo, Wanli Ouyang, Xiaogang Wang, Chen Qian, Sheng Jin, Wentao Liu, Wang Zeng

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 7 functions out of this paper's own repositories and ran 6 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
zengwang430521/tcformer canonical 6 of 7
FunctionStatusWhere it lives
drop_block_2d Ran zengwang430521/tcformer/tcformer_module/transformer_utils.py
code served (permissive licence) · get_code("e3c853a7511a411a")
drop_block_fast_2d Ran zengwang430521/tcformer/tcformer_module/transformer_utils.py
code served (permissive licence) · get_code("4162565de6ffa9da")
drop_path Ran zengwang430521/tcformer/tcformer_module/transformer_utils.py
code served (permissive licence) · get_code("9d3c18b6f3ac3dc1")
flops_to_string Ran zengwang430521/tcformer/tcformer_module/custom_flops_counter.py
code served (permissive licence) · get_code("428c8cc732ef3657")
get_grid_index Ran zengwang430521/tcformer/tcformer_module/tcformer_utils.py
code served (permissive licence) · get_code("306896b703835e2c")
params_to_string Ran zengwang430521/tcformer/tcformer_module/custom_flops_counter.py
code served (permissive licence) · get_code("e0247439ad10578e")
build_transform Not yet run zengwang430521/tcformer/classification/datasets.py
code served (permissive licence) · get_code("3bc74137ab36aa79")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2204.08680")
get_code_for_paper("2204.08680")
have("2204.08680")

Connect an agent — have() is free.