{"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/spatial-aware-token-for-weakly-supervised","title":"Spatial-Aware Token for Weakly Supervised Object Localization","arxiv_id":"2303.10438","date":"2023-03-18","proceeding":"ICCV 2023 1","authors":["Pingyu Wu","Wei Zhai","Yang Cao","Jiebo Luo","Zheng-Jun Zha"],"abstract":"Weakly supervised object localization (WSOL) is a challenging task aiming to localize objects with only image-level supervision. Recent works apply visual transformer to WSOL and achieve significant success by exploiting the long-range feature dependency in self-attention mechanism. However, existing transformer-based methods synthesize the classification feature maps as the localization map, which leads to optimization conflicts between classification and localization tasks. To address this problem, we propose to learn a task-specific spatial-aware token (SAT) to condition localization in a weakly supervised manner. Specifically, a spatial token is first introduced in the input space to aggregate representations for localization task. Then a spatial aware attention module is constructed, which allows spatial token to generate foreground probabilities of different patches by querying and to extract localization knowledge from the classification task. Besides, for the problem of sparse and unbalanced pixel-level supervision obtained from the image-level label, two spatial constraints, including batch area loss and normalization loss, are designed to compensate and enhance this supervision. Experiments show that the proposed SAT achieves state-of-the-art performance on both CUB-200 and ImageNet, with 98.45% and 73.13% GT-known Loc, respectively. Even under the extreme setting of using only 1 image per class from ImageNet for training, SAT already exceeds the SOTA method by 2.1% GT-known Loc. Code and models are available at https://github.com/wpy1999/SAT.","url_abs":"https://arxiv.org/abs/2303.10438v2","url_pdf":"https://arxiv.org/pdf/2303.10438v2.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":"spatial-aware-token-for-weakly-supervised","repo_url":"https://github.com/wpy1999/sat","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"object","task_name":"Object"},{"task_slug":"object-localization","task_name":"Object Localization"},{"task_slug":"weakly-supervised-object-localization","task_name":"Weakly-Supervised Object Localization"}],"methods":[{"method_slug":"aware","method_name":"AWARE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2303.10438","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.10438"}},"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":"deterministic:regex_extraction","url":"https://github.com/wpy1999/SAT","reach":null}],"summary":{"ran":4,"ran_honours":1,"unverified":1},"by_repo_kind":{"official":{"samples":6,"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":6,"samples":[{"code_sha256_prefix":"d3d6353eaf322103","entry":"Attention","repo":"wpy1999/SAT","repo_kind":"official","path":"Model/SAT.py","file_url":"https://github.com/wpy1999/SAT/blob/HEAD/Model/SAT.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":"d3d6353eaf322103"}},{"code_sha256_prefix":"d824727765fcbcc6","entry":"Block","repo":"wpy1999/SAT","repo_kind":"official","path":"Model/SAT.py","file_url":"https://github.com/wpy1999/SAT/blob/HEAD/Model/SAT.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":"d824727765fcbcc6"}},{"code_sha256_prefix":"2c245fdc430b02e4","entry":"PatchEmbed","repo":"wpy1999/SAT","repo_kind":"official","path":"Model/SAT.py","file_url":"https://github.com/wpy1999/SAT/blob/HEAD/Model/SAT.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":"2c245fdc430b02e4"}},{"code_sha256_prefix":"55ee94b26d520b2d","entry":"VisionTransformer","repo":"wpy1999/SAT","repo_kind":"official","path":"Model/SAT.py","file_url":"https://github.com/wpy1999/SAT/blob/HEAD/Model/SAT.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":"55ee94b26d520b2d"}},{"code_sha256_prefix":"04580c1dfada9050","entry":"get_kernel","repo":"wpy1999/SAT","repo_kind":"official","path":"Model/SAT.py","file_url":"https://github.com/wpy1999/SAT/blob/HEAD/Model/SAT.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"04580c1dfada9050"}},{"code_sha256_prefix":"4b8276e605356850","entry":"SAT","repo":"wpy1999/SAT","repo_kind":"official","path":"Model/SAT.py","file_url":"https://github.com/wpy1999/SAT/blob/HEAD/Model/SAT.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":"4b8276e605356850"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}