Spaces:
Runtime error
Runtime error
Shafeek Saleem commited on
Commit ·
dd8073b
1
Parent(s): 1941e70
bug fixed images - path
Browse files22 unmodified lines23242526272829303132333422 unmodified linesst.write(distance)name = 'Unknown'face_id = 'Unknown'if True in matches:match_index = matches.index(True)name = database[match_index]['name']face_id = database[match_index]['face_id'].split("_")[1]distance = round(distance[match_index],2)cv2.putText(image,str(distance),(left,top-30),cv2.FONT_HERSHEY_SIMPLEX,0.75,(0,255,0),2)cv2.rectangle(image,(left,top),(right,bottom),(0,255,0),2)cv2.putText(image,name,(left,top-10),cv2.FONT_HERSHEY_SIMPLEX,0.75,(0,255,0),2)return image, name, face_id22 unmodified lines2324252627282930313233343522 unmodified linesst.write(distance)name = 'Unknown'face_id = 'Unknown'for i in range(len(matches)):if matches[i].all():match_index = iname = database[match_index]['name']face_id = database[match_index]['face_id'].split("_")[1]distance = round(np.sum(distance[match_index]),2)cv2.putText(image,str(distance),(left,top-30),cv2.FONT_HERSHEY_SIMPLEX,0.75,(0,255,0),2)cv2.rectangle(image,(left,top),(right,bottom),(0,255,0),2)cv2.putText(image,name,(left,top-10),cv2.FONT_HERSHEY_SIMPLEX,0.75,(0,255,0),2)return image, name, face_id
utils/inference.py+7-6