Git Product home page Git Product logo

iciap-2023's Introduction

Combining identity features and artifact analysis for Differential Morphing Attack Detection

This is the repository that holds the official reference implementation for the paper "Combining identity features and artifact analysis for Differential Morphing Attack Detection" (Di Domenico et al., 2023).

Requirements

The required packages are present in the requirements.txt file. To install them, run the following command:

pip install -r requirements.txt

Usage

The iciap_2023 package exposes a get_prediction function which, in its simplest form, takes in input a document and a live image, and returns a morphing prediction. 0 means that the document image is bona fide, while 1 means that the document image is morphed.

from iciap_2023 import get_prediction
import cv2 as cv

# Load the document and the live image
document = cv.imread("document.png")
live = cv.imread("live.png")

# Get the prediction
prediction = get_prediction(document, live)

This function also allows the user to specify the device to use for the computation (i.e. CPU or GPU) with the optional device parameter. The default value is cpu.

from iciap_2023 import get_prediction
import cv2 as cv

# Load the document and the live image
document = cv.imread("document.png")
live = cv.imread("live.png")

# Get the prediction
prediction = get_prediction(document, live, device="cuda:0")

Finally, the function supports computing batched predictions, by passing two lists of equal length: one containing the documents and the other containing the live images. The function will return a list of predictions.

from iciap_2023 import get_prediction
import cv2 as cv

# Load the documents and the live images
documents = [cv.imread("document1.png"), cv.imread("document2.png")]
lives = [cv.imread("live1.png"), cv.imread("live2.png")]

# Get the predictions
predictions = get_prediction(documents, lives, device="cuda:0")

Acknowledgement

When using the code from this repository, please cite the following work:

@inproceedings{di2023combining,
  title={Combining Identity Features and Artifact Analysis for Differential Morphing Attack Detection},
  author={Di Domenico, Nicol{\`o} and Borghi, Guido and Franco, Annalisa and Maltoni, Davide},
  booktitle={International Conference on Image Analysis and Processing},
  pages={100--111},
  year={2023},
  organization={Springer}
}

iciap-2023's People

Contributors

ndido98 avatar

Watchers

Guido Borghi avatar  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.