{"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/simpler-is-better-few-shot-semantic","title":"Simpler is Better: Few-shot Semantic Segmentation with Classifier Weight Transformer","arxiv_id":"2108.03032","date":"2021-08-06","proceeding":"ICCV 2021 10","authors":["Zhihe Lu","Sen He","Xiatian Zhu","Li Zhang","Yi-Zhe Song","Tao Xiang"],"abstract":"A few-shot semantic segmentation model is typically composed of a CNN encoder, a CNN decoder and a simple classifier (separating foreground and background pixels). Most existing methods meta-learn all three model components for fast adaptation to a new class. However, given that as few as a single support set image is available, effective model adaption of all three components to the new class is extremely challenging. In this work we propose to simplify the meta-learning task by focusing solely on the simplest component, the classifier, whilst leaving the encoder and decoder to pre-training. We hypothesize that if we pre-train an off-the-shelf segmentation model over a set of diverse training classes with sufficient annotations, the encoder and decoder can capture rich discriminative features applicable for any unseen classes, rendering the subsequent meta-learning stage unnecessary. For the classifier meta-learning, we introduce a Classifier Weight Transformer (CWT) designed to dynamically adapt the supportset trained classifier's weights to each query image in an inductive way. Extensive experiments on two standard benchmarks show that despite its simplicity, our method outperforms the state-of-the-art alternatives, often by a large margin.Code is available on https://github.com/zhiheLu/CWT-for-FSS.","url_abs":"https://arxiv.org/abs/2108.03032v3","url_pdf":"https://arxiv.org/pdf/2108.03032v3.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":"simpler-is-better-few-shot-semantic","repo_url":"https://github.com/zhiheLu/CWT-for-FSS","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"few-shot-image-segmentation","task_name":"Few-Shot Semantic Segmentation"},{"task_slug":"meta-learning","task_name":"Meta-Learning"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"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":"CWT (ResNet-50)","rank_in_archive_order":78,"of":85,"metrics":{"Mean IoU":"32.9"},"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":"CWT (ResNet-101)","rank_in_archive_order":80,"of":85,"metrics":{"Mean IoU":"32.4"},"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":"CWT (ResNet-101)","rank_in_archive_order":68,"of":81,"metrics":{"Mean IoU":"42"},"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":"CWT (ResNet-50)","rank_in_archive_order":72,"of":81,"metrics":{"Mean IoU":"41.3"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-coco-20i","task":"Few-Shot Semantic Segmentation","dataset":"COCO-20i -> Pascal VOC (1-shot)","model":"CWT (ResNet-50)","rank_in_archive_order":12,"of":13,"metrics":{"Mean IoU":"59.5"},"uses_additional_data":false},{"leaderboard":"/sota/few-shot-semantic-segmentation-on-coco-20i-2","task":"Few-Shot Semantic Segmentation","dataset":"COCO-20i -> Pascal VOC (5-shot)","model":"CWT (ResNet-50)","rank_in_archive_order":11,"of":12,"metrics":{"Mean IoU":"66.5"},"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":"CWT (ResNet-101)","rank_in_archive_order":91,"of":105,"metrics":{"Mean IoU":"58"},"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":"CWT (ResNet-50)","rank_in_archive_order":95,"of":105,"metrics":{"Mean IoU":"56.4"},"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":"CWT (ResNet-101)","rank_in_archive_order":74,"of":96,"metrics":{"Mean IoU":"64.7"},"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":"CWT (ResNet-50)","rank_in_archive_order":79,"of":96,"metrics":{"Mean IoU":"63.7"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2108.03032","atlas_url":"https://app.syntology.ai/?focus=2108.03032","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2108.03032"}},"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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/zhiheLu/CWT-for-FSS","reach":null},{"provenance":"deterministic:regex_extraction","url":"https://github.com/zhiheLu/CWTfor-FSS","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}}],"summary":{"ran":2},"by_repo_kind":{"official":{"samples":2,"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":2,"samples":[{"code_sha256_prefix":"47fb2d1c653fb575","entry":"MultiHeadAttentionOne","repo":"zhiheLu/CWT-for-FSS","repo_kind":"official","path":"src/model/transformer.py","file_url":"https://github.com/zhiheLu/CWT-for-FSS/blob/HEAD/src/model/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"47fb2d1c653fb575"}},{"code_sha256_prefix":"9c976ae8ada271c7","entry":"ScaledDotProductAttention","repo":"zhiheLu/CWT-for-FSS","repo_kind":"official","path":"src/model/transformer.py","file_url":"https://github.com/zhiheLu/CWT-for-FSS/blob/HEAD/src/model/transformer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"GPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"9c976ae8ada271c7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}