{"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/self-calibrated-cross-attention-network-for","title":"Self-Calibrated Cross Attention Network for Few-Shot Segmentation","arxiv_id":"2308.09294","date":"2023-08-18","proceeding":"ICCV 2023 1","authors":["Qianxiong Xu","Wenting Zhao","Guosheng Lin","Cheng Long"],"abstract":"The key to the success of few-shot segmentation (FSS) lies in how to effectively utilize support samples. Most solutions compress support foreground (FG) features into prototypes, but lose some spatial details. Instead, others use cross attention to fuse query features with uncompressed support FG. Query FG could be fused with support FG, however, query background (BG) cannot find matched BG features in support FG, yet inevitably integrates dissimilar features. Besides, as both query FG and BG are combined with support FG, they get entangled, thereby leading to ineffective segmentation. To cope with these issues, we design a self-calibrated cross attention (SCCA) block. For efficient patch-based attention, query and support features are firstly split into patches. Then, we design a patch alignment module to align each query patch with its most similar support patch for better cross attention. Specifically, SCCA takes a query patch as Q, and groups the patches from the same query image and the aligned patches from the support image as K&V. In this way, the query BG features are fused with matched BG features (from query patches), and thus the aforementioned issues will be mitigated. Moreover, when calculating SCCA, we design a scaled-cosine mechanism to better utilize the support features for similarity calculation. Extensive experiments conducted on PASCAL-5^i and COCO-20^i demonstrate the superiority of our model, e.g., the mIoU score under 5-shot setting on COCO-20^i is 5.6%+ better than previous state-of-the-arts. The code is available at https://github.com/Sam1224/SCCAN.","url_abs":"https://arxiv.org/abs/2308.09294v1","url_pdf":"https://arxiv.org/pdf/2308.09294v1.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":"self-calibrated-cross-attention-network-for","repo_url":"https://github.com/sam1224/sccan","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"few-shot-image-segmentation","task_name":"Few-Shot Semantic Segmentation"}],"methods":[{"method_slug":"align","method_name":"ALIGN"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/few-shot-semantic-segmentation-on-coco-20i-1","task":"Few-Shot Semantic Segmentation","dataset":"COCO-20i (1-shot)","model":"SCCAN (ResNet-101)","rank_in_archive_order":16,"of":85,"metrics":{"FB-IoU":"69.7","Mean IoU":"48.2"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-coco-20i-1","task":"Few-Shot Semantic Segmentation","dataset":"COCO-20i (1-shot)","model":"SCCAN (ResNet-50)","rank_in_archive_order":28,"of":85,"metrics":{"FB-IoU":"69.9","Mean IoU":"46.3"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-coco-20i-5","task":"Few-Shot Semantic Segmentation","dataset":"COCO-20i (5-shot)","model":"SCCAN (ResNet-101)","rank_in_archive_order":12,"of":81,"metrics":{"FB-IoU":"74.8","Mean IoU":"57"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-coco-20i-5","task":"Few-Shot Semantic Segmentation","dataset":"COCO-20i (5-shot)","model":"SCCAN (ResNet-50)","rank_in_archive_order":21,"of":81,"metrics":{"FB-IoU":"74.2","Mean IoU":"53.9"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-pascal-5i-1","task":"Few-Shot Semantic Segmentation","dataset":"PASCAL-5i (1-Shot)","model":"SCCAN (ResNet-101)","rank_in_archive_order":19,"of":105,"metrics":{"FB-IoU":"78.5","Mean IoU":"68.3"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-pascal-5i-1","task":"Few-Shot Semantic Segmentation","dataset":"PASCAL-5i (1-Shot)","model":"SCCAN (ResNet-50)","rank_in_archive_order":34,"of":105,"metrics":{"FB-IoU":"77.7","Mean IoU":"66.8"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-pascal-5i-5","task":"Few-Shot Semantic Segmentation","dataset":"PASCAL-5i (5-Shot)","model":"SCCAN (ResNet-101)","rank_in_archive_order":26,"of":96,"metrics":{"FB-IoU":"82.1","Mean IoU":"71.5"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-pascal-5i-5","task":"Few-Shot Semantic Segmentation","dataset":"PASCAL-5i (5-Shot)","model":"SCCAN (ResNet-50)","rank_in_archive_order":39,"of":96,"metrics":{"FB-IoU":"81.8","Mean IoU":"70.3"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.09294","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.09294"}},"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/sam1224/sccan","reach":null}],"summary":{"ran":2,"unverified":2},"by_repo_kind":{"official":{"samples":4,"ran":2,"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":4,"samples":[{"code_sha256_prefix":"01ddee9925716a64","entry":"CrossWindowAttention","repo":"sam1224/sccan","repo_kind":"official","path":"model/swin_sccan.py","file_url":"https://github.com/sam1224/sccan/blob/HEAD/model/swin_sccan.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"01ddee9925716a64"}},{"code_sha256_prefix":"32af4157ddd44139","entry":"SwinTransformerBlock","repo":"sam1224/sccan","repo_kind":"official","path":"model/swin_sccan.py","file_url":"https://github.com/sam1224/sccan/blob/HEAD/model/swin_sccan.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"32af4157ddd44139"}},{"code_sha256_prefix":"21b5895b402e5a85","entry":"BasicLayer","repo":"sam1224/sccan","repo_kind":"official","path":"model/swin_sccan.py","file_url":"https://github.com/sam1224/sccan/blob/HEAD/model/swin_sccan.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"21b5895b402e5a85"}},{"code_sha256_prefix":"7e47562cadfb5be9","entry":"SwinTransformer","repo":"sam1224/sccan","repo_kind":"official","path":"model/swin_sccan.py","file_url":"https://github.com/sam1224/sccan/blob/HEAD/model/swin_sccan.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NOASSERTION","inline_ok":false,"mcp_get_code":{"code_sha256":"7e47562cadfb5be9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}