ailia Tech BLOG

FaceAntiSpoofing : A Machine Learning Model to Determine If a Face is Real

This is an introduction to「FaceAntiSpoofing」, a machine learning model that can be used with ailia SDK. You can easily use this model to create AI applications using ailia SDK as well as many other ready-to-use ailia MODELS.


Overview

FaceAntiSpoofing is a machine learning model that determines whether a face in a picture is real (an actual person being photographed) or fake (printed on a sheet of paper). It can be used for identity verification (Know Your Customer, or KYC for short) and other purposes.

Source: https://github.com/kprokofi/light-weight-face-anti-spoofing

GitHub — kprokofi/light-weight-face-anti-spoofing: towards the solving spoofing problemTowards the solving anti-spoofing problem on RGB only data. This repository contains a training and evaluation pipeline…github.com

Architecture

FaceAntiSpoofing is based on MobileNetV3 and was trained on the CelebA-Spoof dataset.

Source: https://github.com/Davidzhangyuanhan/CelebA-Spoof

CelebA-Spoof contains images of faces printed on paper or displayed on a PC, tablet, or cell phone.

Source: https://github.com/Davidzhangyuanhan/CelebA-Spoof

It also contains variants of the same picture under different angles and shapes.

Source: https://github.com/Davidzhangyuanhan/CelebA-Spoof

The accuracy of the MobileNet3 Large model reaches 99.8% on the CelebA-Spoof dataset.

Source: https://github.com/kprokofi/light-weight-face-anti-spoofing

Usage

FaceAntiSpoofing can be used with ailia SDK using the following command. By appending the --detection option, the faces are detected in the input image and labelled as real or fake.

$ python3 face-anti-spoofing.py --input input.jpg --detection

ailia-models/face_recognition/face-anti-spoofing at master · ailia-ai/ailia-models(Image from https://search.creativecommons.org/photos/df3a19c2-47ca-4f58-8aed-0dc62e89e9e9) Shape: (1, 3, 128, 128) RGB…github.com


ailia Inc. has developed ailia SDK, which enables cross-platform, GPU-based rapid inference.

ailia Inc. provides a wide range of services from consulting and model creation, to the development of AI-based applications and SDKs. Feel free to contact us for any inquiry.