Giter Site home page Giter Site logo

deepfake-detection-microservice's Introduction

Deepfake Detection as a Microservice

Introduction

In an era where digital content is ubiquitous, the proliferation of deepfake technology poses unprecedented challenges to the integrity of information online. Deepfakes—synthetic media in which a person's likeness has been manipulated to create convincing, yet entirely fictional content—have the potential to mislead, defraud, and undermine public discourse. Recognizing the critical need for robust countermeasures, our project, "Deepfake Detection as a Microservice," aims to provide a powerful, accessible solution to this modern dilemma.

This repository houses a cutting-edge microservice designed to identify and flag deepfake content with precision and speed. Leveraging advanced machine learning and image processing techniques, our service is engineered to integrate seamlessly with various platforms, offering a vital tool for content creators, social media platforms, and news organizations to ensure the authenticity of their media.

Getting Started

  1. Running on Docker
  • Clone the repository
  • Download Docker Desktop
  • The final model is available for download here. Please place the downloaded model in the path models/deepfake_detection_models/faces_trained_model.h5 to ensure the server runs correctly.
  • Run the following command in the root directory of the repository:
docker build -t deepfake-detection .
docker run -p 5000:8080 deepfake-detection
  • The service will be accessible at http://localhost:5000
  1. Running Locally
  • Clone the repository
  • Install the required dependencies:
pip install -r requirements.txt
  • Run the flask server from the root directory of the repository:
python app.py
  • The service will be accessible at http://localhost:8080

Results

Our model was evaluated on the test dataset using two approaches:

Approach Accuracy Precision Recall True Negative Rate
Balanced Fake-to-Real Ratio (1.5:1) 80.82% 80.97% 88.93% 68.66%
Whole Test Dataset 83.71% 94.03% 86.34% 68.66%

Sample Output

Real Image Fake Image
Real Image Results:
{
  "face_detection_method": "SSD",
  "predictions": [
    {
      "prediction": "Real",
      "probability": 0.9765076637268066
    }
  ]
}
      
Fake Image Results:
{
  "face_detection_method": "SSD",
  "predictions": [
    {
      "prediction": "Fake",
      "probability": 0.6263623237609863
    }
  ]
}
      

These results validate the model's effectiveness in accurately detecting deepfake content under varied test conditions.

Future Works

deepfake-detection-microservice's People

Contributors

suvanbalu 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.