{"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/mask-image-watermarking","title":"Mask Image Watermarking","arxiv_id":"2504.12739","date":"2025-04-17","proceeding":null,"authors":["Runyi Hu","Jie Zhang","Shiqian Zhao","Nils Lukas","Jiwei Li","Qing Guo","Han Qiu","Tianwei Zhang"],"abstract":"We present MaskMark, a simple, efficient, and flexible framework for image watermarking. MaskMark has two variants: (1) MaskMark-D, which supports global watermark embedding, watermark localization, and local watermark extraction for applications such as tamper detection; (2) MaskMark-ED, which focuses on local watermark embedding and extraction, offering enhanced robustness in small regions to support fine-grined image protection. MaskMark-D builds on the classical encoder-distortion layer-decoder training paradigm. In MaskMark-D, we introduce a simple masking mechanism during the decoding stage that enables both global and local watermark extraction. During training, the decoder is guided by various types of masks applied to watermarked images before extraction, helping it learn to localize watermarks and extract them from the corresponding local areas. MaskMark-ED extends this design by incorporating the mask into the encoding stage as well, guiding the encoder to embed the watermark in designated local regions, which improves robustness under regional attacks. Extensive experiments show that MaskMark achieves state-of-the-art performance in global and local watermark extraction, watermark localization, and multi-watermark embedding. It outperforms all existing baselines, including the recent leading model WAM for local watermarking, while preserving high visual quality of the watermarked images. In addition, MaskMark is highly efficient and adaptable. It requires only 20 hours of training on a single A6000 GPU, achieving 15x computational efficiency compared to WAM. By simply adjusting the distortion layer, MaskMark can be quickly fine-tuned to meet varying robustness requirements.","url_abs":"https://arxiv.org/abs/2504.12739v2","url_pdf":"https://arxiv.org/pdf/2504.12739v2.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":"mask-image-watermarking","repo_url":"https://github.com/hurunyi/maskmark","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":null,"task_name":"GPU"}],"methods":[{"method_slug":"focus","method_name":"Focus"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2504.12739","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2504.12739"}},"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/hurunyi/maskmark","reach":null}],"summary":{"ran":7,"ran_draft_wrong":5,"unverified":11},"by_repo_kind":{"official":{"samples":20,"ran":9,"repositories":1},"community":{"samples":3,"ran":3,"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":"1f06faef62e6eba2","entry":"ConvNormRelu","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1f06faef62e6eba2"}},{"code_sha256_prefix":"e066873b6a3c1c9c","entry":"DoubleConv","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e066873b6a3c1c9c"}},{"code_sha256_prefix":"29d6c8dc33aa60c4","entry":"Down","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"29d6c8dc33aa60c4"}},{"code_sha256_prefix":"970af1a11b88823e","entry":"GroupNorm32","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"970af1a11b88823e"}},{"code_sha256_prefix":"12201d6ffa2f0b4d","entry":"REBNCONV","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"12201d6ffa2f0b4d"}},{"code_sha256_prefix":"5f68a0c61f8c216a","entry":"RSU4","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5f68a0c61f8c216a"}},{"code_sha256_prefix":"0452d2e25645e27d","entry":"UNet","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0452d2e25645e27d"}},{"code_sha256_prefix":"65f0d74b6eff8968","entry":"Up","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"65f0d74b6eff8968"}},{"code_sha256_prefix":"a0b11efc95c79c73","entry":"calculate_iou_score","repo":"hurunyi/maskwm","repo_kind":"community","path":"inference.py","file_url":"https://github.com/hurunyi/maskwm/blob/HEAD/inference.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a0b11efc95c79c73"}},{"code_sha256_prefix":"2978a72a8435838d","entry":"decoded_message_accuracy","repo":"hurunyi/maskwm","repo_kind":"community","path":"inference.py","file_url":"https://github.com/hurunyi/maskwm/blob/HEAD/inference.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2978a72a8435838d"}},{"code_sha256_prefix":"2d094cdb029a3669","entry":"denormalize","repo":"hurunyi/maskwm","repo_kind":"community","path":"inference.py","file_url":"https://github.com/hurunyi/maskwm/blob/HEAD/inference.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2d094cdb029a3669"}},{"code_sha256_prefix":"37f8b080682479a1","entry":"normalize","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"37f8b080682479a1"}},{"code_sha256_prefix":"8d74faed004f7cc6","entry":"Decoder","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8d74faed004f7cc6"}},{"code_sha256_prefix":"073c41c1803af624","entry":"Encoder","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"073c41c1803af624"}},{"code_sha256_prefix":"cda4a32b64c7392c","entry":"JND","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cda4a32b64c7392c"}},{"code_sha256_prefix":"b653f0e6310a39f5","entry":"MaskWM","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b653f0e6310a39f5"}},{"code_sha256_prefix":"942910e44eb17b71","entry":"Noise","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"942910e44eb17b71"}},{"code_sha256_prefix":"7195700248a991a6","entry":"RSU4F","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7195700248a991a6"}},{"code_sha256_prefix":"50ca52394f8531f9","entry":"RSU5","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"50ca52394f8531f9"}},{"code_sha256_prefix":"b0f104c5c1a11652","entry":"RSU6","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b0f104c5c1a11652"}},{"code_sha256_prefix":"7958e1bb9c073000","entry":"RSU7","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7958e1bb9c073000"}},{"code_sha256_prefix":"d4c76d061ef5a0e0","entry":"U2NETP","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d4c76d061ef5a0e0"}},{"code_sha256_prefix":"c7987731c99f5e9c","entry":"WatermarkModel","repo":"hurunyi/maskmark","repo_kind":"official","path":"models/Network.py","file_url":"https://github.com/hurunyi/maskmark/blob/HEAD/models/Network.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c7987731c99f5e9c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}