I have successfully tested the stream function from DeepFace library to get real time face detection and analysis data from my webcam. I call this method:
from deepface import DeepFace
DeepFace.stream(db_path = "C:/User/Sefik/Desktop/database")
It works well and displays crucial data such as face recognized, emotions etc... I would like to use the data it displays in my code but I don't know how to retreive it, something like:
from deepface import DeepFace
otp = DeepFace.stream(db_path = "C:/User/Sefik/Desktop/database")
otp['is_there_any_face'], otp['face_recognizedì], otp['emotions_detected']
Is there any function to retreive these data on my code? Thank you!
Stream function is not for this purpose. You need to customize the source code if you want to store something from displays.
Identity is found in this line and facial attributes are found in this line. You can save the values of these variables into a csv or whatever you want.