[mob][photos] Small fix in detecting sideways faces

This commit is contained in:
laurenspriem 2024-04-22 18:07:50 +05:30
parent 9cdd4fd713
commit f49ede4a74

View file

@ -155,7 +155,7 @@ class Detection {
(nose[0] < min(leftEye[0], rightEye[0]) - 0.5 * eyeDistanceX) &&
(nose[0] < min(leftMouth[0], rightMouth[0]));
final bool noseStickingOutRight =
(nose[0] > max(leftEye[0], rightEye[0]) - 0.5 * eyeDistanceX) &&
(nose[0] > max(leftEye[0], rightEye[0]) + 0.5 * eyeDistanceX) &&
(nose[0] > max(leftMouth[0], rightMouth[0]));
return faceIsUpright && (noseStickingOutLeft || noseStickingOutRight);