{"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/shatter-and-gather-learning-referring-image","title":"Shatter and Gather: Learning Referring Image Segmentation with Text Supervision","arxiv_id":"2308.15512","date":"2023-08-29","proceeding":"ICCV 2023 1","authors":["Dongwon Kim","Namyup Kim","Cuiling Lan","Suha Kwak"],"abstract":"Referring image segmentation, the task of segmenting any arbitrary entities described in free-form texts, opens up a variety of vision applications. However, manual labeling of training data for this task is prohibitively costly, leading to lack of labeled data for training. We address this issue by a weakly supervised learning approach using text descriptions of training images as the only source of supervision. To this end, we first present a new model that discovers semantic entities in input image and then combines such entities relevant to text query to predict the mask of the referent. We also present a new loss function that allows the model to be trained without any further supervision. Our method was evaluated on four public benchmarks for referring image segmentation, where it clearly outperformed the existing method for the same task and recent open-vocabulary segmentation models on all the benchmarks.","url_abs":"https://arxiv.org/abs/2308.15512v2","url_pdf":"https://arxiv.org/pdf/2308.15512v2.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":"shatter-and-gather-learning-referring-image","repo_url":"https://github.com/kdwonn/SaG","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-segmentation","task_name":"Image Segmentation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"weakly-supervised-learning","task_name":"Weakly-supervised Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2308.15512","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2308.15512"}},"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/kdwonn/SaG","reach":null}],"summary":{"ran":14,"ran_draft_wrong":4,"ran_fixture":1,"unverified":10},"by_repo_kind":{"official":{"samples":29,"ran":19,"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":29,"samples":[{"code_sha256_prefix":"12ea3b3517a96270","entry":"Attention","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"12ea3b3517a96270"}},{"code_sha256_prefix":"028855901fa28457","entry":"EncoderTextBERT","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"028855901fa28457"}},{"code_sha256_prefix":"b0e334ed471fe829","entry":"FeedForward","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"b0e334ed471fe829"}},{"code_sha256_prefix":"22d4e66449e24cb5","entry":"GEGLU","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"22d4e66449e24cb5"}},{"code_sha256_prefix":"694dbf618fcc8bc9","entry":"MLP","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"694dbf618fcc8bc9"}},{"code_sha256_prefix":"f0d8b6422efbc32b","entry":"PatchEmbedding","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"f0d8b6422efbc32b"}},{"code_sha256_prefix":"4540da9676418320","entry":"PositionEmbeddingLearned1D","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"4540da9676418320"}},{"code_sha256_prefix":"569b6ec13ba1bb7c","entry":"PositionEmbeddingLearned2D","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"569b6ec13ba1bb7c"}},{"code_sha256_prefix":"49e02a36dbacc263","entry":"PositionEmbeddingSine1D","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"49e02a36dbacc263"}},{"code_sha256_prefix":"3eee2d3bcb861ce4","entry":"PositionEmbeddingSine2D","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"3eee2d3bcb861ce4"}},{"code_sha256_prefix":"903f3718322122c1","entry":"PostNorm","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"903f3718322122c1"}},{"code_sha256_prefix":"446aa6353ce96ed3","entry":"PreNorm","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"446aa6353ce96ed3"}},{"code_sha256_prefix":"3f805427fbcf3779","entry":"Queries","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"3f805427fbcf3779"}},{"code_sha256_prefix":"8bcf0086b949bf6d","entry":"ThinFeedForward","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"8bcf0086b949bf6d"}},{"code_sha256_prefix":"1508f01cf4f224d9","entry":"build_position_encoding","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1508f01cf4f224d9"}},{"code_sha256_prefix":"c8519676aac0e734","entry":"gumbel_softmax","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c8519676aac0e734"}},{"code_sha256_prefix":"f66bb5953d92d51a","entry":"hard_softmax","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f66bb5953d92d51a"}},{"code_sha256_prefix":"e4fe846ff705def5","entry":"l2norm","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e4fe846ff705def5"}},{"code_sha256_prefix":"cb5e2837a22f40a5","entry":"variable_len_pooling","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"cb5e2837a22f40a5"}},{"code_sha256_prefix":"c40d3f0b01f5ae8d","entry":"Aggregator","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"c40d3f0b01f5ae8d"}},{"code_sha256_prefix":"da0442761fe33eed","entry":"Block","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"da0442761fe33eed"}},{"code_sha256_prefix":"2dabab02658f440e","entry":"CrossModalAttention","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"2dabab02658f440e"}},{"code_sha256_prefix":"5be60a5fd6a2851d","entry":"EncoderImage","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"5be60a5fd6a2851d"}},{"code_sha256_prefix":"e5aacceaaae4495b","entry":"ImageTextEncoders","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"e5aacceaaae4495b"}},{"code_sha256_prefix":"96fccb2494df3e07","entry":"SetPredictionModule","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"96fccb2494df3e07"}},{"code_sha256_prefix":"096e6b33de7b678c","entry":"TransformerLayer","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"096e6b33de7b678c"}},{"code_sha256_prefix":"19f4e674b83797e4","entry":"VisionTransformer","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"19f4e674b83797e4"}},{"code_sha256_prefix":"5410c76c8cff05de","entry":"get_img_backbone","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"5410c76c8cff05de"}},{"code_sha256_prefix":"41a107753d1ebf36","entry":"init_weights","repo":"kdwonn/SaG","repo_kind":"official","path":"model/cross_modal_attention.py","file_url":"https://github.com/kdwonn/SaG/blob/HEAD/model/cross_modal_attention.py","link_basis":"first_harvest_node","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":"41a107753d1ebf36"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}