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