Skip to content

Commit

Permalink
bug while showing the recognized face when source image has more than…
Browse files Browse the repository at this point in the history
… one face sorted
  • Loading branch information
serengil committed Aug 17, 2024
1 parent f544038 commit a7c2a9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deepface/modules/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import time
from typing import List, Tuple, Optional
import traceback

# 3rd party dependencies
import numpy as np
Expand Down Expand Up @@ -253,6 +254,7 @@ def search_identity(
target_img = target_img[:, :, ::-1]
else:
target_img = cv2.imread(target_path)
target_img = cv2.resize(target_img, (IDENTIFIED_IMG_SIZE, IDENTIFIED_IMG_SIZE))

return target_path.split("/")[-1], target_img

Expand Down Expand Up @@ -769,7 +771,7 @@ def overlay_identified_face(
else:
logger.info("cannot put facial recognition info on the image")
except Exception as err: # pylint: disable=broad-except
logger.error(str(err))
logger.error(f"{str(err)} - {traceback.format_exc()}")
return img


Expand Down

0 comments on commit a7c2a9f

Please sign in to comment.