{"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/context-guided-spatial-feature-reconstruction","title":"Context-Guided Spatial Feature Reconstruction for Efficient Semantic Segmentation","arxiv_id":"2405.06228","date":"2024-05-10","proceeding":null,"authors":["ZhenLiang Ni","Xinghao Chen","Yingjie Zhai","Yehui Tang","Yunhe Wang"],"abstract":"Semantic segmentation is an important task for numerous applications but it is still quite challenging to achieve advanced performance with limited computational costs. In this paper, we present CGRSeg, an efficient yet competitive segmentation framework based on context-guided spatial feature reconstruction. A Rectangular Self-Calibration Module is carefully designed for spatial feature reconstruction and pyramid context extraction. It captures the axial global context in both horizontal and vertical directions to explicitly model rectangular key areas. A shape self-calibration function is designed to make the key areas closer to foreground objects. Besides, a lightweight Dynamic Prototype Guided head is proposed to improve the classification of foreground objects by explicit class embedding. Our CGRSeg is extensively evaluated on ADE20K, COCO-Stuff, and Pascal Context benchmarks, and achieves state-of-the-art semantic performance. Specifically, it achieves $43.6\\%$ mIoU on ADE20K with only $4.0$ GFLOPs, which is $0.9\\%$ and $2.5\\%$ mIoU better than SeaFormer and SegNeXt but with about $38.0\\%$ fewer GFLOPs. Code is available at https://github.com/nizhenliang/CGRSeg.","url_abs":"https://arxiv.org/abs/2405.06228v2","url_pdf":"https://arxiv.org/pdf/2405.06228v2.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":"context-guided-spatial-feature-reconstruction","repo_url":"https://github.com/nizhenliang/cgrseg","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.06228","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.06228"}},"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/nizhenliang/cgrseg","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":4,"unverified":1},"by_repo_kind":{"official":{"samples":5,"ran":4,"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":"a669df2cd07c07bb","entry":"calculate_file_sha256","repo":"nizhenliang/cgrseg","repo_kind":"official","path":".dev/gather_models.py","file_url":"https://github.com/nizhenliang/cgrseg/blob/HEAD/.dev/gather_models.py","link_basis":"harvester_set","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":"a669df2cd07c07bb"}},{"code_sha256_prefix":"88d68650d669bb11","entry":"get_final_iter","repo":"nizhenliang/cgrseg","repo_kind":"official","path":".dev/gather_models.py","file_url":"https://github.com/nizhenliang/cgrseg/blob/HEAD/.dev/gather_models.py","link_basis":"harvester_set","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":"88d68650d669bb11"}},{"code_sha256_prefix":"aa74cd62302ed7c8","entry":"process_checkpoint","repo":"nizhenliang/cgrseg","repo_kind":"official","path":".dev/gather_models.py","file_url":"https://github.com/nizhenliang/cgrseg/blob/HEAD/.dev/gather_models.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":"aa74cd62302ed7c8"}},{"code_sha256_prefix":"39403bf2697d1720","entry":"process_model_info","repo":"nizhenliang/cgrseg","repo_kind":"official","path":".dev/generate_benchmark_evaluation_script.py","file_url":"https://github.com/nizhenliang/cgrseg/blob/HEAD/.dev/generate_benchmark_evaluation_script.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":"39403bf2697d1720"}},{"code_sha256_prefix":"dbbc38f85ae9361f","entry":"check_url","repo":"nizhenliang/cgrseg","repo_kind":"official","path":".dev/check_urls.py","file_url":"https://github.com/nizhenliang/cgrseg/blob/HEAD/.dev/check_urls.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":true,"mcp_get_code":{"code_sha256":"dbbc38f85ae9361f"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}