Anurag14 / accessfaceid

Face Detection, verification and recognition in Near real time on CPU brewing with all the SOTA all over
Apache License 2.0
18 stars 6 forks source link

majority mode in utils/utils_insightface.py face when no match #47

Closed Anurag14 closed 5 years ago

Anurag14 commented 5 years ago

[Live Streaming] ----------------------------------------------------------- [FaceTracker Server] Found 1 faces! [Base Server] Running inference... [Live Streaming] ----------------------------------------------------------- [FaceTracker Server] Found 1 faces! [Base Server] Running inference... Traceback (most recent call last): File "livestream/newmain.py", line 79, in livestream.run() File ".\modules\camera_server.py", line 40, in run self.processs(frame) File "livestream/newmain.py", line 53, in processs _similar_face_name = self.face_db.who_is_this_face(_face_description) File ".\modules\face_db.py", line 54, in who_is_this_face who_is_this = compare_faces(self.faces_descriptions, self.faces_names, face_description, mode) File ".\utils\utils_insightface.py", line 57, in compare_faces name = face_distance_single_majority(known_face_encodings, names, face_query) File ".\utils\utils_insightface.py", line 19, in face_distance_single_majority name = max(set(name_list),key=name_list.count) ValueError: max() arg is an empty sequence [ WARN:0] terminating async callback

Anurag14 commented 5 years ago

fixed in pull request #48 case for "unknown" has been handled