Thank you Sefik! You're contribution to the world is wonderful. I appreciate what you are doing greatly!
@masterspirit5 ай бұрын
Serengil, we love you! God bless you!
@MicheleSblendorio6 ай бұрын
Thank you! A really useful and interesting implementation of DeepFace. Ad maiora semper!
@Shaurya-dz4rd4 ай бұрын
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!
@sefiks4 ай бұрын
These are pre-trained models, I didn't train them. You have to investigate this from reference repos which are mentioned in the read me of the deepface.
@JohnCristophereCarlos17 күн бұрын
Are there a way to translate this library in javascript or web version, I have a web app and mobile app based in webview and wanted to implement this kind of liveness. Is it possible?
@sefiks17 күн бұрын
Deep Face Recognition With ReactJS and DeepFace: kzbin.info/www/bejne/f4nSkptsp82rl8U
@JohnCristophereCarlos17 күн бұрын
@@sefiks Thank you for the tutorial, this is great. My next question is that given that this is based on the API you call in the backend. On top of my mind is an approach wherein all the valdation for anti-spoofing is within the devices no need to hit the API endpoint so that it can support the offline mode.
@f1ras2176 ай бұрын
can anti spoofing be used with the api?
@sefiks6 ай бұрын
Yes, it can.
@f1ras2176 ай бұрын
@@sefiks what should i do? i already set the anti_spoofing = true but it still return the verification result as true. it should be false right if i put the spoofed image
@sefiks6 ай бұрын
@@f1ras217 it will throw exception if it is fake
@f1ras2176 ай бұрын
@@sefiks okay last. what kind of fake image that the model will throw exception? i'm currently using face verification. i tried one image is real, captured using the camera and another one is an image that has been captured from another device and i uploaded it into deepface. is that still count?
@sefiks6 ай бұрын
Try the one i tested in the video
@ramyzeidan5 ай бұрын
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
@sefiks5 ай бұрын
That is the most robust model i found :/
@f1ras2176 ай бұрын
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.
@sefiks6 ай бұрын
are you using v92? when i tested it as shown, I am getting the following response. I will add more details to the response message tonight. endpoint: localhost:5005/verify body: ``` { "img1_path": "/Users/sefik/Desktop/deepface/tests/dataset/img1.jpg", "img2_path": "/Users/sefik/Desktop/f1.jpeg", "anti_spoofing": true } ``` response: ``` { "error": "Exception while verifying: Exception while processing img2_path" } ```
@f1ras2176 ай бұрын
@@sefiks yes, i'm using v92 24-06-11 16:58:47 - Welcome to DeepFace API v0.0.92! endpoint: 127.0.0.1:5000/verify body: { "img1_path": "C:/Users/fiira/face_verification/elul.jpg", "img2_path": "C:/Users/fiira/face_verification/spoofing_example.jpg", "anti_spoofing": "True" } response: { "model": "Facenet", "similarity_metric": "euclidean", "threshold": 10, "time": 32.99, "verified": true } it is still detecting like usual... i'm still figuring out, where did i go wrong 😭
@f1ras2176 ай бұрын
@@sefiksyes, i am currently using v92. when i launched the api: 24-06-11 16:58:47 - Welcome to DeepFace API v0.0.92! endpoint: localhost:5000/verify body: ``` { "img1_path": "C:/Users/fiira/face_verification/elul.jpg", "img2_path": "C:/Users/fiira/face_verification/spoofing_example.jpg", "anti_spoofing": "True" } ``` response: ``` { "model": "Facenet", "similarity_metric": "euclidean", "threshold": 10, "time": 6.65, "verified": true } ``` i'm still figuring out, where did i go wrong.
@f1ras2176 ай бұрын
@@sefiks yes, i am using v92. i used the same header as you did, with my sample spoofing images. but the response is like this "model": "VGG-Face", "similarity_metric": "cosine", "threshold": 0.68, "time": 5.23, "verified": true
@f1ras2175 ай бұрын
ohhhh so basically, if there is a spoofed image has been inserted, the api will return 400 code response?
@sefiks5 ай бұрын
Yes
@yuryeuceda85905 ай бұрын
@@sefiks I did a change locally that returns a property with false instead of an exception because in my case is more useful. I have a really really urgent question, can you readme in the comments please
@yuryeuceda85905 ай бұрын
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.
@sefiks5 ай бұрын
@@yuryeuceda8590 then deepface may not be the right tool for you. Recommend to use anti spoofing repo directly: github.com/minivision-ai/Silent-Face-Anti-Spoofing
@yuryeuceda85905 ай бұрын
@@sefiks Thanks friend for your quick answer
@TechInstructorHub5 ай бұрын
i am not able to get green box
@sefiks5 ай бұрын
@@TechInstructorHub getting red or gray?
@TechInstructorHub5 ай бұрын
@@sefiks just web is open but nothing display like no red and green box
@sefiks5 ай бұрын
Seems your installation is problematic
@TechInstructorHub5 ай бұрын
@@sefiks I have cross check my installation and also update the deepface but not working properly
@TechInstructorHub5 ай бұрын
@@sefiks i am create a project. Face Attendance, in this project can i use the deepface in this project with the django framework. if i am performing i need to take deepface all source files code?