-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes Program #1614
Comments
I have the same issue with their example: https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam.py
|
For me, it would just no error, while looking for solutions I found this that worked: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The package terminates my program every time it recognizes a face and the following error appears:
Code
import cv2
import face_recognition
video_capture = cv2.VideoCapture(0)
exemplo_imagem = face_recognition.load_image_file("exemplo.jpg")
exemplo_face_encodings = face_recognition.face_encodings(exemplo_imagem)
if len(exemplo_face_encodings) > 0:
exemplo_face_encoding = exemplo_face_encodings[0]
else:
print("Nenhum rosto encontrado na imagem de exemplo.")
video_capture.release()
cv2.destroyAllWindows()
exit()
conhecidos_face_encodings = [exemplo_face_encoding]
conhecidos_nomes = ["Exemplo"]
while True:
ret, frame = video_capture.read()
if not ret:
print("Não foi possível capturar o quadro.")
break
video_capture.release()
cv2.destroyAllWindows()
The text was updated successfully, but these errors were encountered: