Giter Site home page Giter Site logo

sarahsimionescu / simple-model-inversion Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 6.34 MB

My attempt to recreate the attack described in "Model Inversion Attacks that Exploit Confidence Information and Basic Countermeasures" by Fredrikson et al. in 2015 using Tensorflow 2.9.1

Jupyter Notebook 100.00%
model-inversion model-inversion-attack face-recognition tensorflow

simple-model-inversion's Introduction

simple-model-inversion

My attempt to recreate the attack described in "Model Inversion Attacks that Exploit Confidence Information and Basic Countermeasures" by Fredrikson et al. in 2015 using Tensorflow 2.9.1

This was my first time using virtual enviroments, tensorflow and any python ML related libraries. For this reason I experimented with different abstractions for training models in tensorflow.

Link to original paper: https://dl.acm.org/doi/10.1145/2810103.2813677

Inspired by: https://github.com/Djiffit/face-decoding-with-model-inversion

Instructions for Use (using Pip and Virtual Enviroments)

  1. optional Create a virtual enviroment to install all the required libraries for running the program

    • Create the enviroment: python -m venv env
    • Activate the enviroment: env\Scripts\activate
    • Deactivate the enviroment (afterwards): deactivate
  2. Activate the enviroment and pip install packages to fulfill requirements.txt

  3. Unzip the training/testing data. Original images can be found here: https://www.kaggle.com/datasets/kasikrit/att-database-of-faces?select=s1

    • faces
      • faces/training (9 photos per person in each directory)
        • faces/training/s1
        • faces/training/s2
        • ...
        • faces/training/s40
      • faces/testing (1 photo per person in each directory)
        • faces/testing/s1
        • faces/testing/s2
        • ...
        • faces/testing/s40
  4. Select your enviroment as the kernel for either Jupyter notebook and run each cell in order

The output of the inversion will show you step-by-step the inversion taking place.

simplemodel.ipynb

Uses the highest-level of abstraction tensorflow offers to create the face-recognition model.

complexmodel.ipynb

The model training process is a little less abstract and uses a defined training and testing function.

simple-model-inversion's People

Contributors

sarahsimionescu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.