{"about":{"non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","site":"https://codewithpapers.app","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/k-means-mask-transformer","title":"kMaX-DeepLab: k-means Mask Transformer","arxiv_id":"2207.04044","date":"2022-07-08","proceeding":null,"authors":["Qihang Yu","Huiyu Wang","Siyuan Qiao","Maxwell Collins","Yukun Zhu","Hartwig Adam","Alan Yuille","Liang-Chieh Chen"],"abstract":"The rise of transformers in vision tasks not only advances network backbone designs, but also starts a brand-new page to achieve end-to-end image recognition (e.g., object detection and panoptic segmentation). Originated from Natural Language Processing (NLP), transformer architectures, consisting of self-attention and cross-attention, effectively learn long-range interactions between elements in a sequence. However, we observe that most existing transformer-based vision models simply borrow the idea from NLP, neglecting the crucial difference between languages and images, particularly the extremely large sequence length of spatially flattened pixel features. This subsequently impedes the learning in cross-attention between pixel features and object queries. In this paper, we rethink the relationship between pixels and object queries and propose to reformulate the cross-attention learning as a clustering process. Inspired by the traditional k-means clustering algorithm, we develop a k-means Mask Xformer (kMaX-DeepLab) for segmentation tasks, which not only improves the state-of-the-art, but also enjoys a simple and elegant design. As a result, our kMaX-DeepLab achieves a new state-of-the-art performance on COCO val set with 58.0% PQ, Cityscapes val set with 68.4% PQ, 44.0% AP, and 83.5% mIoU, and ADE20K val set with 50.9% PQ and 55.2% mIoU without test-time augmentation or external dataset. We hope our work can shed some light on designing transformers tailored for vision tasks. TensorFlow code and models are available at https://github.com/google-research/deeplab2 A PyTorch re-implementation is also available at https://github.com/bytedance/kmax-deeplab","url_abs":"https://arxiv.org/abs/2207.04044v5","url_pdf":"https://arxiv.org/pdf/2207.04044v5.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"k-means-mask-transformer","repo_url":"https://github.com/bytedance/kmax-deeplab","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"k-means-mask-transformer","repo_url":"https://github.com/google-research/deeplab2","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"k-means-mask-transformer","repo_url":"https://github.com/cy-xu/spatially_aware_ai","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"AGPL-3.0"}}],"tasks":[{"task_slug":"clustering","task_name":"Clustering"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"panoptic-segmentation","task_name":"Panoptic Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[{"method_slug":"k-means-clustering","method_name":"k-Means Clustering"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/panoptic-segmentation-on-ade20k-val","task":"Panoptic Segmentation","dataset":"ADE20K val","model":"kMaX-DeepLab (ConvNeXt-L, single-scale, 1281x1281)","rank_in_archive_order":10,"of":25,"metrics":{"AP":"-","PQ":"50.9","mIoU":"55.2"},"uses_additional_data":false},{"leaderboard":"/sota/panoptic-segmentation-on-ade20k-val","task":"Panoptic Segmentation","dataset":"ADE20K val","model":"kMaX-DeepLab (ConvNeXt-L, single-scale, 641x641)","rank_in_archive_order":17,"of":25,"metrics":{"AP":"-","PQ":"48.7","mIoU":"54.8"},"uses_additional_data":false},{"leaderboard":"/sota/panoptic-segmentation-on-ade20k-val","task":"Panoptic Segmentation","dataset":"ADE20K val","model":"kMaX-DeepLab (ResNet50, single-scale, 1281x1281)","rank_in_archive_order":20,"of":25,"metrics":{"AP":"-","PQ":"42.3","mIoU":"45.3"},"uses_additional_data":false},{"leaderboard":"/sota/panoptic-segmentation-on-ade20k-val","task":"Panoptic Segmentation","dataset":"ADE20K val","model":"kMaX-DeepLab (ResNet50, single-scale, 641x641)","rank_in_archive_order":21,"of":25,"metrics":{"AP":"-","PQ":"41.5","mIoU":"45.0"},"uses_additional_data":false},{"leaderboard":"/sota/panoptic-segmentation-on-coco-minival","task":"Panoptic Segmentation","dataset":"COCO minival","model":"kMaX-DeepLab (single-scale, pseudo-labels)","rank_in_archive_order":11,"of":31,"metrics":{"PQ":"58.1","PQst":"48.8","PQth":"64.3"},"uses_additional_data":true},{"leaderboard":"/sota/panoptic-segmentation-on-coco-minival","task":"Panoptic Segmentation","dataset":"COCO minival","model":"kMaX-DeepLab (single-scale, drop query with 256 queries)","rank_in_archive_order":13,"of":31,"metrics":{"PQ":"58.0","PQst":"48.6","PQth":"64.2"},"uses_additional_data":false},{"leaderboard":"/sota/panoptic-segmentation-on-coco-minival","task":"Panoptic Segmentation","dataset":"COCO minival","model":"kMaX-DeepLab (single-scale)","rank_in_archive_order":15,"of":31,"metrics":{"PQ":"57.9","PQst":"48.6","PQth":"64.0"},"uses_additional_data":false},{"leaderboard":"/sota/panoptic-segmentation-on-coco-test-dev","task":"Panoptic Segmentation","dataset":"COCO test-dev","model":"kMaX-DeepLab (single-scale)","rank_in_archive_order":2,"of":38,"metrics":{"PQ":"58.5","PQst":"49.0","PQth":"64.8"},"uses_additional_data":false},{"leaderboard":"/sota/panoptic-segmentation-on-cityscapes-test","task":"Panoptic Segmentation","dataset":"Cityscapes test","model":"kMaX-DeepLab (single-scale)","rank_in_archive_order":5,"of":10,"metrics":{"PQ":"66.2"},"uses_additional_data":false},{"leaderboard":"/sota/panoptic-segmentation-on-cityscapes-val","task":"Panoptic Segmentation","dataset":"Cityscapes val","model":"kMaX-DeepLab (single-scale)","rank_in_archive_order":8,"of":37,"metrics":{"AP":"44.0","PQ":"68.4","mIoU":"83.5"},"uses_additional_data":false},{"leaderboard":"/sota/semantic-segmentation-on-cityscapes","task":"Semantic Segmentation","dataset":"Cityscapes test","model":"kMaX-DeepLab (ConvNeXt-L, fine only)","rank_in_archive_order":18,"of":105,"metrics":{"Mean IoU (class)":"83.2%"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2207.04044","atlas_url":"https://app.syntology.ai/?focus=2207.04044","mcp":null,"developers":"https://syntology.ai/developers","held":true,"reason":"arxiv_id_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"agent_calls":[{"tool":"get_citation_path","arguments":{"paper_1":"2207.04044"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2207.04044\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2207.04044"},"call":"get_concepts_for_paper(arxiv_id=\"2207.04044\")"}],"by_repo":[{"repo":"bytedance/kmax-deeplab","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2206.08948"],"harvested_for_calls":[{"arxiv_id":"2206.08948","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2206.08948"},"call":"get_harvested_code_for_paper(arxiv_id=\"2206.08948\")"}]},{"repo":"google-research/deeplab2","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2311.05770"],"harvested_for_calls":[{"arxiv_id":"2311.05770","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2311.05770"},"call":"get_harvested_code_for_paper(arxiv_id=\"2311.05770\")"}]},{"repo":"cy-xu/spatially_aware_ai","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0}],"by_repo_harvested_for_is":"harvested_for: the arXiv ids (as Syntology's graph holds them) of every paper whose samples Syntology's graph links to this repository, in arXiv-id order, complete; the page names the first 3 and says how many more. A link only: it does not say the papers are the same work, that one copied the other, or that the code implements this paper's method; harvested_for_calls gives the get_harvested_code_for_paper call for each arXiv-shaped id among them","by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"ae40649c48eeca2cabd00e8eb5ecb30247ce581ecb241f5903fcd3d194a420f9","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}