mirror of
https://github.com/serengil/deepface.git
synced 2025-06-10 05:17:08 +00:00
Merge pull request #367 from bhky/patch-1
Remove extra BGR2RGB call in RetinaFaceWrapper
This commit is contained in:
commit
bd4e418cba
@ -15,7 +15,8 @@ def detect_face(face_detector, img, align = True):
|
||||
|
||||
resp = []
|
||||
|
||||
img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) #retinaface expects RGB but OpenCV read BGR
|
||||
# The BGR2RGB conversion will be done in the preprocessing step of retinaface.
|
||||
# img_rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) #retinaface expects RGB but OpenCV read BGR
|
||||
|
||||
"""
|
||||
face = None
|
||||
@ -31,7 +32,7 @@ def detect_face(face_detector, img, align = True):
|
||||
|
||||
#--------------------------
|
||||
|
||||
obj = RetinaFace.detect_faces(img_rgb, model = face_detector, threshold = 0.9)
|
||||
obj = RetinaFace.detect_faces(img, model = face_detector, threshold = 0.9)
|
||||
|
||||
if type(obj) == dict:
|
||||
for key in obj:
|
||||
|
Loading…
x
Reference in New Issue
Block a user