Downloads · 30 days
0
Suchenl/TAG-WM
TAG-WM is a image segmentation model from Suchenl. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
This repository contains the official implementation and pretrained weights for TAG-WM, a tamper-aware watermarking framework for diffusion-generated images, as introduced in the paper:
Downloads · 30 days
0
Access
Public
Updated Jun 25, 2026
Repo size
124 MB
Likes
0
Public
Click a slice to open those files.
.pt124 MB · 100%
From the Hugging Face model README
This repository contains the official implementation and pretrained weights for TAG-WM, a tamper-aware watermarking framework for diffusion-generated images, as introduced in the paper:
TAG-WM: Tamper-Aware Generative Image Watermarking via Diffusion Inversion Sensitivity
Official Code: https://github.com/Suchenl/TAG-WM
AI-generated content (AIGC) enables efficient visual creation but raises copyright and authenticity risks. As a common technique for integrity verification and source tracing, digital image watermarking is regarded as a potential solution to above issues. However, the widespread adoption and advancing capabilities of generative image editing tools have amplified malicious tampering risks, while simultaneously posing new challenges to passive tampering detection and watermark robustness. To address these challenges, this paper proposes a Tamper-Aware Generative image WaterMarking method named TAG-WM. The proposed method comprises four key modules: a dual-mark joint sampling (DMJS) algorithm for embedding copyright and localization watermarks into the latent space while preserving generative quality, the watermark latent reconstruction (WLR) utilizing reversed DMJS, a dense variation region detector (DVRD) leveraging diffusion inversion sensitivity to identify tampered areas via statistical deviation analysis, and the tamper-aware decoding (TAD) guided by localization results. The experimental results demonstrate that TAG-WM achieves state-of-the-art performance in both tampering robustness and localization capability even under distortion, while preserving lossless generation quality and maintaining a watermark capacity of 256 bits.
Dual-Mark Joint Sampling
Dense Variation Region Detector
Tamper-Aware Message Decoding
For full installation instructions and environment setup, including downloading required image generation diffusion models and datasets, please refer to the official GitHub repository.
Here are examples of how to run tests to evaluate the model's capabilities:
# Test model's ability with random crop degradation
python -m applied_to_sd2.test --model_path "SD_model_path" --start_sample_idx 0 --num 1000 --random_crop_ratio 0.3 --return_tamper_loc True --calc_wm_use_tamper_loc True
# Test model's ability with logo insertion tampering
python -m applied_to_sd2.test --model_path "SD_model_path" --start_sample_idx 0 --num 1000 --logo_putting_num 2 --logo_ratio 0.5 --return_tamper_loc True --calc_wm_use_tamper_loc True
Arguments for testing various image degradations:
--jpeg_ratio--gaussian_blur_r--median_blur_k--resize_ratio--gaussian_std--sp_prob--brightness_factorIf you find this work useful, please consider citing our paper and giving the repo a ⭐:
@article{chen2025tag,
title={TAG-WM: Tamper-Aware Generative Image Watermarking via Diffusion Inversion Sensitivity},
author={Chen, Yuzhuo and Ma, Zehua and Fang, Han and Zhang, Weiming and Yu, Nenghai},
journal={arXiv preprint arXiv:2506.23484},
year={2025}
}