{"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/iterative-patch-selection-for-high-resolution","title":"Iterative Patch Selection for High-Resolution Image Recognition","arxiv_id":"2210.13007","date":"2022-10-24","proceeding":null,"authors":["Benjamin Bergner","Christoph Lippert","Aravindh Mahendran"],"abstract":"High-resolution images are prevalent in various applications, such as autonomous driving and computer-aided diagnosis. However, training neural networks on such images is computationally challenging and easily leads to out-of-memory errors even on modern GPUs. We propose a simple method, Iterative Patch Selection (IPS), which decouples the memory usage from the input size and thus enables the processing of arbitrarily large images under tight hardware constraints. IPS achieves this by selecting only the most salient patches, which are then aggregated into a global representation for image recognition. For both patch selection and aggregation, a cross-attention based transformer is introduced, which exhibits a close connection to Multiple Instance Learning. Our method demonstrates strong performance and has wide applicability across different domains, training regimes and image sizes while using minimal accelerator memory. For example, we are able to finetune our model on whole-slide images consisting of up to 250k patches (>16 gigapixels) with only 5 GB of GPU VRAM at a batch size of 16.","url_abs":"https://arxiv.org/abs/2210.13007v2","url_pdf":"https://arxiv.org/pdf/2210.13007v2.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":"iterative-patch-selection-for-high-resolution","repo_url":"https://github.com/benbergner/ips","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"autonomous-driving","task_name":"Autonomous Driving"},{"task_slug":null,"task_name":"GPU"},{"task_slug":"multiple-instance-learning","task_name":"Multiple Instance Learning"},{"task_slug":"high","task_name":"Vocal Bursts Intensity Prediction"},{"task_slug":"whole-slide-images","task_name":"whole slide images"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.13007","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.13007"}},"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/benbergner/ips","reach":null}],"summary":{"ran":4,"ran_honours":1,"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":8,"ran":7,"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":"ea479c6b9b9d5d1b","entry":"MLP","repo":"benbergner/ips","repo_kind":"official","path":"architecture/ips_net.py","file_url":"https://github.com/benbergner/ips/blob/HEAD/architecture/ips_net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ea479c6b9b9d5d1b"}},{"code_sha256_prefix":"74bf881d9bd86aab","entry":"MultiHeadCrossAttention","repo":"benbergner/ips","repo_kind":"official","path":"architecture/ips_net.py","file_url":"https://github.com/benbergner/ips/blob/HEAD/architecture/ips_net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"74bf881d9bd86aab"}},{"code_sha256_prefix":"f3ca5c3c67854b20","entry":"ScaledDotProductAttention","repo":"benbergner/ips","repo_kind":"official","path":"architecture/ips_net.py","file_url":"https://github.com/benbergner/ips/blob/HEAD/architecture/ips_net.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f3ca5c3c67854b20"}},{"code_sha256_prefix":"411150cc04a35028","entry":"Transformer","repo":"benbergner/ips","repo_kind":"official","path":"architecture/ips_net.py","file_url":"https://github.com/benbergner/ips/blob/HEAD/architecture/ips_net.py","link_basis":"first_harvest_node","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":"411150cc04a35028"}},{"code_sha256_prefix":"2502784dd777356d","entry":"pos_enc_1d","repo":"benbergner/ips","repo_kind":"official","path":"architecture/ips_net.py","file_url":"https://github.com/benbergner/ips/blob/HEAD/architecture/ips_net.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2502784dd777356d"}},{"code_sha256_prefix":"a72df7fe07ffcb6d","entry":"shuffle_batch","repo":"benbergner/ips","repo_kind":"official","path":"architecture/ips_net.py","file_url":"https://github.com/benbergner/ips/blob/HEAD/architecture/ips_net.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a72df7fe07ffcb6d"}},{"code_sha256_prefix":"55be9b23953dab42","entry":"shuffle_instance","repo":"benbergner/ips","repo_kind":"official","path":"architecture/ips_net.py","file_url":"https://github.com/benbergner/ips/blob/HEAD/architecture/ips_net.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"55be9b23953dab42"}},{"code_sha256_prefix":"ba22485016ddd284","entry":"IPSNet","repo":"benbergner/ips","repo_kind":"official","path":"architecture/ips_net.py","file_url":"https://github.com/benbergner/ips/blob/HEAD/architecture/ips_net.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":"ba22485016ddd284"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}