deepid bug fixed

This commit is contained in:
Şefik Serangil 2020-06-17 09:56:59 +03:00
parent 4bb49ab446
commit be0b0d40c8

View File

@ -102,7 +102,7 @@ def analysis(db_path, model_name, distance_metric, enable_face_analysis = True):
employee = employees[index] employee = employees[index]
pbar.set_description("Finding embedding for %s" % (employee.split("/")[-1])) pbar.set_description("Finding embedding for %s" % (employee.split("/")[-1]))
embedding = [] embedding = []
img = functions.detectFace(employee, input_shape) img = functions.detectFace(employee, (input_shape_y, input_shape_x))
img_representation = model.predict(img)[0,:] img_representation = model.predict(img)[0,:]
embedding.append(employee) embedding.append(employee)
@ -375,6 +375,9 @@ def analysis(db_path, model_name, distance_metric, enable_face_analysis = True):
employee_name = candidate['employee'] employee_name = candidate['employee']
best_distance = candidate['distance'] best_distance = candidate['distance']
#print(candidate[['employee', 'distance']])
#if True:
if best_distance <= threshold: if best_distance <= threshold:
#print(employee_name) #print(employee_name)
display_img = cv2.imread(employee_name) display_img = cv2.imread(employee_name)