Skip to content

leo-xfm/DPM-copyright-infringement-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DPM: Copyright Infringement Detection in Text-to-Image Diffusion Models via Differential Privacy

arXiv project


This repository contains the official implementation of D-Plus-Minus (DPM), a principled post-hoc framework for detecting copyright infringement in text-to-image diffusion models, grounded in differential privacy.

Environment Setup

We recommend using Anaconda to set up a clean environment:

cd DPM-copyright-infringement-detection

# Create conda environment
conda create -n dpm python=3.12 -y
conda activate dpm

# Install dependencies
pip install -r requirements.txt

Configuration

Edit the config YAML in ./configs/ folder before running:

Config Field Description
images_class Must be one of: human_face, architecture, arts_painting
images_name Name of the subfolder (concept) under ./data/CIDD-example/class/<class>/
output_folder Directory where the model checkpoints, generated images, detection results, and logs will be saved.

⚠️ Do not modify other config values, especially those related to normalization and scoring, unless you know what you're doing.

Changing them may lead to incorrect normalization in conditional sensitivity scoring and compromise the validity of the DPM confidence scores.

Running DPM Detection

Choose one of the pre-defined models and run:

export CONFIG_NAME="sd_1_4"
python main.py --config-name $CONFIG_NAME

Supported Model Configs:

CONFIG_NAME Model Description
sd_1_4 Stable Diffusion v1.4 (full fine-tuning)
lora_sdxl Stable Diffusion XL (1.0) + LoRA
lora_sana SANA (0.6B) + LoRA
lora_flux FLUX.1 + LoRA

All model-specific settings are defined in the corresponding YAML files in ./configs.

About

[AAAI'26 Oral] Official Implementation of Copyright Infringement Detection in Text-to-Image Diffusion Models via Differential Privacy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages