Skip to main content

Fawkes protect user privacy

Project description

Fawkes

Code implementation of the paper "Fawkes: Protecting Personal Privacy against Unauthorized Deep Learning Models", at USENIX Security 2020.

BEFORE YOU RUN OUR CODE

We appreciate your interest in our work and for trying out our code. We've noticed several cases where incorrect configuration leads to poor performances of protection. If you also observe low detection performance far away from what we presented in the paper, please feel free to open an issue in this repo or contact any of the authors directly. We are more than happy to help you debug your experiment and find out the correct configuration.

ABOUT

This repository contains code implementation of the paper "Fawkes: Protecting Personal Privacy against Unauthorized Deep Learning Models", at USENIX Security 2020.

DEPENDENCIES

Our code is implemented and tested on Keras with TensorFlow backend. Following packages are used by our code.

  • keras==2.3.1
  • numpy==1.18.4
  • tensorflow-gpu==1.13.1

Our code is tested on Python 3.6.8

HOWTO

Download and Config Datasets

The first step is to download several datasets for protection and target selection.

  1. Download the following dataset to your local machine. After downloading the datasets, restructure it the same way as the FaceScrub dataset downloaded.

    • FaceScrub -- used for protection evaluation (link)
    • VGGFace1 -- used for target select (link)
    • VGGFace2 -- used for target select (link)
    • WebFace -- used for target select (link)
  2. Config datasets open fawkes/config.py and update the DATASETS dictionary with the path to each dataset. Then run python fawkes/config.py. Every time the datasets are updated or moved, remember to rerun the command with the updated path.

  3. Calculate embeddings using feature extractor. Run python3 fawkes/prepare_feature_extractor.py --candidate-datasets scrub vggface1 vggface2 webface. This will calculate and cache the embeddings using the default feature extractor we provide. To use a customized feature extractor, please look at the Advance section at the end.

Generate Cloak for Images

To generate cloak, run python3 fawkes/protection.py --gpu 0 --dataset scrub --feature-extractor webface_dense_robust_extract For more information about the detailed parameters, please read fawkes/protection.py. The code will output a directory in results/ with cloak_data.p inside. You can check the cloaked images or inspect the changes in this notebook.

Evaluate Cloak Effectiveness

To evaluate the cloak, run python3 fawkes/eval_cloak.py --gpu 0 --cloak_data PATH-TO-RESULT-DIRECTORY --transfer_model vggface2_inception_extract.

The code will print out the tracker model accuracy on uncloaked/original test images of the protected user, which should be close to 0.

Citation

@inproceedings{shan2020fawkes,
  title={Fawkes: Protecting Personal Privacy against Unauthorized Deep Learning Models},
  author={Shan, Shawn and Wenger, Emily and Zhang, Jiayun and Li, Huiying and Zheng, Haitao and Zhao, Ben Y},
  booktitle="Proc. of USENIX Security",
  year={2020}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fawkes-0.0.1.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

fawkes-0.0.1-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file fawkes-0.0.1.tar.gz.

File metadata

  • Download URL: fawkes-0.0.1.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.2

File hashes

Hashes for fawkes-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c4be4422cac827133bcbb20b0ea5ebe27cb6529f4dbf52fd52b3978c5b4f220f
MD5 9312effc31e7a491d24083a0d9c63817
BLAKE2b-256 62111b2f3d32f036c3ff36d3d181393c339ddb32532f94695c3c96026c1c9b4f

See more details on using hashes here.

File details

Details for the file fawkes-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: fawkes-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.2

File hashes

Hashes for fawkes-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b1aa8ecf2661fb3f5088054c8eada8ff5385acbd615e5a127fed7fe15d0c1cd
MD5 b176e86e0ea2501cc87a89f5a5d8d444
BLAKE2b-256 8750204d4e601126236d446c17dc86e50dba70795336faf888bfea9e04785aa3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page