Giter VIP home page Giter VIP logo

face-anti-spoofing's Introduction

Face-anti-spoofing

This is a project which uses Machine Learning techniques(CNN followed by SVM) to classify an image if it is spoofed or not spoofed.

Application

With many face recognition systems coming into action, it is crucial to first check the image/video data for anti spoofing. This project is a part of a larger project of face verification using Siamese Neural Network.

Dataset

http://parnec.nuaa.edu.cn/xtan/NUAAImposterDB_download.html

Model details

The CNN (VGG16 or any other architecture) extracts features from a picture and encodes an image in a 4096 dimensional vector. These vectors of training images are then passed on to an SVM as input and the output of SVM is binary (0 for non-spoofed and 1 for spoofed). This simple model gives 97% accuracy on the NUAA dataset.

Instructions

Run the create_embeddings.py to generate the embeddings for your images. You can change the name of the folder (default "raw"). Two files called ImposterRaw.pkl and ClientRaw.pkl would be formed which would contain the training features. Then run model.py which trains an SVM using these two pickle files as inputs and tests the trained model on the testing dataset. The train-test files can be specified as seprate txt files where each line contains the location of the corresponding images.

face-anti-spoofing's People

Contributors

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