{"about":{"site":"https://codewithpapers.app","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.","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"},"url":"/paper/pix2seq-a-language-modeling-framework-for","title":"Pix2seq: A Language Modeling Framework for Object Detection","arxiv_id":"2109.10852","date":"2021-09-22","proceeding":"ICLR 2022 4","authors":["Ting Chen","Saurabh Saxena","Lala Li","David J. Fleet","Geoffrey Hinton"],"abstract":"We present Pix2Seq, a simple and generic framework for object detection. Unlike existing approaches that explicitly integrate prior knowledge about the task, we cast object detection as a language modeling task conditioned on the observed pixel inputs. Object descriptions (e.g., bounding boxes and class labels) are expressed as sequences of discrete tokens, and we train a neural network to perceive the image and generate the desired sequence. Our approach is based mainly on the intuition that if a neural network knows about where and what the objects are, we just need to teach it how to read them out. Beyond the use of task-specific data augmentations, our approach makes minimal assumptions about the task, yet it achieves competitive results on the challenging COCO dataset, compared to highly specialized and well optimized detection algorithms.","url_abs":"https://arxiv.org/abs/2109.10852v2","url_pdf":"https://arxiv.org/pdf/2109.10852v2.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":"pix2seq-a-language-modeling-framework-for","repo_url":"https://github.com/google-research/pix2seq","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"tf","reach":null},{"paper_slug":"pix2seq-a-language-modeling-framework-for","repo_url":"https://github.com/moein-shariatnia/Pix2Seq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"pix2seq-a-language-modeling-framework-for","repo_url":"https://github.com/volgachen/Pix2Seq_Pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"pix2seq-a-language-modeling-framework-for","repo_url":"https://github.com/gaopengcuhk/Pretrained-Pix2Seq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"pix2seq-a-language-modeling-framework-for","repo_url":"https://github.com/gaopengcuhk/Stable-Pix2Seq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"pix2seq-a-language-modeling-framework-for","repo_url":"https://github.com/gaopengcuhk/Unofficial-Pix2Seq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"object","task_name":"Object"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"Pix2seq (ViT-L)","rank_in_archive_order":81,"of":220,"metrics":{"box AP":"50.0"},"uses_additional_data":true},{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"Pix2seq (R50-C4)","rank_in_archive_order":97,"of":220,"metrics":{"box AP":"47.3"},"uses_additional_data":false},{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"Pix2seq (ViT-B)","rank_in_archive_order":98,"of":220,"metrics":{"box AP":"47.1"},"uses_additional_data":false},{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"Pix2seq (R101-DC5)","rank_in_archive_order":118,"of":220,"metrics":{"AP50":"63.2","AP75":"48.6","APL":"60.4","APM":"48.9","APS":"28.2","box AP":"45.0"},"uses_additional_data":false},{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"Pix2seq (R50-DC5 )","rank_in_archive_order":142,"of":220,"metrics":{"AP50":"61.0","AP75":"46.1","APL":"58.6","APM":"47","APS":"26.6","box AP":"43.2"},"uses_additional_data":false},{"leaderboard":"/sota/object-detection-on-coco-minival","task":"Object Detection","dataset":"COCO minival","model":"Pix2seq (R50)","rank_in_archive_order":153,"of":220,"metrics":{"box AP":"42.6"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2109.10852","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2109.10852"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/google-research/pix2seq","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gaopengcuhk/Pretrained-Pix2Seq","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/volgachen/Pix2Seq_Pytorch","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gaopengcuhk/Unofficial-Pix2Seq","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/moein-shariatnia/Pix2Seq","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/gaopengcuhk/Stable-Pix2Seq","reach":null}],"summary":{"ran":4,"ran_honours":1,"ran_violates":2,"ran_draft_wrong":3,"unverified":2},"by_repo_kind":{"listed":{"samples":12,"ran":10,"repositories":5}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":10,"samples":[{"code_sha256_prefix":"2630ab8a095c33dd","entry":"DETR","repo":"gaopengcuhk/Stable-Pix2Seq","repo_kind":"listed","path":"models/detr.py","file_url":"https://github.com/gaopengcuhk/Stable-Pix2Seq/blob/HEAD/models/detr.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2630ab8a095c33dd"}},{"code_sha256_prefix":"7261e3dde0bad885","entry":"EncoderDecoder","repo":"moein-shariatnia/Pix2Seq","repo_kind":"listed","path":"model.py","file_url":"https://github.com/moein-shariatnia/Pix2Seq/blob/HEAD/model.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7261e3dde0bad885"}},{"code_sha256_prefix":"600431a357e72cd6","entry":"Pix2Seq","repo":"volgachen/Pix2Seq_Pytorch","repo_kind":"listed","path":"playground/pix2seq/pix2seq.py","file_url":"https://github.com/volgachen/Pix2Seq_Pytorch/blob/HEAD/playground/pix2seq/pix2seq.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"600431a357e72cd6"}},{"code_sha256_prefix":"f31a58bf6457ced5","entry":"convert_to_xywh","repo":"gaopengcuhk/Unofficial-Pix2Seq","repo_kind":"listed","path":"datasets/coco_eval.py","file_url":"https://github.com/gaopengcuhk/Unofficial-Pix2Seq/blob/HEAD/datasets/coco_eval.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"f31a58bf6457ced5"}},{"code_sha256_prefix":"ac8fe530cdad4d8c","entry":"dice_loss","repo":"gaopengcuhk/Unofficial-Pix2Seq","repo_kind":"listed","path":"models/segmentation.py","file_url":"https://github.com/gaopengcuhk/Unofficial-Pix2Seq/blob/HEAD/models/segmentation.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"ac8fe530cdad4d8c"}},{"code_sha256_prefix":"fe0ddcc2d420c9a0","entry":"evaluate","repo":"gaopengcuhk/Unofficial-Pix2Seq","repo_kind":"listed","path":"datasets/coco_eval.py","file_url":"https://github.com/gaopengcuhk/Unofficial-Pix2Seq/blob/HEAD/datasets/coco_eval.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"fe0ddcc2d420c9a0"}},{"code_sha256_prefix":"894b253f35765276","entry":"generate_square_subsequent_mask","repo":"gaopengcuhk/Unofficial-Pix2Seq","repo_kind":"listed","path":"models/transformer.py","file_url":"https://github.com/gaopengcuhk/Unofficial-Pix2Seq/blob/HEAD/models/transformer.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"894b253f35765276"}},{"code_sha256_prefix":"8542cf00e1274bb3","entry":"nested_tensor_from_tensor_list","repo":"volgachen/Pix2Seq_Pytorch","repo_kind":"listed","path":"playground/pix2seq/pix2seq.py","file_url":"https://github.com/volgachen/Pix2Seq_Pytorch/blob/HEAD/playground/pix2seq/pix2seq.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8542cf00e1274bb3"}},{"code_sha256_prefix":"9b0e434afd6ba1bb","entry":"nested_tensor_from_tensor_list","repo":"gaopengcuhk/Pretrained-Pix2Seq","repo_kind":"listed","path":"playground/pix2seq/pix2seq.py","file_url":"https://github.com/gaopengcuhk/Pretrained-Pix2Seq/blob/HEAD/playground/pix2seq/pix2seq.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9b0e434afd6ba1bb"}},{"code_sha256_prefix":"5c0711aada67957e","entry":"sigmoid_focal_loss","repo":"gaopengcuhk/Unofficial-Pix2Seq","repo_kind":"listed","path":"models/segmentation.py","file_url":"https://github.com/gaopengcuhk/Unofficial-Pix2Seq/blob/HEAD/models/segmentation.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"5c0711aada67957e"}},{"code_sha256_prefix":"6bddc92dacf1a610","entry":"Pix2Seq","repo":"gaopengcuhk/Pretrained-Pix2Seq","repo_kind":"listed","path":"playground/pix2seq/pix2seq.py","file_url":"https://github.com/gaopengcuhk/Pretrained-Pix2Seq/blob/HEAD/playground/pix2seq/pix2seq.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6bddc92dacf1a610"}},{"code_sha256_prefix":"cd17dcaf812b820d","entry":"build_transformer","repo":"gaopengcuhk/Unofficial-Pix2Seq","repo_kind":"listed","path":"models/transformer.py","file_url":"https://github.com/gaopengcuhk/Unofficial-Pix2Seq/blob/HEAD/models/transformer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":false,"mcp_get_code":{"code_sha256":"cd17dcaf812b820d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}