Ask Your Question

why it cannot detect some profile face?

asked 2018-12-04 19:35:15 -0500

SunHwan gravatar image

Hi all I was trying to detect profile face. I found it's possible to detect it using haarcascade_profileface.xml. But I confirmed it could only detect a left-side face. How can It detect the other side face?

Here is a example. The size of image is 960x703.

face_cascade = cv2.CascadeClassifier('haarcascade_profileface.xml')

faces = face_cascade.detectMultiScale(gray, 1.3, 5)

image description

image description

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2018-12-04 20:03:20 -0500

berak gravatar image

the profile facecascade was indeed trained only on left side faces.

to detect right side faces, you haveto flip the image, and do it again:

flipped = cv2.flip(gray, 1)
faces = face_cascade.detectMultiScale(flipped, 1.3, 5)
edit flag offensive delete link more


Okay. Thank you to answer :)

SunHwan gravatar imageSunHwan ( 2018-12-04 20:20:24 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-12-04 19:35:15 -0500

Seen: 855 times

Last updated: Dec 04 '18