Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I am trying to implement a facial recognition login system but I have an error "Operands could not be broadcast together with shapes (128,) (0,)" and I have no idea what or how can I solve it. Here are my view.py and facedetector.py that have been implemented and the error that I get from my server:
Traceback (most recent call last): File "C:\django-projects\lib\site packages\django\core\handlers\exception.py", line 34, in inner response = get_response(request) File "C:\django-projects\lib\site-packages\django\core\handlers\base.py", line 126, in _get_response response = self.process_exception_by_middleware(e, request) File "C:\django-projects\lib\site-packages\django\core\handlers\base.py", line 124, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "C:\django-projects\aps\aps_site\authenticate\views.py", line 54, in login_user if facedect(user.userprofile.head_shot.url): File "C:\django-projects\aps\aps_site\authenticate\views.py", line 37, in facedect check=face_recognition.compare_faces(face_1_face_encoding, face_encodings) File "C:\django-projects\lib\site-packages\face_recognition\api.py", line 222, in compare_faces return list(face_distance(known_face_encodings, face_encoding_to_check) <= tolerance) File "C:\django-projects\lib\site-packages\face_recognition\api.py", line 72, in face_distance return np.linalg.norm(face_encodings - face_to_compare, axis=1) ValueError: operands could not be broadcast together with shapes (128,) (0,)
from django.shortcuts import render, redirect from django.contrib.auth import authenticate, login, logout, update_session_auth_hash from django.contrib.auth.forms import UserCreationForm, UserChangeForm, PasswordChangeForm from django.contrib import messages from .forms import SignUpForm, EditProfileForm from django.urls import path, include import os import face_recognition import cv2 # Create your views here. def home(request): return render(request, 'authenticate/home.html', {}) def facedect REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
Did you got solution?if yes, please help me I am having same problem. I have asked you on stackverflow too and send you request on linkdin.
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.