progress bar

This commit is contained in:
Şefik Serangil 2020-05-04 11:48:14 +03:00
parent 74d8a64d57
commit 728df10e46
3 changed files with 16 additions and 4 deletions

View File

@ -66,8 +66,15 @@ def verify(img1_path, img2_path=''
threshold = functions.findThreshold(model_name, distance_metric)
#------------------------------
pbar = tqdm(range(0,len(img_list)), desc='Verification')
resp_objects = []
for instance in img_list:
#for instance in img_list:
for index in pbar:
instance = img_list[index]
if type(instance) == list and len(instance) >= 2:
img1_path = instance[0]
img2_path = instance[1]
@ -198,7 +205,12 @@ def analyze(img_path, actions = [], models = {}, enforce_detection = True):
#---------------------------------
resp_objects = []
for img_path in img_paths:
global_pbar = tqdm(range(0,len(img_paths)), desc='Analyzing')
#for img_path in img_paths:
for j in global_pbar:
img_path = img_paths[j]
resp_obj = "{"

View File

@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setuptools.setup(
name="deepface",
version="0.0.21",
version="0.0.22",
author="Sefik Ilkin Serengil",
author_email="serengil@gmail.com",
description="Deep Face Analysis Framework for Face Recognition and Demography",

View File

@ -153,4 +153,4 @@ facial_attribute_models["age"] = age_model
facial_attribute_models["gender"] = gender_model
facial_attribute_models["race"] = race_model
resp_obj = DeepFace.analyze("dataset/img1.jpg", models=facial_attribute_models)
resp_obj = DeepFace.analyze("dataset/img1.jpg", models=facial_attribute_models)