{"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/learning-what-not-to-segment-a-new","title":"Learning What Not to Segment: A New Perspective on Few-Shot Segmentation","arxiv_id":"2203.07615","date":"2022-03-15","proceeding":"CVPR 2022 1","authors":["Chunbo Lang","Gong Cheng","Binfei Tu","Junwei Han"],"abstract":"Recently few-shot segmentation (FSS) has been extensively developed. Most previous works strive to achieve generalization through the meta-learning framework derived from classification tasks; however, the trained models are biased towards the seen classes instead of being ideally class-agnostic, thus hindering the recognition of new concepts. This paper proposes a fresh and straightforward insight to alleviate the problem. Specifically, we apply an additional branch (base learner) to the conventional FSS model (meta learner) to explicitly identify the targets of base classes, i.e., the regions that do not need to be segmented. Then, the coarse results output by these two learners in parallel are adaptively integrated to yield precise segmentation prediction. Considering the sensitivity of meta learner, we further introduce an adjustment factor to estimate the scene differences between the input image pairs for facilitating the model ensemble forecasting. The substantial performance gains on PASCAL-5i and COCO-20i verify the effectiveness, and surprisingly, our versatile scheme sets a new state-of-the-art even with two plain learners. Moreover, in light of the unique nature of the proposed approach, we also extend it to a more realistic but challenging setting, i.e., generalized FSS, where the pixels of both base and novel classes are required to be determined. The source code is available at github.com/chunbolang/BAM.","url_abs":"https://arxiv.org/abs/2203.07615v2","url_pdf":"https://arxiv.org/pdf/2203.07615v2.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":"learning-what-not-to-segment-a-new","repo_url":"https://github.com/chunbolang/BAM","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"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":"auxiliary-classifier","method_name":"Auxiliary Classifier"},{"method_slug":"average-pooling","method_name":"Average Pooling"},{"method_slug":"base","method_name":"BASE"},{"method_slug":"batch-normalization","method_name":"Batch Normalization"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"dilated-convolution","method_name":"Dilated Convolution"},{"method_slug":"pspnet","method_name":"PSPNet"},{"method_slug":"pyramid-pooling-module","method_name":"Pyramid Pooling Module"},{"method_slug":"relu","method_name":"ReLU"}],"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":"BAM (ResNet-50)","rank_in_archive_order":29,"of":85,"metrics":{"Mean IoU":"46.23","learnable parameters (million)":"26.7"},"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":"BAM (ResNet-50)","rank_in_archive_order":31,"of":81,"metrics":{"Mean IoU":"51.16","learnable parameters (million)":"26.7"},"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":"BAM (ResNet-50)","rank_in_archive_order":22,"of":105,"metrics":{"Mean IoU":"67.81"},"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":"BAM (ResNet-50)","rank_in_archive_order":31,"of":96,"metrics":{"Mean IoU":"70.91"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2203.07615","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2203.07615"}},"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/chunbolang/BAM","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":4,"ran":9,"ran_fixture":1,"unverified":3},"by_repo_kind":{"official":{"samples":17,"ran":14,"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":"df77cb77dfe58d6d","entry":"Weighted_GAP","repo":"chunbolang/BAM","repo_kind":"official","path":"model/BAM.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/BAM.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"df77cb77dfe58d6d"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"chunbolang/BAM","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/resnet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"0086d054a8b3d6f3","entry":"find_bbox","repo":"chunbolang/BAM","repo_kind":"official","path":"util/get_weak_anns.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/util/get_weak_anns.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0086d054a8b3d6f3"}},{"code_sha256_prefix":"7feaf1fceef927fe","entry":"get_gram_matrix","repo":"chunbolang/BAM","repo_kind":"official","path":"model/BAM.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/BAM.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7feaf1fceef927fe"}},{"code_sha256_prefix":"ad7ba6c4e516607e","entry":"get_vgg16_layer","repo":"chunbolang/BAM","repo_kind":"official","path":"model/PSPNet.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/PSPNet.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ad7ba6c4e516607e"}},{"code_sha256_prefix":"0684a938c70bf564","entry":"is_image_file","repo":"chunbolang/BAM","repo_kind":"official","path":"util/dataset.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/util/dataset.py","link_basis":"harvester_set","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":"0684a938c70bf564"}},{"code_sha256_prefix":"8f6dc933d4638855","entry":"make_dataset","repo":"chunbolang/BAM","repo_kind":"official","path":"util/dataset.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/util/dataset.py","link_basis":"harvester_set","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":"8f6dc933d4638855"}},{"code_sha256_prefix":"e31250b969b51841","entry":"make_layers","repo":"chunbolang/BAM","repo_kind":"official","path":"model/vgg.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/vgg.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e31250b969b51841"}},{"code_sha256_prefix":"32a3d5463ef45125","entry":"merge_cfg_from_args","repo":"chunbolang/BAM","repo_kind":"official","path":"util/config.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/util/config.py","link_basis":"harvester_set","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":"32a3d5463ef45125"}},{"code_sha256_prefix":"40a78e38251055c6","entry":"resnet18","repo":"chunbolang/BAM","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/resnet.py","link_basis":"harvester_set","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":"40a78e38251055c6"}},{"code_sha256_prefix":"4f6dd0ac332dd50d","entry":"resnet34","repo":"chunbolang/BAM","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/resnet.py","link_basis":"harvester_set","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":"4f6dd0ac332dd50d"}},{"code_sha256_prefix":"ac2dc4c99bd03a34","entry":"transform_anns","repo":"chunbolang/BAM","repo_kind":"official","path":"util/get_weak_anns.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/util/get_weak_anns.py","link_basis":"harvester_set","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":"ac2dc4c99bd03a34"}},{"code_sha256_prefix":"2067e75510fbe85e","entry":"vgg11","repo":"chunbolang/BAM","repo_kind":"official","path":"model/vgg.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/vgg.py","link_basis":"harvester_set","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":"2067e75510fbe85e"}},{"code_sha256_prefix":"bf96fb236a6b1683","entry":"vgg11_bn","repo":"chunbolang/BAM","repo_kind":"official","path":"model/vgg.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/model/vgg.py","link_basis":"harvester_set","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":"bf96fb236a6b1683"}},{"code_sha256_prefix":"277a13798d6d6981","entry":"load_cfg_from_cfg_file","repo":"chunbolang/BAM","repo_kind":"official","path":"util/config.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/util/config.py","link_basis":"harvester_set","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":"277a13798d6d6981"}},{"code_sha256_prefix":"6bf9093839138e39","entry":"make_GFSS_dataset","repo":"chunbolang/BAM","repo_kind":"official","path":"util/dataset.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/util/dataset.py","link_basis":"harvester_set","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":"6bf9093839138e39"}},{"code_sha256_prefix":"b925dc5fd8492c34","entry":"merge_cfg_from_list","repo":"chunbolang/BAM","repo_kind":"official","path":"util/config.py","file_url":"https://github.com/chunbolang/BAM/blob/HEAD/util/config.py","link_basis":"harvester_set","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":"b925dc5fd8492c34"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}