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
@ -301,19 +301,14 @@ def verify(img1_path, img2_path = '', model_name = 'VGG-Face', distance_metric =
|
||||
#print("identification lasts ",toc-tic," seconds")
|
||||
|
||||
if bulkProcess == True:
|
||||
resp_obj = "{"
|
||||
|
||||
resp_obj = {}
|
||||
|
||||
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_objects
|
||||
|
||||
def analyze(img_path, actions = [], models = {}, enforce_detection = True
|
||||
, detector_backend = 'mtcnn'):
|
||||
|
Loading…
x
Reference in New Issue
Block a user