An implementation Geoemetric Face anti-spoofing algorithm based on the paper
Naitsat, Alexander, and Yehoshua Y. Zeevi. "Face anti-spoofing based on projective invariants."
2018 IEEE International Conference on the Science of Electrical Engineering in Israel (ICSEE). IEEE, 2018.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
To run the algorithm clone OpenFace into OpenFace-master and replace the following files by files from the repository root
- FaceLandmarkVidMulti.cpp -> OpenFace-master\exe\FaceLandmarkVidMulti\FaceLandmarkVidMulti.cpp
- LandmarkDetectorUtils.h -> OpenFace-master\lib\local\LandmarkDetector\include\LandmarkDetectorUtils.h
- LandmarkDetectorUtils.cpp -> OpenFace-master\lib\local\LandmarkDetector\src\LandmarkDetectorUtils.cpp
- Compile OpenFace with the replaced files.
- Use Visual Studio solution fiel on windows platforms. (Tested with Visual Studio 2015).
- On other platforms use OpenFace cmake file
- Connect two RGB cameras and run OpenFace-master\x64\Release\FaceLandmarkVidMulti.exe
- Use the following keys to control the demo
- Space bar to start recording. After the recording is finished results are displayed and saved in file according to given flags
- Press 'g' and 's' to label recorded videos as "genuine" and "spoofed" videos, respectively.
- Use the following command line flags to control the algorithm
- '-record_video' to save recording of each camera in a separate avi file in exe\FaceLandmarkVidMulti\videos
- '-load_video' to load stereo video stream from avi files listed in \exe\FaceLandmarkVidMulti\video_names_camera0.txt, video_names_camera1.txt
- '-annotation' to display classification results after each recording
- '-show_angle' to display Euler angles of the head pose.