Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

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

laurenspriemf49ede4a741d
diff --git a/mobile/lib/face/model/detection.dart b/mobile/lib/face/model/detection.dart
index 49e8c3652b..9dc828d569 100644
--- a/mobile/lib/face/model/detection.dart
+++ b/mobile/lib/face/model/detection.dart
@@ -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);