{"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/mas-sam-segment-any-marine-animal-with","title":"MAS-SAM: Segment Any Marine Animal with Aggregated Features","arxiv_id":"2404.15700","date":"2024-04-24","proceeding":null,"authors":["Tianyu Yan","Zifu Wan","Xinhao Deng","Pingping Zhang","Yang Liu","Huchuan Lu"],"abstract":"Recently, Segment Anything Model (SAM) shows exceptional performance in generating high-quality object masks and achieving zero-shot image segmentation. However, as a versatile vision model, SAM is primarily trained with large-scale natural light images. In underwater scenes, it exhibits substantial performance degradation due to the light scattering and absorption. Meanwhile, the simplicity of the SAM's decoder might lead to the loss of fine-grained object details. To address the above issues, we propose a novel feature learning framework named MAS-SAM for marine animal segmentation, which involves integrating effective adapters into the SAM's encoder and constructing a pyramidal decoder. More specifically, we first build a new SAM's encoder with effective adapters for underwater scenes. Then, we introduce a Hypermap Extraction Module (HEM) to generate multi-scale features for a comprehensive guidance. Finally, we propose a Progressive Prediction Decoder (PPD) to aggregate the multi-scale features and predict the final segmentation results. When grafting with the Fusion Attention Module (FAM), our method enables to extract richer marine information from global contextual cues to fine-grained local details. Extensive experiments on four public MAS datasets demonstrate that our MAS-SAM can obtain better results than other typical segmentation methods. The source code is available at https://github.com/Drchip61/MAS-SAM.","url_abs":"https://arxiv.org/abs/2404.15700v2","url_pdf":"https://arxiv.org/pdf/2404.15700v2.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":"mas-sam-segment-any-marine-animal-with","repo_url":"https://github.com/drchip61/mas-sam","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"image-segmentation","task_name":"Image Segmentation"},{"task_slug":"marine-animal-segmentation","task_name":"Marine Animal Segmentation"},{"task_slug":"segmentation","task_name":"Segmentation"},{"task_slug":"semantic-segmentation","task_name":"Semantic Segmentation"}],"methods":[{"method_slug":"mas","method_name":"MAS"},{"method_slug":"sam","method_name":"SAM"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-segmentation-on-mas3k","task":"Image Segmentation","dataset":"MAS3K","model":"MAS-SAM","rank_in_archive_order":2,"of":4,"metrics":{"E-measure":"0.938","MAE":"0.025","S-measure":"0.887","mIoU":"0.788"},"uses_additional_data":false},{"leaderboard":"/sota/image-segmentation-on-rmas","task":"Image Segmentation","dataset":"RMAS","model":"MAS-SAM","rank_in_archive_order":1,"of":4,"metrics":{"E-measure":"0.948","MAE":"0.021","S-measure":"0.865","mIoU":"0.742"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2404.15700","atlas_url":"https://app.syntology.ai/?focus=2404.15700","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.15700"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/Drchip61/MAS-SAM","reach":null}],"summary":{"ran":9,"ran_fixture":3,"unverified":8},"by_repo_kind":{"official":{"samples":20,"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":20,"samples":[{"code_sha256_prefix":"83f765aaff985605","entry":"Attention","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"83f765aaff985605"}},{"code_sha256_prefix":"aa1d3f6eb56aac2f","entry":"Conv","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"aa1d3f6eb56aac2f"}},{"code_sha256_prefix":"f6ebdaee467a4c18","entry":"PatchEmbed","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"f6ebdaee467a4c18"}},{"code_sha256_prefix":"2037cd696c266c0f","entry":"adapter","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"2037cd696c266c0f"}},{"code_sha256_prefix":"96bad2ef96fb6579","entry":"add_decomposed_rel_pos","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"96bad2ef96fb6579"}},{"code_sha256_prefix":"761a072ba4760197","entry":"conv_block","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"761a072ba4760197"}},{"code_sha256_prefix":"b4db11d8cc855157","entry":"conv_pre","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"b4db11d8cc855157"}},{"code_sha256_prefix":"fdd08851abe071e1","entry":"conv_up","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"fdd08851abe071e1"}},{"code_sha256_prefix":"713df064f3abc1f7","entry":"conv_up0","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"713df064f3abc1f7"}},{"code_sha256_prefix":"423b042d669b0385","entry":"conv_up_pre","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"423b042d669b0385"}},{"code_sha256_prefix":"44295279053c2920","entry":"window_partition","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"44295279053c2920"}},{"code_sha256_prefix":"23bd2b62a8e69216","entry":"window_unpartition","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"23bd2b62a8e69216"}},{"code_sha256_prefix":"8f4c88e2ba7c6212","entry":"Block","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"8f4c88e2ba7c6212"}},{"code_sha256_prefix":"e2097ccdbb403497","entry":"ImageEncoderViT","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"e2097ccdbb403497"}},{"code_sha256_prefix":"fde7b569a116a3f3","entry":"LoRA_Sam","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"fde7b569a116a3f3"}},{"code_sha256_prefix":"7ee7d142292d4557","entry":"MaskDecoder","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"7ee7d142292d4557"}},{"code_sha256_prefix":"2682fdd5e82c677b","entry":"Sam","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"2682fdd5e82c677b"}},{"code_sha256_prefix":"844f9d4dc11c493a","entry":"_LoRA_qkv","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"844f9d4dc11c493a"}},{"code_sha256_prefix":"04bf9641e259bf2e","entry":"desam","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"04bf9641e259bf2e"}},{"code_sha256_prefix":"40e7d23cd911982a","entry":"senet","repo":"Drchip61/MAS-SAM","repo_kind":"official","path":"MAS-SAM/sam_lora_image_encoder.py","file_url":"https://github.com/Drchip61/MAS-SAM/blob/HEAD/MAS-SAM/sam_lora_image_encoder.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":"40e7d23cd911982a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}