mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +00:00
warning added to stream function
This commit is contained in:
parent
e35136b6c4
commit
2351c9a3b5
@ -254,7 +254,13 @@ def verify(img1_path, img2_path=''
|
||||
threshold = functions.findThreshold(model_name, distance_metric)
|
||||
|
||||
#------------------------------
|
||||
pbar = tqdm(range(0,len(img_list)), desc='Verification')
|
||||
|
||||
if len(img_list) > 1:
|
||||
disable_option = False
|
||||
else: #calling deepface in a for loop causes lots of progress bars. this block prevents this problem.
|
||||
disable_option = True
|
||||
|
||||
pbar = tqdm(range(0,len(img_list)), desc='Verification', disable = disable_option)
|
||||
|
||||
#for instance in img_list:
|
||||
for index in pbar:
|
||||
|
@ -17,6 +17,8 @@ from deepface.commons import functions, realtime, distance as dst
|
||||
def analysis(db_path, model_name, distance_metric, enable_face_analysis = True):
|
||||
|
||||
input_shape = (224, 224)
|
||||
input_shape_x = input_shape[0]; input_shape_y = input_shape[1]
|
||||
|
||||
text_color = (255,255,255)
|
||||
|
||||
employees = []
|
||||
@ -30,6 +32,8 @@ def analysis(db_path, model_name, distance_metric, enable_face_analysis = True):
|
||||
#print(exact_path)
|
||||
employees.append(exact_path)
|
||||
|
||||
if len(employees) == 0:
|
||||
print("WARNING: There is no image in this path ( ", db_path,") . Face recognition will not be performed.")
|
||||
|
||||
#------------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user