mirror of
https://github.com/serengil/deepface.git
synced 2025-06-06 11:35:21 +00:00
perform resize in a common point
This commit is contained in:
parent
a7c2a9f76b
commit
cc99de6e76
@ -249,12 +249,13 @@ def search_identity(
|
||||
# extract 1st item directly
|
||||
target_obj = target_objs[0]
|
||||
target_img = target_obj["face"]
|
||||
target_img = cv2.resize(target_img, (IDENTIFIED_IMG_SIZE, IDENTIFIED_IMG_SIZE))
|
||||
target_img *= 255
|
||||
target_img = target_img[:, :, ::-1]
|
||||
else:
|
||||
target_img = cv2.imread(target_path)
|
||||
target_img = cv2.resize(target_img, (IDENTIFIED_IMG_SIZE, IDENTIFIED_IMG_SIZE))
|
||||
|
||||
# resize anyway
|
||||
target_img = cv2.resize(target_img, (IDENTIFIED_IMG_SIZE, IDENTIFIED_IMG_SIZE))
|
||||
|
||||
return target_path.split("/")[-1], target_img
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user