{"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/2408-03286","title":"Biomedical SAM 2: Segment Anything in Biomedical Images and Videos","arxiv_id":"2408.03286","date":"2024-08-06","proceeding":null,"authors":["Zhiling Yan","Weixiang Sun","Rong Zhou","Zhengqing Yuan","Kai Zhang","Yiwei Li","Tianming Liu","Quanzheng Li","Xiang Li","Lifang He","Lichao Sun"],"abstract":"Medical image segmentation and video object segmentation are essential for diagnosing and analyzing diseases by identifying and measuring biological structures. Recent advances in natural domain have been driven by foundation models like the Segment Anything Model 2 (SAM-2). To explore the performance of SAM-2 in biomedical applications, we designed three evaluation pipelines for single-frame 2D image segmentation, multi-frame 3D image segmentation and multi-frame video segmentation with varied prompt designs, revealing SAM-2's limitations in medical contexts. Consequently, we developed BioSAM-2, an enhanced foundation model optimized for biomedical data based on SAM-2. Our experiments show that BioSAM-2 not only surpasses the performance of existing state-of-the-art foundation models but also matches or even exceeds specialist models, demonstrating its efficacy and potential in the medical domain.","url_abs":"https://arxiv.org/abs/2408.03286v2","url_pdf":"https://arxiv.org/pdf/2408.03286v2.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":"2408-03286","repo_url":"https://github.com/ZhilingYan/Biomedical-SAM-2","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"image-segmentation","task_name":"Image Segmentation"},{"task_slug":"medical-image-segmentation","task_name":"Medical Image Segmentation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"},{"task_slug":"video-object-segmentation","task_name":"Video Object Segmentation"},{"task_slug":"video-segmentation","task_name":"Video Segmentation"},{"task_slug":"video-semantic-segmentation","task_name":"Video Semantic Segmentation"}],"methods":[{"method_slug":"sam","method_name":"SAM"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2408.03286","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.03286"}},"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/ZhilingYan/Biomedical-SAM-2","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_violates":1,"ran":2,"ran_honours":1,"ran_fixture":1,"unverified":2},"by_repo_kind":{"official":{"samples":7,"ran":5,"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":"7ceaad42da42edd5","entry":"compute_axial_cis","repo":"ZhilingYan/Biomedical-SAM-2","repo_kind":"official","path":"sam2/modeling/position_encoding.py","file_url":"https://github.com/ZhilingYan/Biomedical-SAM-2/blob/HEAD/sam2/modeling/position_encoding.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7ceaad42da42edd5"}},{"code_sha256_prefix":"34aed0d2e344576c","entry":"create_logger","repo":"ZhilingYan/Biomedical-SAM-2","repo_kind":"official","path":"func/utils.py","file_url":"https://github.com/ZhilingYan/Biomedical-SAM-2/blob/HEAD/func/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":"34aed0d2e344576c"}},{"code_sha256_prefix":"bb060d29525f90eb","entry":"init_t_xy","repo":"ZhilingYan/Biomedical-SAM-2","repo_kind":"official","path":"sam2/modeling/position_encoding.py","file_url":"https://github.com/ZhilingYan/Biomedical-SAM-2/blob/HEAD/sam2/modeling/position_encoding.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bb060d29525f90eb"}},{"code_sha256_prefix":"a5a93e3c6f623549","entry":"make_grid","repo":"ZhilingYan/Biomedical-SAM-2","repo_kind":"official","path":"func/utils.py","file_url":"https://github.com/ZhilingYan/Biomedical-SAM-2/blob/HEAD/func/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":"a5a93e3c6f623549"}},{"code_sha256_prefix":"f8f09f78b474ee7c","entry":"reshape_for_broadcast","repo":"ZhilingYan/Biomedical-SAM-2","repo_kind":"official","path":"sam2/modeling/position_encoding.py","file_url":"https://github.com/ZhilingYan/Biomedical-SAM-2/blob/HEAD/sam2/modeling/position_encoding.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":"f8f09f78b474ee7c"}},{"code_sha256_prefix":"49295efba04fe387","entry":"build_sam2","repo":"ZhilingYan/Biomedical-SAM-2","repo_kind":"official","path":"sam2/build_sam.py","file_url":"https://github.com/ZhilingYan/Biomedical-SAM-2/blob/HEAD/sam2/build_sam.py","link_basis":"first_harvest_node","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":"49295efba04fe387"}},{"code_sha256_prefix":"655fa79e516369dc","entry":"build_sam2_video_predictor","repo":"ZhilingYan/Biomedical-SAM-2","repo_kind":"official","path":"sam2/build_sam.py","file_url":"https://github.com/ZhilingYan/Biomedical-SAM-2/blob/HEAD/sam2/build_sam.py","link_basis":"first_harvest_node","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":"655fa79e516369dc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}