{"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/intermediate-prototype-mining-transformer-for","title":"Intermediate Prototype Mining Transformer for Few-Shot Semantic Segmentation","arxiv_id":"2210.06780","date":"2022-10-13","proceeding":null,"authors":["Yuanwei Liu","Nian Liu","Xiwen Yao","Junwei Han"],"abstract":"Few-shot semantic segmentation aims to segment the target objects in query under the condition of a few annotated support images. Most previous works strive to mine more effective category information from the support to match with the corresponding objects in query. However, they all ignored the category information gap between query and support images. If the objects in them show large intra-class diversity, forcibly migrating the category information from the support to the query is ineffective. To solve this problem, we are the first to introduce an intermediate prototype for mining both deterministic category information from the support and adaptive category knowledge from the query. Specifically, we design an Intermediate Prototype Mining Transformer (IPMT) to learn the prototype in an iterative way. In each IPMT layer, we propagate the object information in both support and query features to the prototype and then use it to activate the query feature map. By conducting this process iteratively, both the intermediate prototype and the query feature can be progressively improved. At last, the final query feature is used to yield precise segmentation prediction. Extensive experiments on both PASCAL-5i and COCO-20i datasets clearly verify the effectiveness of our IPMT and show that it outperforms previous state-of-the-art methods by a large margin. Code is available at https://github.com/LIUYUANWEI98/IPMT","url_abs":"https://arxiv.org/abs/2210.06780v1","url_pdf":"https://arxiv.org/pdf/2210.06780v1.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":"intermediate-prototype-mining-transformer-for","repo_url":"https://github.com/liuyuanwei98/ipmt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"few-shot-image-segmentation","task_name":"Few-Shot Semantic Segmentation"},{"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":"IPMT (ResNet-50)","rank_in_archive_order":47,"of":85,"metrics":{"Mean IoU":"43"},"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":"IPMT (ResNet-101)","rank_in_archive_order":48,"of":85,"metrics":{"Mean IoU":"42.6"},"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":"IPMT (ResNet-101)","rank_in_archive_order":53,"of":81,"metrics":{"Mean IoU":"47.9"},"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":"IPMT (ResNet-50)","rank_in_archive_order":55,"of":81,"metrics":{"Mean IoU":"47.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":"IPMT (ResNet-50)","rank_in_archive_order":35,"of":105,"metrics":{"FB-IoU":"77.1","Mean IoU":"66.8"},"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":"IPMT (ResNet-101)","rank_in_archive_order":41,"of":105,"metrics":{"FB-IoU":"78.5","Mean IoU":"66.1"},"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":"IPMT (ResNet-101)","rank_in_archive_order":51,"of":96,"metrics":{"FB-IoU":"80.3","Mean IoU":"69.2"},"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":"IPMT (ResNet-50)","rank_in_archive_order":58,"of":96,"metrics":{"FB-IoU":"81.4","Mean IoU":"68.2"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.06780","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.06780"}},"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/LIUYUANWEI98/IPMT","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/liuyuanwei98/ipmt","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":3,"ran":3,"unverified":7},"by_repo_kind":{"official":{"samples":13,"ran":6,"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":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"model/IPMTnetwork.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/blob/HEAD/model/IPMTnetwork.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":"1dad93b61e98c32e","entry":"colorize","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"util/util.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/blob/HEAD/util/util.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":"1dad93b61e98c32e"}},{"code_sha256_prefix":"2a80220dabcb742a","entry":"conv1x1","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/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":"2a80220dabcb742a"}},{"code_sha256_prefix":"600ff2c45e0de056","entry":"conv3x3","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/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":"600ff2c45e0de056"}},{"code_sha256_prefix":"2a66f4ab6863908c","entry":"intersectionAndUnion","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"util/util.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/blob/HEAD/util/util.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":"2a66f4ab6863908c"}},{"code_sha256_prefix":"0684a938c70bf564","entry":"is_image_file","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"util/dataset.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/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":"136834d66336e6b9","entry":"intersectionAndUnionGPU","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"util/util.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/blob/HEAD/util/util.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":"136834d66336e6b9"}},{"code_sha256_prefix":"277a13798d6d6981","entry":"load_cfg_from_cfg_file","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"util/config.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/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":"cbfcdd76ffcf2a11","entry":"make_dataset","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"util/dataset.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/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":"cbfcdd76ffcf2a11"}},{"code_sha256_prefix":"643408ce821a11cf","entry":"make_dataset","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"util/dataset_coco.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/blob/HEAD/util/dataset_coco.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":"643408ce821a11cf"}},{"code_sha256_prefix":"b925dc5fd8492c34","entry":"merge_cfg_from_list","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"util/config.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/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"}},{"code_sha256_prefix":"dc824689b4f991cf","entry":"resnet18","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/blob/HEAD/model/resnet.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":"dc824689b4f991cf"}},{"code_sha256_prefix":"4708c105ce1b6276","entry":"weighted_dice_loss","repo":"LIUYUANWEI98/IPMT","repo_kind":"official","path":"model/loss.py","file_url":"https://github.com/LIUYUANWEI98/IPMT/blob/HEAD/model/loss.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":"4708c105ce1b6276"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}