Face Anti-Spoofing for Facial Recognition in Python

preview_player
Показать описание
In this video, we explore how to enhance the security of facial recognition systems using DeepFace in Python. We'll demonstrate real-time face anti-spoofing techniques to detect and prevent spoof attacks. You'll learn how to use the DeepFace library for face detection, face verification, face recognition, and attribute analysis (age, gender, emotion, and race). We'll show how to enable anti-spoofing in various functions like stream, extract_faces, verify, and find, ensuring robust protection against unauthorized access. Join us to see how easy it is to implement these advanced security measures and safeguard your systems from spoofing attempts.

Want more? Connect with me here:

If you do like my videos, you can support my effort with your financial contributions on
Рекомендации по теме
Комментарии
Автор

Thank you Sefik!

You're contribution to the world is wonderful. I appreciate what you are doing greatly!

tristdrum-workweek
Автор

Thank you! A really useful and interesting implementation of DeepFace. Ad maiora semper!

MicheleSblendorio
Автор

Serengil, we love you! God bless you!

masterspirit
Автор

Thank you for your video, but im keep getting spoofing even though im using my webcam on me no phones or paper detected?
is there away to optimize it to get accurate results?
face_objs = DeepFace.extract_faces(img_path=face_img, anti_spoofing=True)
for face_obj in face_objs:
if not face_obj["is_real"]:
# Spoofing detected, draw red rectangle
cv2.rectangle(image, (x, y), (x + w, y + h), (0, 0, 255), 2)
response_data["message"] = "Spoofing detected."
return response_data

ramyzeidan
Автор

Hey, can you please tell which loss function is used to train the VGGFace and Facenet models. I require them to build the fine tune pipeline. Thanks!

Shaurya-dzrd
Автор

ohhhh so basically, if there is a spoofed image has been inserted, the api will return 400 code response?

fras
Автор

brother, the exception is not thrown inside the api. if i compare image 1 (fake) and image 2 (real), it will not throw any exception and proceed with normal verification like usual. when i tested to compare verify from ipynb, it threw the expected exception.

i wanted to use the api because i'm developing a system that utilizes deepface. thank you in advance.

fras
Автор

Hello, great job Sefik, Just now I need to make a fake face detection but when using deepface in my computer it works great, but I need to do it on a serverless function and first, the size of image get big (2GB ~ 8GB) and the memory requirements too (8GB). I want to know how to remove all code except antispoofing module because thats what I only need. Thanks a lot.

Currently, we have a serverless function using dlib that performs face detection and face embedding but we need to complement it with another serverless function to make fake face detection score and joining this, we create an integrated service, but Deepface seems to be too big in order to be deployed as a serverless function.

yuryeuceda
Автор

can anti spoofing be used with the api?

fras