DeepPrivacy is an open-source generative adversarial network that automatically anonymizes faces in images. Hosted on GitHub with about 1,300 stars under the MIT license, it is the official code for the ISVC 2019 paper of the same name, with the repository’s last updates in 2023 and an interactive demo on Hugging Face.
Sharing or publishing photos often means exposing people’s faces. DeepPrivacy removes that risk by detecting every face in an image and replacing it with a realistic, synthetic face, so the original identity cannot be recovered. Importantly, the GAN is trained in a way that it never sees privacy-sensitive information, which ensures the output is fully anonymized rather than merely blurred or pixelated โ treatments that can sometimes be reversed. It uses state-of-the-art face detection (DSFD) and Mask R-CNN to generate sparse pose information that guides the generator in difficult scenes, and a newer version 2 adds FP16 inference, a single SSD model for detection and landmarks, and face alignment for better quality. The repository also includes the code needed to reproduce the results of both published papers, including the follow-up inpainting work presented at GCPR 2020.
DeepPrivacy is free and open source under the MIT license. There is no paid version or hosted product; you run the models on your own hardware, and a free hosted demo is available for quick tests.
Researchers, journalists, data publishers and privacy-conscious teams who need to share or build datasets from real-world imagery without exposing identifiable faces, and computer vision researchers studying generative anonymization.