{"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/glance-and-focus-a-dynamic-approach-to","title":"Glance and Focus: a Dynamic Approach to Reducing Spatial Redundancy in Image Classification","arxiv_id":"2010.05300","date":"2020-10-11","proceeding":"NeurIPS 2020 12","authors":["Yulin Wang","Kangchen Lv","Rui Huang","Shiji Song","Le Yang","Gao Huang"],"abstract":"The accuracy of deep convolutional neural networks (CNNs) generally improves when fueled with high resolution images. However, this often comes at a high computational cost and high memory footprint. Inspired by the fact that not all regions in an image are task-relevant, we propose a novel framework that performs efficient image classification by processing a sequence of relatively small inputs, which are strategically selected from the original image with reinforcement learning. Such a dynamic decision process naturally facilitates adaptive inference at test time, i.e., it can be terminated once the model is sufficiently confident about its prediction and thus avoids further redundant computation. Notably, our framework is general and flexible as it is compatible with most of the state-of-the-art light-weighted CNNs (such as MobileNets, EfficientNets and RegNets), which can be conveniently deployed as the backbone feature extractor. Experiments on ImageNet show that our method consistently improves the computational efficiency of a wide variety of deep models. For example, it further reduces the average latency of the highly efficient MobileNet-V3 on an iPhone XS Max by 20% without sacrificing accuracy. Code and pre-trained models are available at https://github.com/blackfeather-wang/GFNet-Pytorch.","url_abs":"https://arxiv.org/abs/2010.05300v1","url_pdf":"https://arxiv.org/pdf/2010.05300v1.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":"glance-and-focus-a-dynamic-approach-to","repo_url":"https://github.com/blackfeather-wang/GFNet-Pytorch","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"classification","task_name":"General Classification"},{"task_slug":"image-classification","task_name":"Image Classification"},{"task_slug":"image-classification","task_name":"image-classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2010.05300","atlas_url":"https://app.syntology.ai/?focus=2010.05300","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2010.05300"}},"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":"deterministic:regex_extraction","url":"https://github.com/blackfeather-wang/GFNet-Pytorch","reach":null}],"summary":{"ran":1,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":4,"ran":3,"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":"ff16fd088aa240e7","entry":"ActorCritic","repo":"blackfeather-wang/GFNet-Pytorch","repo_kind":"official","path":"network.py","file_url":"https://github.com/blackfeather-wang/GFNet-Pytorch/blob/HEAD/network.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":"ff16fd088aa240e7"}},{"code_sha256_prefix":"8f49cc1ffec8b4b7","entry":"dynamic_evaluate","repo":"blackfeather-wang/gfnet-pytorch","repo_kind":"official","path":"inference.py","file_url":"https://github.com/blackfeather-wang/gfnet-pytorch/blob/HEAD/inference.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8f49cc1ffec8b4b7"}},{"code_sha256_prefix":"972a0b6e71a3501c","entry":"dynamic_find_threshold","repo":"blackfeather-wang/gfnet-pytorch","repo_kind":"official","path":"inference.py","file_url":"https://github.com/blackfeather-wang/gfnet-pytorch/blob/HEAD/inference.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"972a0b6e71a3501c"}},{"code_sha256_prefix":"25108bfdfc0ed9cd","entry":"generate_logits","repo":"blackfeather-wang/gfnet-pytorch","repo_kind":"official","path":"inference.py","file_url":"https://github.com/blackfeather-wang/gfnet-pytorch/blob/HEAD/inference.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"25108bfdfc0ed9cd"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}