{"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/focus-on-query-adversarial-mining-transformer-1","title":"Focus on Query: Adversarial Mining Transformer for Few-Shot Segmentation","arxiv_id":"2311.17626","date":"2023-11-29","proceeding":"NeurIPS 2023 11","authors":["YuAn Wang","Naisong Luo","Tianzhu Zhang"],"abstract":"Few-shot segmentation (FSS) aims to segment objects of new categories given only a handful of annotated samples. Previous works focus their efforts on exploring the support information while paying less attention to the mining of the critical query branch. In this paper, we rethink the importance of support information and propose a new query-centric FSS model Adversarial Mining Transformer (AMFormer), which achieves accurate query image segmentation with only rough support guidance or even weak support labels. The proposed AMFormer enjoys several merits. First, we design an object mining transformer (G) that can achieve the expansion of incomplete region activated by support clue, and a detail mining transformer (D) to discriminate the detailed local difference between the expanded mask and the ground truth. Second, we propose to train G and D via an adversarial process, where G is optimized to generate more accurate masks approaching ground truth to fool D. We conduct extensive experiments on commonly used Pascal-5i and COCO-20i benchmarks and achieve state-of-the-art results across all settings. In addition, the decent performance with weak support labels in our query-centric paradigm may inspire the development of more general FSS models. Code will be available at https://github.com/Wyxdm/AMNet.","url_abs":"https://arxiv.org/abs/2311.17626v1","url_pdf":"https://arxiv.org/pdf/2311.17626v1.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":"focus-on-query-adversarial-mining-transformer-1","repo_url":"https://github.com/wyxdm/amnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-segmentation","task_name":"Image 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":"focus","method_name":"Focus"},{"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":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2311.17626","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2311.17626"}},"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/Wyxdm/AMNet","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wyxdm/amnet","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":4,"ran":7,"ran_fixture":1,"unverified":2},"by_repo_kind":{"official":{"samples":14,"ran":12,"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":14,"samples":[{"code_sha256_prefix":"df77cb77dfe58d6d","entry":"Weighted_GAP","repo":"Wyxdm/AMNet","repo_kind":"official","path":"model/AMFormer.py","file_url":"https://github.com/Wyxdm/AMNet/blob/HEAD/model/AMFormer.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"df77cb77dfe58d6d"}},{"code_sha256_prefix":"fac5364e2f53c6db","entry":"conv3x3","repo":"Wyxdm/AMNet","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"fac5364e2f53c6db"}},{"code_sha256_prefix":"0086d054a8b3d6f3","entry":"find_bbox","repo":"Wyxdm/AMNet","repo_kind":"official","path":"util/get_weak_anns.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0086d054a8b3d6f3"}},{"code_sha256_prefix":"7feaf1fceef927fe","entry":"get_gram_matrix","repo":"wyxdm/amnet","repo_kind":"official","path":"model/AMFormer.py","file_url":"https://github.com/wyxdm/amnet/blob/HEAD/model/AMFormer.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7feaf1fceef927fe"}},{"code_sha256_prefix":"878c68bef4a644c0","entry":"get_similarity","repo":"wyxdm/amnet","repo_kind":"official","path":"model/AMFormer.py","file_url":"https://github.com/wyxdm/amnet/blob/HEAD/model/AMFormer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"878c68bef4a644c0"}},{"code_sha256_prefix":"ad7ba6c4e516607e","entry":"get_vgg16_layer","repo":"Wyxdm/AMNet","repo_kind":"official","path":"model/PSPNet.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ad7ba6c4e516607e"}},{"code_sha256_prefix":"0684a938c70bf564","entry":"is_image_file","repo":"Wyxdm/AMNet","repo_kind":"official","path":"util/dataset.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0684a938c70bf564"}},{"code_sha256_prefix":"8f6dc933d4638855","entry":"make_dataset","repo":"Wyxdm/AMNet","repo_kind":"official","path":"util/dataset.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8f6dc933d4638855"}},{"code_sha256_prefix":"32a3d5463ef45125","entry":"merge_cfg_from_args","repo":"Wyxdm/AMNet","repo_kind":"official","path":"util/config.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"32a3d5463ef45125"}},{"code_sha256_prefix":"40a78e38251055c6","entry":"resnet18","repo":"Wyxdm/AMNet","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"40a78e38251055c6"}},{"code_sha256_prefix":"4f6dd0ac332dd50d","entry":"resnet34","repo":"Wyxdm/AMNet","repo_kind":"official","path":"model/resnet.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4f6dd0ac332dd50d"}},{"code_sha256_prefix":"ac2dc4c99bd03a34","entry":"transform_anns","repo":"Wyxdm/AMNet","repo_kind":"official","path":"util/get_weak_anns.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ac2dc4c99bd03a34"}},{"code_sha256_prefix":"277a13798d6d6981","entry":"load_cfg_from_cfg_file","repo":"Wyxdm/AMNet","repo_kind":"official","path":"util/config.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"277a13798d6d6981"}},{"code_sha256_prefix":"b925dc5fd8492c34","entry":"merge_cfg_from_list","repo":"Wyxdm/AMNet","repo_kind":"official","path":"util/config.py","file_url":"https://github.com/Wyxdm/AMNet/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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b925dc5fd8492c34"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}