mirror of
https://github.com/serengil/deepface.git
synced 2025-06-08 20:45:22 +00:00
dict for json instead of string in verification
This commit is contained in:
parent
7bc9ee0c1c
commit
9c46a9ab17
@ -299,21 +299,16 @@ def verify(img1_path, img2_path = '', model_name = 'VGG-Face', distance_metric =
|
|||||||
toc = time.time()
|
toc = time.time()
|
||||||
|
|
||||||
#print("identification lasts ",toc-tic," seconds")
|
#print("identification lasts ",toc-tic," seconds")
|
||||||
|
|
||||||
if bulkProcess == True:
|
if bulkProcess == True:
|
||||||
resp_obj = "{"
|
|
||||||
|
resp_obj = {}
|
||||||
|
|
||||||
for i in range(0, len(resp_objects)):
|
for i in range(0, len(resp_objects)):
|
||||||
resp_item = json.dumps(resp_objects[i])
|
resp_item = resp_objects[i]
|
||||||
|
resp_obj["pair_%d" % (i+1)] = resp_item
|
||||||
if i > 0:
|
|
||||||
resp_obj += ", "
|
|
||||||
|
|
||||||
resp_obj += "\"pair_"+str(i+1)+"\": "+resp_item
|
|
||||||
resp_obj += "}"
|
|
||||||
resp_obj = json.loads(resp_obj)
|
|
||||||
return resp_obj
|
return resp_obj
|
||||||
#return resp_objects
|
|
||||||
|
|
||||||
def analyze(img_path, actions = [], models = {}, enforce_detection = True
|
def analyze(img_path, actions = [], models = {}, enforce_detection = True
|
||||||
, detector_backend = 'mtcnn'):
|
, detector_backend = 'mtcnn'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user