Skip to content

PKU-ML/Diffusion-PID-Protection

Repository files navigation

Diffusion-PID-Protection

Implementation of the ICML 2024 paper titled "PID: Prompt-Independent Data Protection Against Latent Diffusion Models" by Ang Li*, Yichuan Mo, Mingjie Li, Yisen Wang. Our paper is available at http://arxiv.org/abs/2406.15305.

image

TODO:

  • Initialize the repo. (2024/5/28)
  • Training scripts & implementation of the PID.
  • Implementation of the evaluation code.
  • Visualizations & training data.
  • [] Implementation of the baselines (FSGM, ASPL, AdvDM).

Protecting images with PID

The minimum implementation of the PID is given in PID.py. Besides, we place clean images from the CelebA-HQ dataset in ./data/clean_images and the images already protected by PID in ./data/PID_images

  sh PID.sh

Fine-tuning

Fine-tuning can be started with a one-line command. Feel free to experiment with different training configurations.

  sh train_dreambooth.sh # DreamBooth

  sh train_drembooth_lora.sh # LoRA

Evaluation

Implementation of the metrics used in the paper can be found in evaluate.py.

  sh evaluate.sh

Contact Us

Want to have a discussion with the authors? Please open issues or send emails to [email protected]

Citation

Please consider citing our work if you find it helpful!

Acknowledgment

This repo uses some of the code from the links below. We sincerely admire their great work!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published