I have been following you for the past year, and each time you release new and exciting videos, I thoroughly enjoy them and learn a lot. Thank you so much for creating such amazing content. Keep up the great work!
same error: I cant understand why this appears in terminal "vgg_face_weights.h5 will be downloaded..." and never ends, so then it is everytime No Match. Can you explain what is "vgg_face_weights.h5 will be downloaded..."
code works in intelij but doesn't work when i pack it in .exe file via pyinstaller. firstly gives an error: "autograph is not available in this environment: functions lack code information. this is typical of some environments like the interactive python shell". then program starts to work, but tasks with face recognition doesn't do anything. what should i do?
I think pyinstaller doesn't support all of the libraries for python, which sucks. I actually made a UA-cam video downloader today, with tkinter and pytube. It worked, but when I packed it as an exe, it couldn't even run and gave me an error that I don't even remember.
When I tried this, faced some problem like the vggface weights kept downloading for the whole time. For that I just ran the .verify() function(deleted other part) that triggered the download process swiftly. After that I ran the whole code there was showing "No match" all the time, but after sitting a lil bit far from the cam then it detected. Weired probs😶
Thank you. I had the same problem and did it like you said. It worked fine. For more clarity, I did the following to trigger weights download in separate cell. ---------------------------------------------------------------------------------- reference_img = cv2.imread("reference.jpg") reference_img2 = cv2.imread("reference_2.jpg") DeepFace.verify(reference_img, reference_img2)
Hi, excellent tutorial. I am running this on a Macbook OSX 10.15.7, OpenCV version 4.6.0. First issue I had seemed to point to protobuf, so I uninstalled the current version and installed protobuf 4.21.5. Now when I start the program the only message I receive is: "2023-12-03 10:10:14.984020: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations. To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags." I get no video window?
@@anandjs8612 Which part? Once I had installed protobuf 4.21.5 and corrected my spelling of HERSHEY it just worked. At first I thought it was not working when I received the message about Tenserflow Binary, but after a few more seconds the video windowed opened and started to work.
Thank you! Is there any chance that we can connect Phyton to other camera and then detect when someone is seeking for help, are they feeling safe or do they trust to the product?
I'd like to ask, is tensor cores required for this live face recognition? I have a ultrabook and I wonder if this can run on my laptop. If not, can you give me some projects using Python 3.12 and OpenCV with same features? thank u so much
There was some issue for me with the library tensorflow in losses: tf.compat.v1.losses.sparse_softmax_cross_entropy: "int32", It says that use this instead of the deprecated version. I replaced it using both os and manually in the file but couldn't get it working. Any help is appreciated.
For me it works if i use a refrence image and i hold up the same exact image infront of the camaar, but if i use a refrence image of me and actually go infront of the camara it does not work
Your are explaining very clean and it's easy to understand thanks for video. But it dose not work it gaves me this error [ WARN:0@0.020] global loadsave.cpp:241 findDecoder imread_('1232.png'): can't open/read file: check file path/integrity!! could you help pleas! Thanks
hi, i'm wathed your tutorial several times and i even copied your could but i get this error every time ,could you help me with it : File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper File "h5py\h5f.pyx", line 102, in h5py.h5f.open OSError: Unable to synchronously open file (truncated file: eof = 4653056, sblock->base_addr = 0, stored_eof = 580085408)
Same Problem here. I thought maybe my laptop camera sucks so I even tried using my phone's rear camera using DroidCam and still it keeps saying No Match
you have to install pip or somthing. I did not know what to do and a quick google searche helped me. I searched somthing like how to get pip(Im not sure what i did couse i am rechecking theses comments aftersome time couse i needed some information)
Just have another reference img.jpg and name it reference img 2.jpg and write Cv2.imread(reference img .jpg , reference img 2. jpg) and add 3 , 4 as many as you like just make sure to reduce the counter percentile in half(15%) per reference img since it is now looking for 2 or more faces per single frame that should do the trick.
@@kasozimarktum4925 make sure that numpy and cv are up to date and also the first time you are going to start the program it will start by downloading the reference img that you had put in so it will take a bit more time at first to start you should see the img being downloaded in the terminal if the counter percentile makes it so that it keeps on triggering the download again and again just increase the percentile to 3500000000% (Something large) so that it may have time to download the img later just put counter back to normal. Hope this helps!
@@mohamedfatheddine1447 is your reference img file in the same folder as the program? if yes than know that your reference img must be taken at the same lighting as you are testing, If that does not work I will recommend to either look for errors in the code or to re-write the complete code again at this point it really comes down to how determined you are to have a security face recognition :)
I got the same error even though I cannot find some references in internet regarding this problem. Seems weird :/ The error apears in line "from deepface import DeepFace" so there is something wrong with the library itself
Traceback (most recent call last): File "d:\20a31a4429\Face.py", line 3, in import opencv as cv2 ModuleNotFoundError: No module named 'opencv' 😔 What should I do?
guys can anyone check this error in this code and tell me the solution File "f:\PYTHON\PYTHON PROGRAMS 24-25\DOOM GAME\import threading.py", line 50, in cv2.imshow("video", frame) cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1301: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage' , this is the error which i am getting
Why don’t you just make python comments instead of talking??? You better create a very simple program then adding it up to the final level it would be much more easier to people to grab it
Hey 👋 I'm the creator of DeepFace. Thank you for sharing this video to the community.
why does my program say :The conflict is caused by:
deepface 0.0.80 depends on tensorflow>=1.9.0
when trying to install deepface
@@benwilliams5622 you may have older tf version
@@benwilliams5622try installing tensorflow and updating it
how it works? face color recognition?
i think its
@@bhhb-d5i
I have been following you for the past year, and each time you release new and exciting videos, I thoroughly enjoy them and learn a lot. Thank you so much for creating such amazing content. Keep up the great work!
Your are explaining very clean and it's easy to understand thanks for video.
hhere's the code guys "
import threading
import cv2
from deepface import DeepFace
cap = cv2.VideoCapture (0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 480)
counter = 0
face_match = False
reference_img = cv2.imread("reference.jpg")
def check_face(frame):
global face_match
try:
if DeepFace.verify (frame, reference_img.copy())['verified']:
face_match=True
else:
face_match=False
except ValueError:
face_match=False
while True:
ret, frame = cap.read()
if ret:
if counter % 38 == 8:
try:
threading. Thread(target=check_face, args=(frame.copy(),)).start()
except ValueError:
pass
counter += 1
if face_match:
cv2.putText(frame, "MATCH!", (20, 450), cv2.FONT_HERSHEY_SIMPLEX, 2, (0, 255, 0), 3)
else:
cv2.putText(frame, "NO MATCH!", (20, 450), cv2.FONT_HERSHEY_SIMPLEX, 2, (0, 0, 255), 3)
cv2.imshow("video", frame)
key = cv2.waitKey(1)
if key == ord("q"):
break
cv2.destroyAllWindows()
Thank you
Goated comment
Does it only work with these codes?Does it have any addictions?
Destroy all window 😅 no man thanks
how to download model deepface
same error: I cant understand why this appears in terminal "vgg_face_weights.h5 will be downloaded..." and never ends, so then it is everytime No Match. Can you explain what is "vgg_face_weights.h5 will be downloaded..."
Same problem
I also can't understand
Plz tell me
I just increased time from %30 to %1000 and after to %100, then wait until weights download complete (100%). All running good.
How did you get it to finish downloading?
code works in intelij but doesn't work when i pack it in .exe file via pyinstaller. firstly gives an error: "autograph is not available in this environment: functions lack code information. this is typical of some environments like the interactive python shell". then program starts to work, but tasks with face recognition doesn't do anything. what should i do?
I think pyinstaller doesn't support all of the libraries for python, which sucks. I actually made a UA-cam video downloader today, with tkinter and pytube. It worked, but when I packed it as an exe, it couldn't even run and gave me an error that I don't even remember.
It is not working for me. It keeps running forever.
same man
I am facing a challenge to extract the specific field data from pdf file , how to extract efficiently . please make a video on this
Instead of web cam I wants to use live desktop screen to detect objects, is it possible? And show in desktop rectangle itself?
So I have the file running of my photo, but it isn't recognizing the image, still claims NO MATCH continuously
same for me.. no match is always there, maybe there are specifications for the size of the reference image
Same plz tell me how can i solve this problem
The same also showing NO MATCH always.
Same problem if someone can help me
I am too getting the same error
When I tried this, faced some problem like the vggface weights kept downloading for the whole time. For that I just ran the .verify() function(deleted other part) that triggered the download process swiftly.
After that I ran the whole code there was showing "No match" all the time, but after sitting a lil bit far from the cam then it detected.
Weired probs😶
Thank you. I had the same problem and did it like you said. It worked fine.
For more clarity, I did the following to trigger weights download in separate cell.
----------------------------------------------------------------------------------
reference_img = cv2.imread("reference.jpg")
reference_img2 = cv2.imread("reference_2.jpg")
DeepFace.verify(reference_img, reference_img2)
@@nabinhitang1730 ah ! glad to hear
great video i love it but mine says that there is no attribute named copy. can you help?
check for a typo mistake, it might work
from deepface import DeepFace
Hi, excellent tutorial. I am running this on a Macbook OSX 10.15.7, OpenCV version 4.6.0. First issue I had seemed to point to protobuf, so I uninstalled the current version and installed protobuf 4.21.5. Now when I start the program the only message I receive is: "2023-12-03 10:10:14.984020: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags." I get no video window?
OK so I had spelt HERESHY incorrectly :-) should have been HERSHEY!! My bad. However I never seem to get a face match?
Sorry sorted now, seems to be working.
@@Sternhammer89how’d you fix it
@@anandjs8612 Which part? Once I had installed protobuf 4.21.5 and corrected my spelling of HERSHEY it just worked. At first I thought it was not working when I received the message about Tenserflow Binary, but after a few more seconds the video windowed opened and started to work.
@@Sternhammer89 ok interesting. For me I’m just always getting no match
Can you advise what versions of opencv-python , deepface, and threading were used in this program?
Thank you! Is there any chance that we can connect Phyton to other camera and then detect when someone is seeking for help, are they feeling safe or do they trust to the product?
whats the shortcut for zooming out in python
how did you use the pip thing?
please tell me any mentor , which field is best in python except data science or AI
I'd like to ask, is tensor cores required for this live face recognition? I have a ultrabook and I wonder if this can run on my laptop. If not, can you give me some projects using Python 3.12 and OpenCV with same features? thank u so much
Are you planning to upload source code on git?
import threading
import cv2
from deepface import DeepFace
cap = cv2.VideoCapture(0, cv2.CAP_DSHOW)
cap.set(cv2.CAP_PROP_FRAME_WIDTH,640)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT,480)
counter = 0
face_match= False
reference_image = cv2.imread(r"c:\Users\Reuben Anil\PycharmProjects\pythonProject3\deepface\selfie.jpeg")
def check_face(frame):
global face_match
try:
if DeepFace.verify(frame, reference_image.copy())['verified']:
face_match=True
else:
face_match=False
except ValueError:
print("Upar ka Value Error")
face_match=False
while True:
ret, frame = cap.read()
if ret:
if counter % 30 == 0:
try:
threading.Thread(target=check_face, args=(frame.copy(),)).start()
except ValueError:
pass
print("Not a Match")
counter += 1
if face_match:
cv2.putText(frame, "MATCH!", (20,450), cv2.FONT_HERSHEY_SIMPLEX, 2, (0,255,0), 3)
else:
cv2.putText(frame, "NOT A MATCH!", (20,450), cv2.FONT_HERSHEY_SIMPLEX, 2, (0,0,255), 3)
cv2.imshow("video", frame)
key = cv2.waitKey(1)
if key == ord("q"):
break
cv2.destroyAllWindows()
There was some issue for me with the library tensorflow in losses:
tf.compat.v1.losses.sparse_softmax_cross_entropy: "int32",
It says that use this instead of the deprecated version. I replaced it using both os and manually in the file but couldn't get it working.
Any help is appreciated.
For me it works if i use a refrence image and i hold up the same exact image infront of the camaar, but if i use a refrence image of me and actually go infront of the camara it does not work
Thanks for sharing. I think the Time complexity of this code is quadratic, n squared?
How much time does it takes to run?
What is this python version
Unresolved reference 'check_face' an error from your line 28, what should i do
Why do you use threads here? How does it improves the code and in general, when to use threads?
to handle multi-task processing at the same time
So would this particular project fall under machine learning?
the code is working partially, the camera pops up but dont show any message of match or no match (using a macbook air and pycharm), can you help me?
don't stop bro. you're awesome
How can i add reference image
lll
Pair this with his object detection python script and you got a security camera
What IDE are you using for coding in the video?
Pycharm if you are still interested
Do I need to download deepface separate?
can it work in web application in both desktop, android and iPhone
is Deepface compatible with OPENCL or RocM ? Cannot install CUDA drivers due to AMD Radeon graphics card
Is it possible using the same technique to build a biometric passport photo creator
this is not working for me. i run the code and there is no window opening with image of the camara.
same
@@rolandfebrian6711 i think i fixe it. You have to change the number.
what if we have to use for a data set
How can i download deepface module?!
Can anyone please tell me Which packeges..? I can't hear properly..
Your are explaining very clean and it's easy to understand thanks for video. But it dose not work it gaves me this error [ WARN:0@0.020] global loadsave.cpp:241 findDecoder imread_('1232.png'): can't open/read file: check file path/integrity!!
could you help pleas!
Thanks
hi, i'm wathed your tutorial several times and i even copied your could but i get this error every time ,could you help me with it :
File "h5py\_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py\_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py\h5f.pyx", line 102, in h5py.h5f.open
OSError: Unable to synchronously open file (truncated file: eof = 4653056, sblock->base_addr = 0, stored_eof = 580085408)
does it work for mac???
Bro create a code to crate handwriting in NOTE PAD
Pls help me
It says 'NoneType' has no attribute 'copy'.
Any idea what to do
Someone?
@@OormilaRaj remove the copy method, after that my deepface model started to download from github, will share update after it downloads
Did anybody find it suspicious he did not run the code for us to see, cause mine is not working at all.
its really funny to see the younger youtuber become older ^^
What specs is your computer?
Which dataset is used for this
what is reference .jpg
can you upload the source code
Mate do a tutorial for live number plate recognition anpr system. Most of them are paid services. Thanks for the video anyway.
i got an "Illegal instruction (core dumped)" :(
can u do this with raspberry pi
i cant open camera of me pc plz help
i don't know if your camera is good or what but its not recognizing me.
Can you cover GPT4V on CCTV?
Someone is probably working on a python iphone with neuralnine's videos
Bro it shows no match always 😢
Same Problem here. I thought maybe my laptop camera sucks so I even tried using my phone's rear camera using DroidCam and still it keeps saying No Match
pip doesnt work, im using python 3.11 and dont know what to do
you have to install pip or somthing. I did not know what to do and a quick google searche helped me. I searched somthing like how to get pip(Im not sure what i did couse i am rechecking theses comments aftersome time couse i needed some information)
Hey man, great tutorial! But I would like to ask, what if u want to have multiple face reference?
Just have another reference img.jpg and name it reference img 2.jpg and write Cv2.imread(reference img .jpg , reference img 2. jpg) and add 3 , 4 as many as you like just make sure to reduce the counter percentile in half(15%) per reference img since it is now looking for 2 or more faces per single frame that should do the trick.
Hey man... mine doesn't work
@@kasozimarktum4925 make sure that numpy and cv are up to date and also the first time you are going to start the program it will start by downloading the reference img that you had put in so it will take a bit more time at first to start you should see the img being downloaded in the terminal if the counter percentile makes it so that it keeps on triggering the download again and again just increase the percentile to 3500000000% (Something large) so that it may have time to download the img later just put counter back to normal. Hope this helps!
@@jeffluminosity-staunch1579still claims No Match, can you help me please
@@mohamedfatheddine1447 is your reference img file in the same folder as the program? if yes than know that your reference img must be taken at the same lighting as you are testing, If that does not work I will recommend to either look for errors in the code or to re-write the complete code again at this point it really comes down to how determined you are to have a security face recognition :)
Guys, how can i run this code in visual studio? I am kinda new here
F5 to run codes
Bro it is showing nomatch for me
I'm encounting with the error
TypeError: unhashable type: 'list'
can I know the specific library versions that has been used on this project ?
I got the same error even though I cannot find some references in internet regarding this problem. Seems weird :/ The error apears in line "from deepface import DeepFace" so there is something wrong with the library itself
can you send the code, please
Hi I allways Thanks>
I hasve
deepface.verify([frame, reference in.copy()])['verified'] 'nonetype' object has no attribute 'copy'
please help~~
Getting the same error
were u able to fix it ?
@@shashaankkota9020 no square brackets
I have the same error, i wrote a test and the imread function is reading in the image properly so idk what the issue is
were you able to fix it?
@Venzi no, im gonna try just using a different library. I think theres one called facial_recognition or something using opencv
Awesome, Thanks for sharing this!
Hi, i like your video. Can you make a video about how you learn new things and how to get the right information?Danke!
it didnt work for me
It just says 'No Match'
Traceback (most recent call last):
File "d:\20a31a4429\Face.py", line 3, in
import opencv as cv2
ModuleNotFoundError: No module named 'opencv'
😔 What should I do?
instead of writing "import opencv as cv2" just write "import cv2"
try this: import cv2 as cv. then you can use cv instead of writing cv2
Wow, next level issue ig no one can solve
#airanevanchalaenti
can I get the source code
i can't install deepface
set off my shotgun trap when it recognizes me o7
It’s strange that you set check_face to every 30 secs but it detected match and no match immediately
it is set to every 30 FRAMES. not every 30s. since video is at 30 frames/sec, we can see a match/no match every 30 frames i.e., every 1 sec
love you bro !!!!
Super Cool!
thanks this video was really helpful
Thank you so much!
It didint work.
Source code
nice job
Good one
write a code
My computer cant handle it, but thanks anyway!
thank you so much for explaining this cool project
guys can anyone check this error in this code and tell me the solution
File "f:\PYTHON\PYTHON PROGRAMS 24-25\DOOM GAME\import threading.py", line 50, in
cv2.imshow("video", frame)
cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1301: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage' , this is the error which i am getting
Awesome
it keeps showing no match😂
that's not face recognition bro
Cool
A je shqiptar
Why don’t you just make python comments instead of talking??? You better create a very simple program then adding it up to the final level it would be much more easier to people to grab it
sir plz provide code sir not provide any videro
😠
my program doesn't work i don't know why can we meet.
please can you send me your email please