Giter Site home page Giter Site logo

prem95 / realtime-face-anti-spoofing Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 0.0 46.25 MB

Realtime Face Anti Spoofing with Face Detector based on Deep Learning using Tensorflow/Keras and OpenCV

License: MIT License

Python 67.89% Shell 0.19% Cython 7.84% C++ 18.96% CMake 0.28% C 4.83%
face-recognition face-anti-spoofing face-detector keras keras-tensorflow computer-vision tensorflow python opencv liveness-detection

realtime-face-anti-spoofing's Introduction

Hey there! I'm Prem Kumar

Check out my website ๐Ÿ‘‰ Prem Kumar

What Do I Do?

  • ๐Ÿค– Iโ€™m currently a Machine Learning Engineer in WISE AI building end to end eKYC pipeline for Face Anti Spoofing

  • ๐Ÿ“ I regularly write articles on Medium

  • ๐Ÿ“„ Take a look at my LinkedIn profile LinkedIn

  • ๐Ÿ‘‹ Iโ€™m looking to collaborate on good projects that will improve my skills

Connect with me ๐Ÿš€

https://www.linkedin.com/in/premstrk/ https://stackoverflow.com/users/9228381/kyle-nathan @premstroke95 @premstroke95

Frameworks/Tools I use:

bash docker flask flutter git grafana linux matlab nginx postman rabbitMQ scikit_learn tensorflow

Support Me:

premstroke95



realtime-face-anti-spoofing's People

Contributors

prem95 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

realtime-face-anti-spoofing's Issues

Model

Can you tell us how you trained the model?

Train model

Thanks for your great project. How can I train the model it will help me a lot.

In main.py file throwing an error "No module named Utility"

#21 from utility.video_utils import VideoUtils

On Github installation provides det_face folder. Cannot see a utility folder in face_det folder. Where should i get this folder?

How would i utilize it ?

Please provide me the steps to download this folder which utlized by this project.

No file named utility

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

No module named 'FaceBoxes.utils.nms.cpu_nms'

Hi there I'm having this issue

Traceback (most recent call last):
  File "main.py", line 4, in <module>
    from utility.video_utils import VideoUtils
  File "C:\Users\hyper\OneDrive\Desktop\face-liveness-detector\utility\video_utils.py", line 9, in <module>
    from face_detector import FaceDetector
  File "C:\Users\hyper\OneDrive\Desktop\face-liveness-detector\face_detector.py", line 7, in <module>
    from FaceBoxes import FaceBoxes
  File "face_det\FaceBoxes\__init__.py", line 1, in <module>
    from .FaceBoxes import FaceBoxes
  File "face_det\FaceBoxes\FaceBoxes.py", line 10, in <module>
    from .utils.nms_wrapper import nms
  File "face_det\FaceBoxes\utils\nms_wrapper.py", line 10, in <module>
    from .nms.cpu_nms import cpu_nms, cpu_soft_nms
ModuleNotFoundError: No module named 'FaceBoxes.utils.nms.cpu_nms'

OS : Windows 11
Python Version 3.8.4

There is no updated model

In your commit, you updated new model fas_94.h5

but there is no updated model. Only old model antispoofing.h5 existed.

No update?

Meaning of output_tensor[0]

Hello, congrats for great work.

I figure out the output_data has 2 positions.

np.round(output_data[:, 1][0], 3) .

In your example, you used the position 1 to calculate the predict score. What's the meaning of the position 0, in this model? Could it be the confidence about the prediction?

Access to the model

I tried to contact [email protected] to obtain access to the model file. However, i couldn't send mail to that adress. Can you help me to obtain access to the model file?

input shape of anti_spoofing.h5

If I want to use anti_spoofing.h5 separately, what image dimension should I pass to the model?

The model shows the following summary:

Model: "sequential"
_________________________________________________________________
 Layer (type)                Output Shape              Param #
=================================================================
 conv2d (Conv2D)             (None, 112, 112, 18)      504

 activation (Activation)     (None, 112, 112, 18)      0

 batch_normalization (BatchN  (None, 112, 112, 18)     72
 ormalization)

 conv2d_1 (Conv2D)           (None, 112, 112, 18)      2934

 activation_1 (Activation)   (None, 112, 112, 18)      0

 max_pooling2d (MaxPooling2D  (None, 56, 56, 18)       0
 )

 batch_normalization_1 (Batc  (None, 56, 56, 18)       72
 hNormalization)

 conv2d_2 (Conv2D)           (None, 56, 56, 36)        5868

 activation_2 (Activation)   (None, 56, 56, 36)        0

 batch_normalization_2 (Batc  (None, 56, 56, 36)       144
 hNormalization)

 conv2d_3 (Conv2D)           (None, 56, 56, 36)        11700

 activation_3 (Activation)   (None, 56, 56, 36)        0

 max_pooling2d_1 (MaxPooling  (None, 28, 28, 36)       0
 2D)

 batch_normalization_3 (Batc  (None, 28, 28, 36)       144
 hNormalization)

 flatten (Flatten)           (None, 28224)             0

 dense (Dense)               (None, 128)               3612800

 activation_4 (Activation)   (None, 128)               0

 dropout (Dropout)           (None, 128)               0

 dense_1 (Dense)             (None, 2)                 258

 activation_5 (Activation)   (None, 2)                 0

=================================================================
Total params: 3,634,496
Trainable params: 3,634,280
Non-trainable params: 216
_________________________________________________________________

What is the input shape?

Missing utility.video_utils

Describe the bug
I'm trying to run the project but got an missing module error

โžœ  face-liveness-detector (main) โœ” python3 main.py

Traceback (most recent call last):
  File "main.py", line 4, in <module>
    from utility.video_utils import VideoUtils
ModuleNotFoundError: No module named 'utility'

To Reproduce
Steps to reproduce the behavior:

  1. Clone project
  2. Build face_det folder
  3. Run python3 main.py
  4. Got ModuleNotFoundError

Expected behavior
The project runs fine

Desktop (please complete the following information):

  • OS: MacOS

onnx model?

hi @Prem95 ,
congrats for great work.

Is there onnx model available for antispoof.h5?

Thanks

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.