Reputation:
I'm trying to detect faces with sunglasses for a project I work on. The sunglasses I use are mirror-like.
I trained my own cascade classifier with 438 positive pictures of me wearing the sunglasses and 1145 negative pictures.
The classifier works perfectly without the glasses, but it can't detect my face with the glasses or struggle to do it, even if I reproduce the positive pictures (same place, same hair, same clothes, same face, same lighting, same position, ...).
Can somebody help me to make it works with the sunglasses on?
Here is the line where I try to detect my face. I know what the parameters of detectMultiScale mean and I tried to play with them but it didn't work.
face_cascade.detectMultiScale(gray, faces, 1.05, 1, Objdetect.CASCADE_SCALE_IMAGE, new Size(wScreen*0.3, hScreen*0.3), new Size(wScreen, hScreen));
thanks!
Upvotes: 1
Views: 2315
Reputation: 13
i am also trying recognize faces with sunglasses, try different combinations of haarcascade_frontalface_default, alt, alt2 with scalefactor 0 and minNeighbors 0 this worked for me
Upvotes: 1