Protecting Privacy Using Fawkes Against Unauthorized Surveillance

An overview and understanding of the paper, “Fawkes: Protecting Privacy against Unauthorized Deep Learning Models” for security against unwarranted facial recognition.

Vardan Agarwal
VisionWizard
6 min readAug 14, 2020

--

Photo by Ahmed Zayan on Unsplash

The world is slowly coming to grips with the privacy-invading drawbacks of facial recognition. It allows strangers to click a photo of anyone and get a background about them without any permission. It can be used to track people assembling and monitor their activities. Companies like Amazon, Microsoft, and IBM have started pulling the plug on these technologies. However, companies like Clearview.ai still provide solutions to law enforcement groups and highly accurate face recognition models of individuals are being trained without their knowledge.

To protect privacy a group of students from the University of Chicago has made Fawkes, a model that tries to cloak images such that it renders these systems ineffective.

To understand how this system works we need to understand how a naive facial recognition system works.

  • Firstly, we take a model trained on a large dataset of faces through which we can extract the encodings or features of a face.
  • Then we take several images of a person and find where the cluster of encodings of each person would lie in a feature space.
  • This creates distinct boundaries and if the encodings of the test image lie close to that cluster, then the model can recognize that person.

Moreover, unlike other deep learning models that require a ton of data 5–10 images are enough to provide reasonably estimate a person.

How does Fawkes work?

Through Fawkes, the researchers have tried to perform “clean label attacks.” In clean label attacks, the values of the labels remain the same but the content is changed. They search for a cloak that shifts its feature representation towards another set. This prevents the generation of extreme results that can be caught via anomaly detection. So through Fawkes, the features extracted of the face would point to a completely different feature space leading to misclassification.

All this is done without making the changes visible to the naked eye. Impressive, isn’t it? Now, when the models are trained on the cloaked images, and a stalker presents a new uncloaked image then they won’t match.

Source

The distance between the cloaked and uncloaked images is monitored by a parameter called DSSIM (Structural Dis-Similarity Index). Increasing its values can lead to improved accuracy but with a trade-off between the similarities of the images.

DSSIM = 0.07. Source

How well does it work?

The researchers tested their system using Microsoft Azure Face API, Amazon Rekognition, and Face++ where they were able to achieve 100% protection if all the images present in the dataset were cloaked. However, the accuracy drops to around 15% if only 40% of the images were cloaked.

So what about the normal images that are collected over the years by these companies and have already trained a model on them? Yes, it is a little late implementing these types of technologies, but we can add our cloaked images, and slowly they will eclipse the number of normal ones or the major platforms like Facebook, Linkedin, etc can start cloaking the images any image uploaded for a better future.

They have even made executable applications for Windows and Mac OS to generate cloaked images easily for people who don’t code.

Improving Results for Datasets having Uncloaked Images

Photo by Jungwoo Hong on Unsplash

Users can create Sybil (fake) accounts on communities like Facebook and upload images of different people modified such that they overlap in their feature space. This would mean that when a person would search an image for the original person, they might get a result of the proxy account further protecting privacy.

Source
Results with Sybil account. Source

As you can see, even with a high number of uncloaked images they model can be fooled more often than not.

Other than this, they also tried image processing operations to disrupt the cloak with Gaussian blurring, Gaussian noise, and JPEG compression.

Source

They found that when the image was subjected to large changes the normal classification results plummeted before the cloak broke.

They have open-sourced their code at this GitHub repository and also have a project website with more details.

How to Use?

You can use the executable files but it only offers a minimum cloaking mode. To use other modes like low, medium, and high you can pip install it and run a single command to get the result.

Original Image Used for Cloaking
Results — Top left: min, top right: low, bottom left: mid, bottom right: high

Playing Around

I also measured the PSNR and SSIM of the original image and cloaked image using the following code:

The results:

After this, I subtracted the cloaked image from the original image for all the channels separately as well as together and thresholded it, followed by combining all the channels using bitwise OR to find which pixels were modified.

Result. Left side: black and white, right side: color affected

This shows that the major changes are near the face area, so let’s find out the PSNR and SSIM for the face area. I will use an SSD detector available with OpenCV’s DNN module to find the faces. Discussing it is beyond the scope of this article. To know more about it or it’s code you can refer to the article linked below or have a look at this GitHub repository.

As expected the values of PSNR and SSIM drop sharply for the face region. It would be interesting to see how it performs with multiple faces and finding if certain pixels intensities affect the cloaking, but let’s stop here for now.

This project is not the end of the unfair use of our images, but just a start. In the future, even better algorithms like these can be expected which would help us to protect privacy against unauthorized deep learning models created without our consent.

--

--