EzequielAdrianM / Camera2Vision

Android Face Detector
Apache License 2.0
117 stars 52 forks source link

Face detection stops when I tilt my head too much #12

Open Mokkakopf opened 6 years ago

Mokkakopf commented 6 years ago

When I tilt my head around the z axis (eulerZ increases, while eulerY is the same), then the face recognition stops the markers are not drawn on my face anymore. This happens with an angle of 45 degrees. Any Idea why that is happening? I'm wondering, because my face is still fully visible.

EzequielAdrianM commented 6 years ago

I completely understand your point. The reason is easy: The data used to train the face detector model does not contain enough information to detect upside-down faces. I mean, there are no rotated faces further than 45 degrees in the source data. A simple hack would be to run the detector again on the same picture/frame but upside-down (rotated 180 deg) also you will need to transpose the landmarks coordinates by (Y=Y*-1). I must say that running the detector on twice the images will probably overheat the processor, froze the app, or drop the frames you can process half. The most appropriate solution would be to train the model from scratch with double the images but upside-down.

Mokkakopf commented 6 years ago

Oh, I was not aware of that, but thank you very much for your feedback!