Giter Club home page Giter Club logo

Implementation of a Tool for DeepFake Obfuscation

This is the implementation part of the Level 5 MSci dissertation project "Implementation and Evaluation of a Tool for DeepFake Obfuscation".

We built a web application called Photo Obfuscator that allows users to upload photos and apply different obfuscation techniques such as blurring, pixelating, masking, DeepFake and avatar (emoji) to the faces of owners and non-owners of the photos. The evaluation of the obfuscation techniques was performed by conducting two within-subjects experiments - an online user study and a questionnaire.

The web application is currently deployed to http://mkhamis.pythonanywhere.com/.

Installation

Install Python >= 3.6 and follow the steps below.

Cloning the project and creating a virtual environment

git clone https://github.com/3delfina/dissertation.git
sudo pip3 install virtualenv
virtualenv venv
source venv/bin/activate

Installing the dependencies

cd dissertation/
pip install -r requirements.txt

Migrating

python manage.py migrate

Create a secret key for obfuscation_project/settings.py line 36

python
>>> import secrets
>>> secrets.token_urlsafe(16)

Starting the server locally

python manage.py runserver

If you are encountering dependency problems, consider using these commands

pip install https://download.pytorch.org/whl/cpu/torch-1.7.1%2Bcpu-cp36-cp36m-linux_x86_64.whl
pip install torch==1.7.1+cpu torchvision==0.8.2+cpu torchaudio==0.7.2 -f https://download.pytorch.org/whl/torch_stable.html

Usage

On the landing page, the user is invited to upload a photo and apply different obfuscation techniques on the faces to protect their privacy. The form on the landing page is pre-filled with the participant id, generated by calculating the Unix timestamp in milliseconds. The only other field required is the participant photo. Once the user uploads a photo, it gets processed in the background to locate face coordinates and create a DeepFake of all of the faces, and the user is redirected to a different page. The redirection step takes around 20 seconds due to the costly process of creating a DeepFake, so the user is shown a GIF image with the text asking them to wait.

Once redirected to a different page, the user is able to see their id and the filename of the photo uploaded, along with the original photo with all of the faces located and numbered. The user has an option to complete a form and pick numbers corresponding to the faces they wish to obfuscate or to upload a different photo. In case when the user selects the faces and clicks “Obfuscate selected”, the page is updated with 6 buttons, clicking on which displays the photos with one of the following obfuscation techniques applied: original (no obfuscation), blurring, pixelating, masking, DeepFake and avatar (emoji). The user may change the selection of faces at any point by using the aforementioned “Obfuscate selected” button.

DeepFake implementation

For the original implementation of the DeepFake generator please refer to https://github.com/hukkelas/DeepPrivacy. The version that was used and modified for this project corresponds to the commit de30f54 (full id de30f547428277385db6b0536c9b74750f56e1eb) on 5 Jan 2021.

M's Projects

M doesn’t have any public repositories yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.