Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong alignment direction issue when "align" set to True with DeepFace detectface using Retinaface detector #12

Closed
yvs997 opened this issue Nov 1, 2021 · 2 comments

Comments

@yvs997
Copy link

yvs997 commented Nov 1, 2021

Dear Serengil,
We're encounter an issue according to align parameters in DeepFace detectface function, and we're using RetinaFace to achive the accuracy.

Here how we call the detectface function from DeepFace:

def face_detect(image):
    face = DeepFace.detectFace(img_path=image, detector_backend='retinaface', align=True)
    return face

and call it by this codes:

def detection(path):
    print (deepface.DeepFace)
    image = Image.open(path)
    image.show()
    face = DeepFace.detectFace(img_path=np.array(image),detector_backend='retinaface',align=True)
    imface = Image.fromarray((face * 255).astype(np.uint8))
    imface.show()

we do small experiment with rotated potrait (90 degree both clockwise and counter clockwise). We expect when align set to true, the face will be aligned. When we test both clockwise and counter clockwise, the output just rotating to other side (180 degree).
here is the sample image we get from Google search randomly and we rotate it in PS:
1st:
counter90
2nd
clockwise90

@serengil
Copy link
Owner

it seems that the model accuracy is poor for 90 degree rotated images. nothing to do to improve the accuracy because this is a re-implementation.

@yvs997
Copy link
Author

yvs997 commented Nov 15, 2021

so for this case, is there any future development to fix this thing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants