Twilio send sms line break12/10/2023 ![]() Self.sock = self._get_socket(host, port, self.timeout)įile "C:\Users\calab\anaconda3\envs\Daniel\lib\smtplib.py", line 1054, in _get_socket SMTP._init_(self, host, port, local_hostname, timeout,įile "C:\Users\calab\anaconda3\envs\Daniel\lib\smtplib.py", line 255, in _init_įile "C:\Users\calab\anaconda3\envs\Daniel\lib\smtplib.py", line 339, in connect ![]() ![]() # sheet.update_cell(namecell.row,l,'late')Įm.send_email(sheet.cell(namecell.row,2).value,"absent") 复制ĪttributeError: module 'enroll' has no attribute 'mobile'įile "C:\Users\calab\Desktop\Daniel\Face-recognition-based-attendance-system-master\face recognition source code\main.py", line 10, in įile "C:\Users\calab\Desktop\Daniel\Face-recognition-based-attendance-system-master\face recognition source code\recognition.py", line 105, in run_recognitionįile "C:\Users\calab\Desktop\Daniel\Face-recognition-based-attendance-system-master\face recognition source code\spreadsheet.py", line 53, in write_to_sheetįile "C:\Users\calab\Desktop\Daniel\Face-recognition-based-attendance-system-master\face recognition source code\emailing.py", line 48, in send_emailįile "C:\Users\calab\anaconda3\envs\Daniel\lib\smtplib.py", line 1048, in _init_ Sheet.update_cell(namecell.row,l,'present')Įm.send_email(sheet.cell(namecell.row,2).value,"present") If(sheet.cell(namecell.row,l).value ='absent' ): Sheet = client.open("Face recognition").sheet1ĭef enroll_person_to_sheet(name,email,mobile): Spreadsheet.write_to_sheet(face_names)įrom rvice_account import ServiceAccountCredentialsĬreds = om_json_keyfile_name("credentials.json", scope) # Scale back up face locations since the frame we detected in was scaled to 1/4 sizeĬv2.rectangle(frame, (left, top), (right, bottom), (0, 0, 255), 2) Process_this_frame = not process_this_frameįor (top, right, bottom, left), name in zip(face_locations, face_names): # Or instead, use the known face with the smallest distance to the new faceįace_distances = face_recognition.face_distance(known_face_encodings, face_encoding)īest_match_index = np.argmin(face_distances) # first_match_index = matches.index(True) # If a match was found in known_face_encodings, just use the first one. Matches = face_pare_faces(known_face_encodings, face_encoding) # See if the face is a match for the known face(s) # Find all the faces and face encodings in the current frame of videoįace_locations = face_recognition.face_locations(rgb_small_frame)įace_encodings = face_recognition.face_encodings(rgb_small_frame, face_locations) # Only process every other frame of video to save time # Convert the image from BGR color (which OpenCV uses) to RGB color (which face_recognition uses) # Resize frame of video to 1/4 size for faster face recognition processing Video_capture = cv2.VideoCapture(0,cv2.CAP_DSHOW) Known_face_encodings.append(pickle.load(fp)) With open (facial_encodings_folder+filename, 'rb') as fp: ndmail(sender, receiver_mail, message)ĭef load_facial_encodings_and_names_from_memory():įor filename in os.listdir(facial_encodings_folder): With smtplib.SMTP_SSL("", port, context=context) as server: Message ='Subject: '.format(subject, text) Text="\nYour pin for attendance app is "+str(pin) Spreadsheet.enroll_person_to_sheet(name,email,mobile)ĭate=now.strftime('%m/%d/%Y').replace('/0','/') With open(facial_encodings_folder+name+'.txt','wb') as fp:Ĭv2.imshow('Enrolling new attendee',frame)Ĭv2.imwrite(photo_folder+name+'.jpg',frame)Įncoding_of_enrolled_person(name,photo_folder+name+'.jpg') Photo_folder = 'C:/Users/calab/Desktop/Daniel/Face-recognition-based-attendance-system-master/known face photos/'įacial_encodings_folder='C:/Users/calab/Desktop/Daniel/Face-recognition-based-attendance-system-master/known face encodings/'Īccount_sid = 'ACae108c0b6468e1451db3312b237bd599'Īuth_token = 'a87d9f333d3a8e242b2ea972bb6ada83'ĭef encoding_of_enrolled_person(name,image):Įnroll_encoding.append(face_recognition.face_encodings(face_recognition.load_image_file(image)))į=open(facial_encodings_folder+name+'.txt','w+')
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |