Commit Graph

6 Commits (c13a8922a529c6e8db67586a374e199fe85c2011)

Author SHA1 Message Date
Robert Barron dfb0117f6e fix bug in OpenCV rotation
The center of the face was being reported as the center in the internally-cropped image, not the center
in the original mask. When the code that detects which face corresponds to which mask ran, it samples
the mask at the center of each face, but since the center was wrong, it would use the default index 0.
2023-03-12 20:23:23 -07:00
Robert Barron b7ff21669f fix incorrect handling of OpenCV face detection if input image has alpha channel (4 channel input) 2023-03-12 19:56:31 -07:00
Robert Barron 84e411e946 face rotation: refactor rotation calculation into a shared function & fix a minor bug in OpenCV case
The OpenCV path includes code to handle if FaceMesh finds 2+ faces when trying to get
the FaceMesh corresponding to an OpenCV face, by selecting the face that best matches the
OpenCV face. Normally FaceMesh only returns 1 face, but in the case where it found 2+ faces,
the previous version would break. (I think, I don't have any examples that trigger this path.)
2023-03-12 07:44:38 -07:00
kex0 e65f9d0db9 rotate face before generating so it's always uprigth...
...SD famously gives terrible results when faces are sideways, not anymore.
2023-03-06 23:29:03 +01:00
Sean Barrett 612bc34d84 default to OpenCV detector 2023-01-30 18:05:01 -08:00
Sean Barrett 3b9aead378 new face detector using OpenCV combined with FaceMesh 2023-01-29 17:51:42 -08:00