MASQUE is a diffusion-based system that applies text-guided, localized makeup edits designed to fool facial recognition models. It hides identities effectively while keeping the images realistic, supporting a wide variety of makeup styles, and staying reliable even under common image transformations.
Create and activate the conda environment:
conda env create -f requirement.yaml
conda activate masqueDownload from: Google Drive
Place the downloaded files inside the models/ folder.
Download from: Google Drive
Place the file inside the models/ folder.
You can run in batch mode or single-image mode.
Prepare a JSON file (ref_map_json) that maps identities to source and reference image basenames.
python run.py \
--mode batch \
--source_prompt "A face of a human" \
--target_prompt "A face of a human with red lipstick" \
--target_word red \
--images_dir src_dir \
--img_ext jpg \
--result_dir ./results/batch1 \
--skip_existing \
--ref_map_json identity.json \
--ref_base_dir ref_dirpython run.py \
--mode single \
--source_prompt "A face of a human" \
--target_prompt "A face of a human with red lipstick" \
--target_word red \
--img_path /path/to/imgs/0001.jpg \
--result_dir ./results/run1