FacialLivenessTests
Liveness Tests For Facial Recognition
Install / Use
/learn @OhmGeek/FacialLivenessTestsREADME
LivenessTests
Liveness Tests For Facial Recognition. 4th year project for M.Eng Computer Science at Durham University. Supervised by Andrei Krokhin.
Introduction
The aim of this project is to understand the realm of facial liveness tests, and produce an investigation into the ease of creating a liveness as a service platform.
This project creates three new liveness tests, one for whole image assessment, one for facial structure assessment, and one for detecting mask attacks.
Dependencies:
- Python 3.5+
- Pip
- Pipenv for dependency management
- Numpy
- OpenCV
- SkImage
- Pywavelets
- Sci-kit Learn
- H5py
- Keras
- Tensorflow (either tensorflow for CPU, or tensorflow-GPU for GPU)
- face-recognition
- joblib
- pyvideoquality, v0.1.0-beta.5", from git = "https://github.com/OhmGeek/video-quality.git" (adapted to a Python library by me).
Folder Structure
app/
This contains all the source code necessary to run the program. README.md in the app folder explains what all the scripts do, and goes into detail about the namespaces.
datasets/
This needs to be a blank folder with a specific folder structure. Why? It's where the cached datasets are stored (in h5 format). This is done to improve performance.
Under the datasets folder, 3 folders are needed. The files shown below might not exist, but they will be created when running the application.
datasets/
mad/
mad.h5
nuaa/
nuaa.h5
replay-attack/
replayAttackdevel.h5
replayAttacktest.h5
models/
This is where functional models are kept. CNN and VoxNet used h5 to store weights, while the WIQA method uses pickle (because it's simple and easy).
How to run?
Navigate to the app folder.
Install pipenv and Python3.7 then run:
pipenv install
pipenv shell
Then run the python script as normal. A virtualenv with tensorflow CPU will be created for use.
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
