{"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/grounded-sam-assembling-open-world-models-for","title":"Grounded SAM: Assembling Open-World Models for Diverse Visual Tasks","arxiv_id":"2401.14159","date":"2024-01-25","proceeding":null,"authors":["Tianhe Ren","Shilong Liu","Ailing Zeng","Jing Lin","Kunchang Li","He Cao","Jiayu Chen","Xinyu Huang","Yukang Chen","Feng Yan","Zhaoyang Zeng","Hao Zhang","Feng Li","Jie Yang","Hongyang Li","Qing Jiang","Lei Zhang"],"abstract":"We introduce Grounded SAM, which uses Grounding DINO as an open-set object detector to combine with the segment anything model (SAM). This integration enables the detection and segmentation of any regions based on arbitrary text inputs and opens a door to connecting various vision models. As shown in Fig.1, a wide range of vision tasks can be achieved by using the versatile Grounded SAM pipeline. For example, an automatic annotation pipeline based solely on input images can be realized by incorporating models such as BLIP and Recognize Anything. Additionally, incorporating Stable-Diffusion allows for controllable image editing, while the integration of OSX facilitates promptable 3D human motion analysis. Grounded SAM also shows superior performance on open-vocabulary benchmarks, achieving 48.7 mean AP on SegInW (Segmentation in the wild) zero-shot benchmark with the combination of Grounding DINO-Base and SAM-Huge models.","url_abs":"https://arxiv.org/abs/2401.14159v1","url_pdf":"https://arxiv.org/pdf/2401.14159v1.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":"grounded-sam-assembling-open-world-models-for","repo_url":"https://github.com/IDEA-Research/Grounded-Segment-Anything","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"grounded-sam-assembling-open-world-models-for","repo_url":"https://github.com/haiv-lab/ospcoop_imagenet-bg","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"grounded-sam-assembling-open-world-models-for","repo_url":"https://github.com/idea-research/grounded-sam-2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"grounded-sam-assembling-open-world-models-for","repo_url":"https://github.com/idea-research/groundingdino","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"grounded-sam-assembling-open-world-models-for","repo_url":"https://github.com/syscv/sam-hq","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"segmentation","task_name":"Segmentation"}],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"blip","method_name":"BLIP"},{"method_slug":"dino","method_name":"DINO"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"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":"residual-connection","method_name":"Residual Connection"},{"method_slug":"sam","method_name":"SAM"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"vision-transformer","method_name":"Vision Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.14159","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.14159"}},"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/idea-research/groundingdino","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/IDEA-Research/Grounded-Segment-Anything","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/idea-research/grounded-sam-2","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/syscv/sam-hq","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/haiv-lab/ospcoop_imagenet-bg","reach":{"status":"ok"}}],"summary":{"ran_honours":1,"ran":8,"ran_draft_wrong":2,"ran_fixture":2,"unverified":2},"by_repo_kind":{"listed":{"samples":15,"ran":13,"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":"f31a58bf6457ced5","entry":"convert_to_xywh","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/datasets/cocogrounding_eval.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/datasets/cocogrounding_eval.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f31a58bf6457ced5"}},{"code_sha256_prefix":"5012a0e0d69e1a96","entry":"crop","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/datasets/transforms.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/datasets/transforms.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5012a0e0d69e1a96"}},{"code_sha256_prefix":"fe0ddcc2d420c9a0","entry":"evaluate","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/datasets/cocogrounding_eval.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/datasets/cocogrounding_eval.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"fe0ddcc2d420c9a0"}},{"code_sha256_prefix":"b749226a635f2b59","entry":"func_attention","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/fuse_modules.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/fuse_modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b749226a635f2b59"}},{"code_sha256_prefix":"0afe797420c1a312","entry":"gen_encoder_output_proposals","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/utils.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0afe797420c1a312"}},{"code_sha256_prefix":"2015623fec3ac3bc","entry":"generate_masks_with_special_tokens","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/bertwarper.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/bertwarper.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2015623fec3ac3bc"}},{"code_sha256_prefix":"10c7b3ef85aca8d6","entry":"generate_masks_with_special_tokens_and_transfer_map","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/bertwarper.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/bertwarper.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"10c7b3ef85aca8d6"}},{"code_sha256_prefix":"888d746fcc2165d1","entry":"get_sine_pos_embed","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/utils.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"888d746fcc2165d1"}},{"code_sha256_prefix":"9be9e658b5bd688a","entry":"hflip","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/datasets/transforms.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/datasets/transforms.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9be9e658b5bd688a"}},{"code_sha256_prefix":"b943467457f9825d","entry":"l1norm","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/fuse_modules.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/fuse_modules.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b943467457f9825d"}},{"code_sha256_prefix":"48cff1d6632b7025","entry":"l2norm","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/fuse_modules.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/fuse_modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"48cff1d6632b7025"}},{"code_sha256_prefix":"be924e54ed79731b","entry":"multi_scale_deformable_attn_pytorch","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/ms_deform_attn.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/ms_deform_attn.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"be924e54ed79731b"}},{"code_sha256_prefix":"23eb1c50e6bb2ba5","entry":"sigmoid_focal_loss","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/utils.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"23eb1c50e6bb2ba5"}},{"code_sha256_prefix":"47b44963c80f19d1","entry":"create_dummy_class","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/ms_deform_attn.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/ms_deform_attn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"47b44963c80f19d1"}},{"code_sha256_prefix":"5f2ed565ef0da8fc","entry":"create_dummy_func","repo":"idea-research/groundingdino","repo_kind":"listed","path":"groundingdino/models/GroundingDINO/ms_deform_attn.py","file_url":"https://github.com/idea-research/groundingdino/blob/HEAD/groundingdino/models/GroundingDINO/ms_deform_attn.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5f2ed565ef0da8fc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}