You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# to use this source image as is
display_img = cv2.imread(label)
# to use extracted face
source_objs = DeepFace.extract_faces(
img_path=label,
target_size=(pivot_img_size, pivot_img_size),
detector_backend=detector_backend,
enforce_detection=False,
align=False,
)
display_img is firstly initialized by a direct load of image from file on disk
Eventually DeepFace.extract_faces is called passing the string path to file (which implies a second load)
IMO the code should like
# to use this source image as is
display_img = cv2.imread(label)
# to use extracted face
source_objs = DeepFace.extract_faces(
img_path=display_img,
target_size=(pivot_img_size, pivot_img_size),
detector_backend=detector_backend,
enforce_detection=False,
align=False,
)
The text was updated successfully, but these errors were encountered:
Consider this snippet
display_img is firstly initialized by a direct load of image from file on disk
Eventually DeepFace.extract_faces is called passing the string path to file (which implies a second load)
IMO the code should like
The text was updated successfully, but these errors were encountered: