MadryLab/photoguard
A defensive tool that raises the cost of malicious AI-powered image editing by using adversarial perturbations to protect images from manipulation by diffusion models.

The repository implements adversarial-based defenses that make images resistant to manipulation by ML-powered photo-editing models like stable diffusion. It uses techniques from the adversarial robustness literature to add imperceptible perturbations that block or corrupt the diffusion model’s ability to edit protected images. The project includes interactive Gradio demos and Jupyter notebooks demonstrating the protection mechanism against deepfake generation and targeted image manipulation.