serengil / deepface

A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
https://bit.ly/deepface-py
MIT License
14.62k stars 2.22k forks source link

Passed db_path does not exist!. #765

Closed chaimaOues closed 1 year ago

chaimaOues commented 1 year ago

hello, I saw your comment on your video channel "Real-Time Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion) in Python"and I followed your recommendation to install deepface with source code instead of using pip, and even I created a clean virtual environment for the deep face package but I got this error in DeepFace.stream("utterance_2.mp4") File "c:\users\ch\deepface\deepface\DeepFace.py", line 756, in stream frame_threshold=frame_threshold, File "c:\users\ch\deepface\deepface\commons\realtime.py", line 55, in analysis enforce_detection=False, File "c:\users\ch\deepface\deepface\DeepFace.py", line 441, in find raise ValueError("Passed db_path does not exist!") ValueError: Passed db_path does not exist! can you help me please

serengil commented 1 year ago

pass a db_path then

DeepFace.stream(db_path="some folder", source = "utterance_2.mp4")

chaimaOues commented 1 year ago

I did what you suggested but i had this error " folder! Validate .jpg or .png files exist in this path.", ValueError: ('There is no image in ', 'db', ' folder! Validate .jpg or .png files exist in this path.')can't we work with videos?

serengil commented 1 year ago

then put different folders

chaimaOues commented 1 year ago

I did what you suggested but i had this error " folder! Validate .jpg or .png files exist in this path.", ValueError: ('There is no image in ', 'db', ' folder! Validate .jpg or .png files exist in this path.')can't we work with videos?

serengil commented 1 year ago

message is clear. you have to have some image files in that folder.

chaimaOues commented 1 year ago

Thank you for your quick return, I thought that we can apply directly to a video by only images, thank you another time

serengil commented 1 year ago

it will do facial recognition on that video according to the images in db_path

chaimaOues commented 1 year ago

one last question please :the code is executed without error I had a file: db/Image/representations_vgg_face.pkl file. how can I directly see the result (the detection of emotions) ?

serengil commented 1 year ago

that pkl file stores the embeddings of images in db_path

you should see the real time results in the screen in real time

chaimaOues commented 1 year ago

I did not have the display of images in real time I only had the recording of a .pkl file

serengil commented 1 year ago

if it does not show anything, then cannot perform facial recognition then