{"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/you-only-look-at-one-sequence-rethinking","title":"You Only Look at One Sequence: Rethinking Transformer in Vision through Object Detection","arxiv_id":"2106.00666","date":"2021-06-01","proceeding":"NeurIPS 2021 12","authors":["Yuxin Fang","Bencheng Liao","Xinggang Wang","Jiemin Fang","Jiyang Qi","Rui Wu","Jianwei Niu","Wenyu Liu"],"abstract":"Can Transformer perform 2D object- and region-level recognition from a pure sequence-to-sequence perspective with minimal knowledge about the 2D spatial structure? To answer this question, we present You Only Look at One Sequence (YOLOS), a series of object detection models based on the vanilla Vision Transformer with the fewest possible modifications, region priors, as well as inductive biases of the target task. We find that YOLOS pre-trained on the mid-sized ImageNet-1k dataset only can already achieve quite competitive performance on the challenging COCO object detection benchmark, e.g., YOLOS-Base directly adopted from BERT-Base architecture can obtain 42.0 box AP on COCO val. We also discuss the impacts as well as limitations of current pre-train schemes and model scaling strategies for Transformer in vision through YOLOS. Code and pre-trained models are available at https://github.com/hustvl/YOLOS.","url_abs":"https://arxiv.org/abs/2106.00666v3","url_pdf":"https://arxiv.org/pdf/2106.00666v3.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":"you-only-look-at-one-sequence-rethinking","repo_url":"https://github.com/hustvl/YOLOS","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"you-only-look-at-one-sequence-rethinking","repo_url":"https://github.com/huggingface/transformers","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"object","task_name":"Object"},{"task_slug":"object-detection","task_name":"Object Detection"},{"task_slug":"object-detection-1","task_name":"object-detection"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"attention-dropout","method_name":"Attention Dropout"},{"method_slug":"bert","method_name":"BERT"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"detr","method_name":"Detr"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"feedforward-network","method_name":"Feedforward Network"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"linear-warmup-with-linear-decay","method_name":"Linear Warmup With Linear Decay"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"},{"method_slug":"weight-decay","method_name":"Weight Decay"},{"method_slug":"wordpiece","method_name":"WordPiece"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/object-detection-on-coco-o","task":"Object Detection","dataset":"COCO-O","model":"YOLOS-B\n(ViT-B)","rank_in_archive_order":30,"of":45,"metrics":{"Average mAP":"20.0","Effective Robustness":"1.05"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2106.00666","atlas_url":"https://app.syntology.ai/?focus=2106.00666","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2106.00666"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/huggingface/transformers","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/hustvl/YOLOS","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"ran":1,"ran_fixture":1,"ran_draft_wrong":2,"unverified":5},"by_repo_kind":{"official":{"samples":10,"ran":5,"repositories":1}},"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":0,"samples":[{"code_sha256_prefix":"f31a58bf6457ced5","entry":"convert_to_xywh","repo":"hustvl/YOLOS","repo_kind":"official","path":"datasets/coco_eval.py","file_url":"https://github.com/hustvl/YOLOS/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f31a58bf6457ced5"}},{"code_sha256_prefix":"74f3f5c1bab38c14","entry":"crop","repo":"hustvl/YOLOS","repo_kind":"official","path":"datasets/transforms.py","file_url":"https://github.com/hustvl/YOLOS/blob/HEAD/datasets/transforms.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74f3f5c1bab38c14"}},{"code_sha256_prefix":"39eace7e2822504f","entry":"drop_path","repo":"hustvl/YOLOS","repo_kind":"official","path":"models/layers/drop.py","file_url":"https://github.com/hustvl/YOLOS/blob/HEAD/models/layers/drop.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39eace7e2822504f"}},{"code_sha256_prefix":"fe0ddcc2d420c9a0","entry":"evaluate","repo":"hustvl/YOLOS","repo_kind":"official","path":"datasets/coco_eval.py","file_url":"https://github.com/hustvl/YOLOS/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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fe0ddcc2d420c9a0"}},{"code_sha256_prefix":"9be9e658b5bd688a","entry":"hflip","repo":"hustvl/YOLOS","repo_kind":"official","path":"datasets/transforms.py","file_url":"https://github.com/hustvl/YOLOS/blob/HEAD/datasets/transforms.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9be9e658b5bd688a"}},{"code_sha256_prefix":"653d5a3aa2c473be","entry":"drop_block_2d","repo":"hustvl/YOLOS","repo_kind":"official","path":"models/layers/drop.py","file_url":"https://github.com/hustvl/YOLOS/blob/HEAD/models/layers/drop.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"653d5a3aa2c473be"}},{"code_sha256_prefix":"97aa7c942cfb7d3d","entry":"drop_block_fast_2d","repo":"hustvl/YOLOS","repo_kind":"official","path":"models/layers/drop.py","file_url":"https://github.com/hustvl/YOLOS/blob/HEAD/models/layers/drop.py","link_basis":"plan_row","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"97aa7c942cfb7d3d"}},{"code_sha256_prefix":"a375c5fcb767baea","entry":"small","repo":"hustvl/YOLOS","repo_kind":"official","path":"models/backbone.py","file_url":"https://github.com/hustvl/YOLOS/blob/HEAD/models/backbone.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a375c5fcb767baea"}},{"code_sha256_prefix":"6d26e8d0c3a1056a","entry":"small_dWr","repo":"hustvl/YOLOS","repo_kind":"official","path":"models/backbone.py","file_url":"https://github.com/hustvl/YOLOS/blob/HEAD/models/backbone.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6d26e8d0c3a1056a"}},{"code_sha256_prefix":"79c3d06885711f57","entry":"tiny","repo":"hustvl/YOLOS","repo_kind":"official","path":"models/backbone.py","file_url":"https://github.com/hustvl/YOLOS/blob/HEAD/models/backbone.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"79c3d06885711f57"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}