π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Inline
Manav Rathib6e1c4d3dad3
diff --git a/web/apps/photos/src/types/machineLearning/archface.ts b/web/apps/photos/src/types/machineLearning/archface.tsindex 07c2f1fc8a..e69de29bb2 100644--- a/web/apps/photos/src/types/machineLearning/archface.ts+++ b/web/apps/photos/src/types/machineLearning/archface.ts@@ -1,16 +0,0 @@-export const ARCFACE_LANDMARKS = [- [38.2946, 51.6963],- [73.5318, 51.5014],- [56.0252, 71.7366],- [56.1396, 92.2848],-] as Array<[number, number]>;--export const ARCFACE_LANDMARKS_FACE_SIZE = 112;--export const ARC_FACE_5_LANDMARKS = [- [38.2946, 51.6963],- [73.5318, 51.5014],- [56.0252, 71.7366],- [41.5493, 92.3655],- [70.7299, 92.2041],-] as Array<[number, number]>;diff --git a/web/apps/photos/src/utils/machineLearning/faceAlign.ts b/web/apps/photos/src/utils/machineLearning/faceAlign.tsindex de00a8b485..bedef835fb 100644--- a/web/apps/photos/src/utils/machineLearning/faceAlign.ts+++ b/web/apps/photos/src/utils/machineLearning/faceAlign.ts@@ -3,11 +3,6 @@ import { Matrix, inverse } from "ml-matrix";import { getSimilarityTransformation } from "similarity-transformation";import { Dimensions } from "types/image";import { FaceAlignment, FaceDetection } from "types/machineLearning";-import {- ARCFACE_LANDMARKS,- ARCFACE_LANDMARKS_FACE_SIZE,- ARC_FACE_5_LANDMARKS,-} from "types/machineLearning/archface";import { cropWithRotation, transform } from "utils/image";import {computeRotation,@@ -72,6 +67,23 @@ export function getFaceAlignmentUsingSimilarityTransform(};}+const ARCFACE_LANDMARKS = [+ [38.2946, 51.6963],+ [73.5318, 51.5014],+ [56.0252, 71.7366],+ [56.1396, 92.2848],+] as Array<[number, number]>;++const ARCFACE_LANDMARKS_FACE_SIZE = 112;++const ARC_FACE_5_LANDMARKS = [+ [38.2946, 51.6963],+ [73.5318, 51.5014],+ [56.0252, 71.7366],+ [41.5493, 92.3655],+ [70.7299, 92.2041],+] as Array<[number, number]>;+export function getArcfaceAlignment(faceDetection: FaceDetection,): FaceAlignment {