diff --git a/deepface/DeepFace.py b/deepface/DeepFace.py index e2a6d93..bb0b283 100644 --- a/deepface/DeepFace.py +++ b/deepface/DeepFace.py @@ -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: diff --git a/deepface/commons/realtime.py b/deepface/commons/realtime.py index c0f7412..9540577 100644 --- a/deepface/commons/realtime.py +++ b/deepface/commons/realtime.py @@ -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.") #------------------------