Author implementation of RiDDLE: Reversible and Diversified De-identification with Latent Encryptor
Dongze Li, Wei Wang, Kang Zhao, Jing Dong and Tieniu Tan
This work presents RiDDLE, short for Reversible and Diversified De-identification with Latent Encryptor, to protect the identity information of people from being misused. Built upon a pre-learned StyleGAN2 generator, RiDDLE manages to encrypt and decrypt the facial identity within the latent space. The design of RiDDLE has three appealing properties. First, the encryption process is cipher-guided and hence allows diverse anonymization using different passwords. Second, the true identity can only be decrypted with the correct password, otherwise the system will produce another de-identified face to maintain the privacy. Third, both encryption and decryption share an efficient implementation, benefiting from a carefully tailored lightweight encryptor. Comparisons with existing alternatives confirm that our approach accomplishes the de-identification task with better quality, higher diversity, and stronger reversibility. We further demonstrate the effectiveness of RiDDLE in anonymizing videos. Code and models will be made publicly available.
To run the inference and the training scripts, first you need to set up a virtual environment by conda env create -f RiDDLE.yaml
To perform identity encryption and decryption, just python coach_test.py
To train a latent encryptor, just sh scripts/run_coach_id_pwd_same.sh
We also support Distributed Data Parallel (DDP) training, sh scripts/run_coach_id_pwd_same_ddp.sh
.
Our data and pretrain models can be found at this link, password is sqp8
We combine our method with Stitch Tuning to de-identify videos.
curry_10s.mov
lebron_10s.mov
jim.mov
If you found this repo useful, please cite
@inproceedings{li2023riddle,
title={RiDDLE: Reversible and Diversified De-identification with Latent Encryptor},
author={Li, Dongze and Wang, Wei and Zhao, Kang and Dong, Jing and Tan, Tieniu},
booktitle={Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
month={June},
year={2023}
}
Some parts of our code is based on HairCLIP and e4e, thanks for their great work.