Salut et super travaille j'essai de faire le même depuis mais un message d'erreur s'affiche disant module cv2 not found donc j'ai passé des heures sur RUclips pour parvenir à le réparer mais sans succès en utilisant pip install opencv-python mais sans succès slt tu peux m'aider ?
i am not able to install face_recognition it is asking for dlib and when i try to install dlib it is asking for cmake and even after installing cmake dlib is not getting installed and so is face_recognition
Unfortunately, most face recognition libraries don't officially support Windows. However, you can try this complete face recognition project that doesn't require a face recognition library: Real-time Face Recognition System using Python & OpenCV. It should work well for you! apycoder.com/product/real-time-face-recognition-system-using-python-opencv/
Exception has occurred: RuntimeError Unsupported image type, must be 8bit gray or RGB image. File "C:\Users\ASUS\Desktop\bitirme\.ipynb_checkpoints\import face_recognition.py", line 13, in face_encodings = face_recognition.face_encodings(rgb_image) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Unsupported image type, must be 8bit gray or RGB image. bu hatayı alıyorum lütfen yardımcı olurmusunuz
I had buy your code but it is not working like face recognition library. It detect only as it is pictures, Please suggest what to do and it is error in import torch what i should do can u help me out
Yo bro, i have a favor to ask, how can i use face recorgnition to recognize face image that were stored in the database. If the face image is same as the image that were captured by the frame then it will display my name, can u show me how to do that, sorry if my english is bad
Failed building wheel for dlib , failed to build installable wheels for some pyproject.toml based projects (dlib) how to solve this error..plz explain in easy way
Yes, you can use a Raspberry Pi for a face recognition project via SSH. You'll need to set up the necessary software and libraries on your Raspberry Pi, and then you can access and control it remotely using SSH. Make sure your Raspberry Pi has a camera module or a compatible USB camera for capturing images for face recognition.
i have Some kind of bellow error any one plz help to clear the erroe ( self: _dlib_pybind11.fhog_object_detector, image: numpy.ndarray, upsample_num_times: int = 0) -> _dlib_pybind11.rectangles Invoked with: , None, 1)
Re-check the name there must be a typo in your code, Here is the working code: import cv2 import face_recognition # Load known face encodings & names known_face_encodings = [] known_face_names = [] # Load known faces & their names known_person1_image = face_recognition.load_image_file("Photos/Dev.jpg") known_person2_image = face_recognition.load_image_file("Photos/Elon.jpg") known_person1_encoding = face_recognition.known_face_encodings(known_person1_image)[0] known_person2_encoding = face_recognition.known_face_encodings(known_person2_image)[0] known_face_encodings.append(known_person1_encoding) known_face_encodings.append(known_person2_encoding) known_face_name.append("Dev") known_face_name.append("Elon") # Initialize the webcam video_capture = cv2.VideoCapture(0) while True: # Capture frame by frame ret, frame = video_capture.read() # Find all face location in the current frame face_locations = face_recognition.face_location(frame) face_encodings = face_recognition.face_encoding(frame, face_location) # Loop through each frame found in the frame for (top, right, bottom, left), face_encoding in zip(face_location, face_encodings): # Check if face matches any known faces matches = face_recognition.compare_faces(known_face_encodings, face_encoding) name = "Unknown" if True in matches: first_match_index = matches.index(True) name = known_face_names[first_match_index] #Draw a box around the box & label the face_encoding cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2) cv2.putText(frame, name, (left, top - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.9, (0, 0, 255), 2) # Display the resulting frame cv2.imshow("Video", frame) if cv2.waitKey(1) & 0xFF == ord('q'): break # Release the webcam and close OpenCV video_capture.release() cv2.destroyAllWindows()
Try this: import cv2 import face_recognition # Load known face encodings & names known_face_encodings = [] known_face_names = [] # Load known faces & their names known_person1_image = face_recognition.load_image_file("Photos/Dev.jpg") known_person2_image = face_recognition.load_image_file("Photos/Elon.jpg") known_person1_encoding = face_recognition.face_encodings(known_person1_image)[0] known_person2_encoding = face_recognition.face_encodings(known_person2_image)[0] known_face_encodings.append(known_person1_encoding) known_face_encodings.append(known_person2_encoding) known_face_names.append("Dev") known_face_names.append("Elon") # Initialize the webcam video_capture = cv2.VideoCapture(0) while True: # Capture frame by frame ret, frame = video_capture.read() # Find all face location in the current frame face_locations = face_recognition.face_locations(frame) face_encodings = face_recognition.face_encodings(frame, face_locations) # Loop through each frame found in the frame for (top, right, bottom, left), face_encoding in zip(face_locations, face_encodings): # Check if face matches any known faces matches = face_recognition.compare_faces(known_face_encodings, face_encoding) name = "Unknown" if True in matches: first_match_index = matches.index(True) name = known_face_names[first_match_index] #Draw a box around the box & label the face_encoding cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2) cv2.putText(frame, name, (left, top - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.9, (0, 0, 255), 2) # Display the resulting frame cv2.imshow("Video", frame) if cv2.waitKey(1) & 0xFF == ord('q'): break # Release the webcam and close OpenCV video_capture.release() cv2.destroyAllWindows()
import cv2 import face_recognition # Load known face encodings & names known_face_encodings = [] known_face_names = [] # Load known faces & their names known_person1_image = face_recognition.load_image_file("Photos/Dev.jpg") known_person2_image = face_recognition.load_image_file("Photos/Elon.jpg") known_person1_encoding = face_recognition.face_encodings(known_person1_image)[0] known_person2_encoding = face_recognition.face_encodings(known_person2_image)[0] known_face_encodings.append(known_person1_encoding) known_face_encodings.append(known_person2_encoding) known_face_names.append("Dev") known_face_names.append("Elon") # Initialize the webcam video_capture = cv2.VideoCapture(0) while True: # Capture frame by frame ret, frame = video_capture.read() # Find all face location in the current frame face_locations = face_recognition.face_locations(frame) face_encodings = face_recognition.face_encodings(frame, face_locations) # Loop through each frame found in the frame for (top, right, bottom, left), face_encoding in zip(face_locations, face_encodings): # Check if face matches any known faces matches = face_recognition.compare_faces(known_face_encodings, face_encoding) name = "Unknown" if True in matches: first_match_index = matches.index(True) name = known_face_names[first_match_index] #Draw a box around the box & label the face_encoding cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2) cv2.putText(frame, name, (left, top - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.9, (0, 0, 255), 2) # Display the resulting frame cv2.imshow("Video", frame) if cv2.waitKey(1) & 0xFF == ord('q'): break # Release the webcam and close OpenCV video_capture.release() cv2.destroyAllWindows()
Check out our face recognition Based attendance system ruclips.net/video/F8Q3TrVc43Y/видео.html
Great work. Gonna help lots of people including me👏
Which dlib and face recognition version u have used in this code ?
great video thanks you saved my journey, appreciate help and thanks from bottom heart
Thank you very very much sir for this video. Hope you prosper a lot in your life❤❤❤❤❤
Salut et super travaille j'essai de faire le même depuis mais un message d'erreur s'affiche disant module cv2 not found donc j'ai passé des heures sur RUclips pour parvenir à le réparer mais sans succès en utilisant pip install opencv-python mais sans succès slt tu peux m'aider ?
Nice one bro❤
.
.
.
I need e face recognition tutorial with YOLO algorithm.
Ok yolo tutorial will come soon 🥰
i am not able to install face_recognition it is asking for dlib and when i try to install dlib it is asking for cmake and even after installing cmake dlib is not getting installed and so is face_recognition
Unfortunately, most face recognition libraries don't officially support Windows. However, you can try this complete face recognition project that doesn't require a face recognition library: Real-time Face Recognition System using Python & OpenCV. It should work well for you!
apycoder.com/product/real-time-face-recognition-system-using-python-opencv/
@@apycoder I somehow made it work but sometimes it is predicting wrong is it because of less entries in the dataset?
Nice work. Thank you
face recognition is not installing. can you help please ?
Send your error code
I also got the same error
Check face recognition library documentation. Is it compatible with your operating systems or not
@@apycoder
IndentationError: unindent does not match any outer indentation level
Help me
@@nikkiverse3070 its only identation error nothing difficult only you can change line of spaces where it showing error
Exception has occurred: RuntimeError
Unsupported image type, must be 8bit gray or RGB image.
File "C:\Users\ASUS\Desktop\bitirme\.ipynb_checkpoints\import face_recognition.py", line 13, in
face_encodings = face_recognition.face_encodings(rgb_image)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
bu hatayı alıyorum lütfen yardımcı olurmusunuz
I just uninstalled numpy 2.x.x, and then installed older version 1.26.4 (pip install numpy==1.26.4)
@@vladyslav-py-js-go Thank you bro
Great video, can you make the same thing using CNN model please !!
Thanks bro it's work's
Supb.. Bro..... ❤
Which ide you are using
Hi.
Can you also teach how to recognize faces with masks? Or do you know the source code for it that you can give me :)
Thanks!
how do i get the face_recognition module
pip install face_recognition
pip install opencv-python
If you don't have Python installed, download and install it from the official Python website:
I had buy your code but it is not working like face recognition library. It detect only as it is pictures, Please suggest what to do and it is error in import torch what i should do can u help me out
You can message me on Whatsapp app I will fix this bug
I have fixed this bug , you can download it again, there is no limit to download.
@ number
@@apycoder sir it is asking to pay
sorry to distrub you sir how can i download it again sir
Which is the front end and back end ?
Yo bro, i have a favor to ask, how can i use face recorgnition to recognize face image that were stored in the database. If the face image is same as the image that were captured by the frame then it will display my name, can u show me how to do that, sorry if my english is bad
did u figure it out how?
@@Atlantic025 yes brother you can get code for this , just msg me on WhatsApp
Bro should i declare path instead of file name?
Assalamualaikum fase recingization ky liy konsi app use kr rhy ha ?ya ap kis pa work kr rhy ha plz tell me?
Linux OS and visual studio code for this project
bro what is the type of the app that you are working at??
I am using Kali Linux OS , and visual studio code for development
the camera never shows up
@@apycoder
@@apycoder it can run on windows or not?
Officially the face recognition library doesn't support windows. So it won't run
Bro how can run on gup rather than cpu
Failed building wheel for dlib , failed to build installable wheels for some pyproject.toml based projects (dlib) how to solve this error..plz explain in easy way
for these error you will have to install cmaker in your device so that the pkg can be compilled inorder to be runned
Can you make vdo on ,how to connect template in django
Sure
I had buy your code but it is not working like face recognition library. It detect only as it is pictures, Please suggest what to do
Please what's app me , I will help you in installation
Thank you sir
How to do python coding in kali linux
Bro please help your code did't work there is an error show and submission date is 20 please help
Send me code on WhatsApp, you can find my what's app no on my website
Can I use raspberry pi through ssh and do this? If yes how?
Yes, you can use a Raspberry Pi for a face recognition project via SSH. You'll need to set up the necessary software and libraries on your Raspberry Pi, and then you can access and control it remotely using SSH. Make sure your Raspberry Pi has a camera module or a compatible USB camera for capturing images for face recognition.
i have Some kind of bellow error any one plz help to clear the erroe ( self: _dlib_pybind11.fhog_object_detector, image: numpy.ndarray, upsample_num_times: int = 0) -> _dlib_pybind11.rectangles Invoked with: , None, 1)
Please can you explain and code for object detection with live webcam Sir?Please Sir?
Check my video there is specific for object detection, eye detection, blink counter, and driver drowsiness detection
Name error : name 'known_person1_image' is not defined
How to resolve this???
If you are using window os then give the complete image path
Send me code on WhatsApp
Re-check the name there must be a typo in your code,
Here is the working code:
import cv2
import face_recognition
# Load known face encodings & names
known_face_encodings = []
known_face_names = []
# Load known faces & their names
known_person1_image = face_recognition.load_image_file("Photos/Dev.jpg")
known_person2_image = face_recognition.load_image_file("Photos/Elon.jpg")
known_person1_encoding = face_recognition.known_face_encodings(known_person1_image)[0]
known_person2_encoding = face_recognition.known_face_encodings(known_person2_image)[0]
known_face_encodings.append(known_person1_encoding)
known_face_encodings.append(known_person2_encoding)
known_face_name.append("Dev")
known_face_name.append("Elon")
# Initialize the webcam
video_capture = cv2.VideoCapture(0)
while True:
# Capture frame by frame
ret, frame = video_capture.read()
# Find all face location in the current frame
face_locations = face_recognition.face_location(frame)
face_encodings = face_recognition.face_encoding(frame, face_location)
# Loop through each frame found in the frame
for (top, right, bottom, left), face_encoding in zip(face_location, face_encodings):
# Check if face matches any known faces
matches = face_recognition.compare_faces(known_face_encodings, face_encoding)
name = "Unknown"
if True in matches:
first_match_index = matches.index(True)
name = known_face_names[first_match_index]
#Draw a box around the box & label the face_encoding
cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2)
cv2.putText(frame, name, (left, top - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.9, (0, 0, 255), 2)
# Display the resulting frame
cv2.imshow("Video", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# Release the webcam and close OpenCV
video_capture.release()
cv2.destroyAllWindows()
Try this:
import cv2
import face_recognition
# Load known face encodings & names
known_face_encodings = []
known_face_names = []
# Load known faces & their names
known_person1_image = face_recognition.load_image_file("Photos/Dev.jpg")
known_person2_image = face_recognition.load_image_file("Photos/Elon.jpg")
known_person1_encoding = face_recognition.face_encodings(known_person1_image)[0]
known_person2_encoding = face_recognition.face_encodings(known_person2_image)[0]
known_face_encodings.append(known_person1_encoding)
known_face_encodings.append(known_person2_encoding)
known_face_names.append("Dev")
known_face_names.append("Elon")
# Initialize the webcam
video_capture = cv2.VideoCapture(0)
while True:
# Capture frame by frame
ret, frame = video_capture.read()
# Find all face location in the current frame
face_locations = face_recognition.face_locations(frame)
face_encodings = face_recognition.face_encodings(frame, face_locations)
# Loop through each frame found in the frame
for (top, right, bottom, left), face_encoding in zip(face_locations, face_encodings):
# Check if face matches any known faces
matches = face_recognition.compare_faces(known_face_encodings, face_encoding)
name = "Unknown"
if True in matches:
first_match_index = matches.index(True)
name = known_face_names[first_match_index]
#Draw a box around the box & label the face_encoding
cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2)
cv2.putText(frame, name, (left, top - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.9, (0, 0, 255), 2)
# Display the resulting frame
cv2.imshow("Video", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# Release the webcam and close OpenCV
video_capture.release()
cv2.destroyAllWindows()
I am getting name error in code how to correct this?
how to install face recognition for python 3.12?
Join our WhatsApp group
i love robin duttha
Isme attendance kaise laga sakte hai
There is a separate video for face recognition based attendance system
@@apycoder watched it already
pura code likha but its showing error : no such file or directory
8 hour hogaya error solve nahi horaha dimak ka dahi hogaya😒😒
Share code on WhatsApp I Will check and let you know what's the problem is
Keep all the images in the same working directory
This error occurred when python code is unable to find your images path, make sure to keep all the images in the same working directory
@@apycoder whatappps no. ?
is it based on CNN?
Yes python face recognition library is based on CNN
@@apycodervai please give the source code
Go and visit again to get Source code , i have added link in the description
i love robbin dutha
bhai 50 Line ke code ke liye 300rs mang rha hai itna to cahtgpt likh ke de denga
by the wat i like this video
Identation problem at unknown
Join our WhatsApp group and send me your code
reply me for issues in installing face recognition i will help u out
Bro can you send source code
There is a source code link in the description
import cv2
import face_recognition
# Load known face encodings & names
known_face_encodings = []
known_face_names = []
# Load known faces & their names
known_person1_image = face_recognition.load_image_file("Photos/Dev.jpg")
known_person2_image = face_recognition.load_image_file("Photos/Elon.jpg")
known_person1_encoding = face_recognition.face_encodings(known_person1_image)[0]
known_person2_encoding = face_recognition.face_encodings(known_person2_image)[0]
known_face_encodings.append(known_person1_encoding)
known_face_encodings.append(known_person2_encoding)
known_face_names.append("Dev")
known_face_names.append("Elon")
# Initialize the webcam
video_capture = cv2.VideoCapture(0)
while True:
# Capture frame by frame
ret, frame = video_capture.read()
# Find all face location in the current frame
face_locations = face_recognition.face_locations(frame)
face_encodings = face_recognition.face_encodings(frame, face_locations)
# Loop through each frame found in the frame
for (top, right, bottom, left), face_encoding in zip(face_locations, face_encodings):
# Check if face matches any known faces
matches = face_recognition.compare_faces(known_face_encodings, face_encoding)
name = "Unknown"
if True in matches:
first_match_index = matches.index(True)
name = known_face_names[first_match_index]
#Draw a box around the box & label the face_encoding
cv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2)
cv2.putText(frame, name, (left, top - 10), cv2.FONT_HERSHEY_SIMPLEX, 0.9, (0, 0, 255), 2)
# Display the resulting frame
cv2.imshow("Video", frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# Release the webcam and close OpenCV
video_capture.release()
cv2.destroyAllWindows()