ffletcherr / face-recognition-liveness

Face detection and recognition + liveness detection and spoofing attack recognition using onnxruntime. Includes an easy-to-use Flask API and Dockerfile.
37 stars 17 forks source link

Reynolds Dataset #2

Closed Adesoji1 closed 2 years ago

Adesoji1 commented 2 years ago

will the dataset contain both the real and fake images when creating a facebank?

ffletcherr commented 2 years ago

@Adesoji1

The facebank (csv files) does not serve any purpose other than indentity verification. So you can fill it with both live and fake data.

Adesoji1 commented 2 years ago

@ffletcherr . How do i Train with my dataset? In addition i tested the model when i ran the python webcam.py and most of the predictions were below 0.03 for a real object and for a spoof image, i got 0.23 upwards, how do i improve the model performance?

ffletcherr commented 2 years ago

@Adesoji1

The identity recognition pre-trained model came from the faceNet-PyTorch repo. You can read this for more detail. There is no need to train it again, so we only use it to achieve the embedding vector of a face and compare that with stored vectors of database faces in CSV files (and you can create your CSV file for your images using provided create_facebank.py script).

The liveness model is borrowed from the deepPixBis work. The authors provided some pre-trained models, and these models have different performances in different lighting situations. You can test them and use the best for your condition. For this reason PyTorch models must be converted to onnx models.

Adesoji1 commented 2 years ago

@ffletcherr Thanks, issue resolved