Thank you for the amazing project and the support you have given to the community over the years. Kudos 🙏
@sefiks Жыл бұрын
Please do not forget to star the repo :)
@FrankZChen Жыл бұрын
Thanks!
@sefiks Жыл бұрын
👋🙏
@leeser60522 жыл бұрын
thanks for this video . How to adjust the interval of video recognition to within one second to make the recognition result smoother
@sefiks2 жыл бұрын
interval must be an integer and it might be 1 second in the best case
@sardorbekyorqulov8 ай бұрын
Hello. Very understandable and fun project.
@vivamais_sejamais2 жыл бұрын
How can I do live analysis without pausing or causing delays to the livestream? Do I have to save the video and analyze it, and later display the info on the live stream? Ps: I love your work!
@sefiks2 жыл бұрын
Working on a saved video works well. You do not have to do it in real time in this way. No matter how strong hardware you have, these stuff are costly operations and hard to do it in real time.
@antoniobautista15184 жыл бұрын
great work! Thanks!
@railgun08075 ай бұрын
I have looked into this library and the other face-recognition library for Python, this one also the gender, age and emotion which are nice addition feature than just identify person. One question tho, does the "stream" have any way i can obtain those information? Or the function is still not available? Thanks in advance!
@sefiks5 ай бұрын
Stream function is just for visualization, not to store any information
@railgun08075 ай бұрын
@@sefiks i see... so if use "verify" or "find" function, is it possible to use the frame directly from cv2.VideoCapture?
@sefiks5 ай бұрын
@@railgun0807 yeah, definetely
@estherli8 ай бұрын
Thank you for the great work! But I have a question tho. I'm using deepface for a project that recognises real-time emotion, how can I get these collected data? I can't find where the data had save in. Thanks in advance!
@sefiks8 ай бұрын
You cannot collect it from stream service.
@estherli8 ай бұрын
@@sefiks I see. Thx!
@dennisasamoah22134 жыл бұрын
great stuff , can you do a face liveness tutorial
@sefiks4 жыл бұрын
I will soon
@dennisasamoah22134 жыл бұрын
@@sefiks ,thank you
@jorgecarreterogulias77483 жыл бұрын
Hello thank you for everything, one question how do i get the result of the stream so i can redirect to a webpage or something similar? Or if the database face could not found, then know what happened.
@sefiks3 жыл бұрын
You cannot do it as is. You should customize the library.
@nafizsadman6626 Жыл бұрын
Amazing work! Could you point me out how I can use the library on a video (mp4). I am trying to use it on the RAVDESS dataset to recognize emotions. But cant' seem to find API to pass videos directly as a path. UPDATE: I can set the video file path as source =. But I get error at db_path I am not planning to do face recognition. But Face detection for face emotion recognition. Is there a way to turn off the db_path? How can I retrieve the embedding after analysis of the video?
@sefiks Жыл бұрын
Set an empty folder to db path
@nafizsadman6626 Жыл бұрын
@@sefiks I have tried that but it searches for images in the folder, thus raises an error..
@НікітаГунько-к4л4 жыл бұрын
Great! But can we start a permanent video stream, and not just once every 5 seconds?
@sefiks4 жыл бұрын
I will wait until its process completed. But still you can do. In the source code, deepface/deepface/commons/realtime.py has some arguments set manually time_threshold = 5; frame_threshold = 5 If you decrease those values, then it will process permanent video.
@bigblackballmen3 жыл бұрын
@@sefiks I cannot find them
@abdulrahmansabri4547 Жыл бұрын
Thank you for your efforts. Do you know how to use stream function in colab? Thanks in advance
@sefiks Жыл бұрын
unfortunately, colab cannot access your webcam.
@algorithmanalysis94472 жыл бұрын
Selamlar Şefik, Bir proje de kütüphanenizi kullanmaya çalışıyorum. Kullandığım cihaz raspberry pi 3b. Ancak burada aşağıdaki hatayı alıyorum. Buna bir çözüm öneriniz var mı? İnternette araştırdım ancak bir çözüme ulaşamadım. Using TensorFlow backend. Detector backend is opencv WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:66: The name tf.get_default_graph is deprecated. Please use tf.compat.v1.get_default_graph instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:541: The name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:4432: The name tf.random_uniform is deprecated. Please use tf.random.uniform instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:4267: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:148: The name tf.placeholder_with_default is deprecated. Please use tf.compat.v1.placeholder_with_default instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:3733: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version. Instructions for updating: Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:190: The name tf.get_default_session is deprecated. Please use tf.compat.v1.get_default_session instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:197: The name tf.ConfigProto is deprecated. Please use tf.compat.v1.ConfigProto instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:203: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:207: The name tf.global_variables is deprecated. Please use tf.compat.v1.global_variables instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:216: The name tf.is_variable_initialized is deprecated. Please use tf.compat.v1.is_variable_initialized instead. WARNING:tensorflow:From /home/pi/.local/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py:223: The name tf.variables_initializer is deprecated. Please use tf.compat.v1.variables_initializer instead. Segmentation fault
@sefiks2 жыл бұрын
Bunlarin hic biri hata degil sadece uyari almissiniz
@algorithmanalysis94472 жыл бұрын
@@sefiks Segmentation fault şeklinde uyarıyı en son verdikten sonra Raspberyy pi da programı kapatıyor.
@algorithmanalysis94472 жыл бұрын
@@sefiks Galiba raspberry pi için deepface kütüphanesini kullanmak mümkün değil cihazın yetersizlikleri sebebiyle.
@sefiks2 жыл бұрын
aslında ben kullandım. ancak sizin yaşadığınız problemi anlyabileceğimiz bir hata mesajı vermiyor cihaz.
@algorithmanalysis94472 жыл бұрын
@@sefiks Segmentation fault konusunu çözdüm. Cihaz Raspberry Pi 3B modeli. Emotional modelleme yaparken cihazin bellek veya benzer bir yetersizlik yaşıyor. Emotional modellemeyi kapattim zaten siz metota parametre olarak eklemissiniz. Bunun uzerine sorun çözüldü. Belki de sd kart ile de ilgili olabilir eski bir sd kart kullanmıştım. Ancak sonuç olarak bu şekilde çözüme kavuştu.
@Okuramachi10 ай бұрын
Thank you for the amazing project, but what if there is nothing come out when i run the code, i can see the window comeout and i can see my face as well, and i have already creat a database folder and put my photo in it, is the selfik nessary?
@sefiks10 ай бұрын
you may not set the db_folder correctly
@divyasree532 жыл бұрын
I love your work! How can I connect multiple IP camera with deepface??
@sefiks2 жыл бұрын
sincerely no idea
@JamalKhan-zl8lu2 жыл бұрын
Sir should we auto-delete the pickle file or recreate the pickle file.
@sefiks2 жыл бұрын
if you need, yes you can
@JamalKhan-zl8lu2 жыл бұрын
@@sefiks sir then how should I do can you guide me?
@taqikhan54183 жыл бұрын
love it. what if i only want to recognize faces and dont want other stuff like age gender etc?
@sefiks3 жыл бұрын
Set enable_face_analysis argument to False in the stream function
@nesrinemejbri47342 жыл бұрын
Hi, thank you for this video. What if I want to display only the dominant emotion and nothing else?
@sefiks2 жыл бұрын
currently, if enable_face_analysis argument of stream function is set to True, then it applies age, gender and emotion. This is the default behivour. You cannot disable age and gender predictions. I can add this functionality in the next release.
@Павел-ю5и Жыл бұрын
Hello everyone, as soon as I pass the db_path parameter, I get an AttributeError: module 'deepface.commons.functions' has no attribute 'preprocess_face'. Did you mean: 'preprocess_input'?What should I do? Thank you in advance!
@sefiks Жыл бұрын
there is a bug in the current pip release. use source code instead of pip package. ```shell $ git clone github.com/serengil/deepface.git $ cd deepface $ pip install -e . ```
@khawar67sp2 жыл бұрын
Can i paste the code of real-time.py into notebook cell and get the same window as you got? M trying to do that but no window appears
@sefiks2 жыл бұрын
jupyter will not let you to do this
@taqikhan54183 жыл бұрын
When i installed opencv with cmake and cuda Deepface gave error, but its running ok on opencv-python installed using pip. Please Can u explain how to improve performance by utilizing gpu? Thanks in advance.
@sefiks3 жыл бұрын
you need to install tensorflow-gpu before installing deepface
@taqikhan54183 жыл бұрын
@@sefiks i have uninstalled deepface then reinstalled it after installing tensotflow gpu but still it is using cpu power instead of gpu. Can you provide any link of how to use gpu with deepface library. Thanks
@DAFFIN693 жыл бұрын
i am stuck in AttributeError: module 'deepface.commons.functions' has no attribute 'get_opencv_path'
@sefiks3 жыл бұрын
my fault. please update deepface to 0.0.53 version.
@DAFFIN693 жыл бұрын
@@sefiks i was update deepface 0.053, but in still not work, because in functions.py not found def get_opencv_path, please advise sefik ### this code in realtime.py , line 107 - 109### opencv_path = functions.get_opencv_path() face_detector_path = opencv_path+"haarcascade_frontalface_default.xml" face_cascade = cv2.CascadeClassifier(face_detector_path)
@sefiks3 жыл бұрын
@@DAFFIN69 that line is updated in 0.0.53: opencv_path = OpenCvWrapper.get_opencv_path() could you confirm that you are using 0.0.53?
@DAFFIN693 жыл бұрын
@@sefiks okay, work sefik, thanks very much for the update......1000% work
@sefiks3 жыл бұрын
@@DAFFIN69 super!
@thelazydeveloper3 жыл бұрын
can we make it do specific tasks only for example only age or gender ... please
@sefiks3 жыл бұрын
No, you can't by default. It requires a little bit modification in the source code.
@lifewithchels4 жыл бұрын
Can you get the emotions to be printed out in JSON as well?
@sefiks4 жыл бұрын
Please watch this video: kzbin.info/www/bejne/fYWVhpiEbZp1mqM . DeepFace already covers this.
@lifewithchels4 жыл бұрын
Sefik Ilkin Serengil is there a way to print JSON in real time? Instead of passing in only one image as a parameter via the Deepface.analyze() method?
@rikitiky3 жыл бұрын
Very interesting project, thank you! I want to use it in my school project, but my PyCharm can't find the image and says "WARNING: There is no image in this path. Face recognition will not be performed." What can I do about this problem?
@sefiks3 жыл бұрын
You should delete the trouble causing item in your db_path
@rikitiky3 жыл бұрын
@@sefiks Thank you! I solved this problem, thanks for your advise!
@thelazydeveloper3 жыл бұрын
can we make it with opencv getting a numpy array and doing same thing please
@sefiks3 жыл бұрын
opencv does not come with a out-of-the-box modern facial recognition module unfortunately
@taylanylmaz70004 жыл бұрын
Kodlamayı yaparken bilgisayarınızda yüklü olan Tensorflow, Numpy ve Python programlarının hangi sürümleri olduğunu yazabilirseniz sevinirim. İyi günler, kolay gelsin
@sefiks4 жыл бұрын
Python 3.6.4, TF 1.9.0, Keras 2.2.0, numpy 1.17.0
@1ycx4 жыл бұрын
Is it possible to use multiple cameras ?
@sefiks4 жыл бұрын
Nope, it supports just single cam.
@paulfaverjon72943 жыл бұрын
Hello, thank you for the tuto, when running the code, even only the first line 'from deepface import DeepFace" I get an error "Illegal Instruction : 4 " Can anyone help me ?
@sefiks3 жыл бұрын
It seems that your installation is not okay.
@paulfaverjon72943 жыл бұрын
@@sefiks Hi, thank you for your answer. I poste here how I got away with it as some beginner coder don't have the reflex of going ti guthub s overflow. The problem was not with deepface but with tensorflow. The normal version doesn't work on M1. So I used miniforge to download a mac version of TF, then installed deepface with no dependancies in a venv
@sardorbekyorqulov8 ай бұрын
With this technology, how many faces can be detected at 1 time?
@sefiks8 ай бұрын
No limit
@sanjurokuwabatake55414 жыл бұрын
can the data got in streaming be stored in a file, pls respond im working on it
@sefiks4 жыл бұрын
It can but currently stream function does not support this. I recently added a find function and it does this. You can find it here: kzbin.info/www/bejne/fqPNoWB7iNmAldU
@sanjurokuwabatake55414 жыл бұрын
Sefik Ilkin Serengil thank you sefik 🤝
@fatosderdicok30664 жыл бұрын
merhaba kolay gelsin öncelikle. Ben resimler özerin de olanları Google colab özerinde rahatlıkla yapabiliyorum. Ama gerçek zamanlı olunca google colab ile sizin kodlarınız farklı oluyor ve bu yüzden de yapamıyorum. Lütfen Google colab özerinde nasıl yapabileğim hakkında sizden bilgi istesem çok şey mi istemiş oluyorum.
@fatosderdicok30664 жыл бұрын
fotolar özerin de benim çıktılarım {'age': 32.26633552210522, 'dominant_emotion': 'neutral', 'dominant_race': 'middle eastern', 'emotion': {'angry': 4.419447109103203, 'disgust': 0.00012736104508803692, 'fear': 5.354632064700127, 'happy': 0.3518438432365656, 'neutral': 73.14058542251587, 'sad': 16.620807349681854, 'surprise': 0.11255834251642227}, 'gender': 'Man', 'race': {'asian': 0.014853122411295772, 'black': 0.07524138782173395, 'indian': 22.850976884365082, 'latino hispanic': 10.078267008066177, 'middle eastern': 60.04456877708435, 'white': 6.936091929674149}} sizin gibi daha derli toplu görünmesi için ne yapabilirrim.
@sefiks4 жыл бұрын
colab web cam'inize erişemez. sizin derli toplu dediğiniz stream fonksiyonu ama siz analyze fonksiyonunu denemişsiniz.
@julietamendez59112 жыл бұрын
How do we turn off the stream? It just runs infinitely
@sefiks2 жыл бұрын
you cannot. infinity is the purpose of the stream.
@동환-g7l2 жыл бұрын
Hello! First of all, 'Deepface' is really cool. I want to apply to school projects, In real time, I should be detected the emotion of audiences ,the face of many people,.. Is this possible with Deepface?
@sefiks2 жыл бұрын
yes, sure!
@pavankumardasari6606 Жыл бұрын
How to use custom data with theirs
@sefiks Жыл бұрын
define custom data please
@komailwael97804 жыл бұрын
Hello, thanks for this work. If possible, I can get a code. Just display the image of the person over the same person in real-time face recognition
@sefiks4 жыл бұрын
If you set enable_face_analysis argument to False, then it just applies facial recognition. Try this: DeepFace.stream(db_path = 'C:/my_db', enable_face_analysis = False)
@komailwael97804 жыл бұрын
Sefik Ilkin Serengil thanks
@bhagyashreetammanagoal5093 Жыл бұрын
Sir where I can get this source code
@sefiks Жыл бұрын
Github.com/serengil/deepface
@البروفيسور-خ6ر2 жыл бұрын
I want source code pls
@sefiks2 жыл бұрын
source courde is just one line of code shown in this video.
@البروفيسور-خ6ر2 жыл бұрын
@@sefiks I want source code in python pls help me
@isakmessihi46874 жыл бұрын
Hi, Can you collaborate with me on a program?
@sefiks4 жыл бұрын
Why not :)
@naposhen22194 жыл бұрын
How to use/run this code?
@sefiks4 жыл бұрын
Video explains how to use and run it. Did you get any trouble.
@naposhen22194 жыл бұрын
@@sefiks in visual studio code need to create new file ?
@tunateke98064 жыл бұрын
👍👍👍👍
@ShubhamGupta-lv3cv2 жыл бұрын
Can u please tell how to stop DeepFace.stream(), I always have to restart the kernel.