Manav Rathi vor 1 Jahr
Ursprung
Commit
f3e3fb45bb

+ 1 - 1
web/apps/photos/src/services/machineLearning/yoloFaceDetectionService.ts

@@ -300,7 +300,7 @@ function getDetectionCenter(detection: FaceDetection) {
         center.y += p.y;
     });
 
-    return center.div(new Point(4, 4));
+    return new Point(center.x / 4, center.y / 4);
 }
 
 function computeTransformToBox(inBox: Box, toBox: Box): Matrix {

+ 0 - 4
web/apps/photos/src/services/ml/geom.ts

@@ -6,10 +6,6 @@ export class Point {
         this.x = x;
         this.y = y;
     }
-
-    public div(pt: Point): Point {
-        return new Point(this.x / pt.x, this.y / pt.y);
-    }
 }
 
 export interface Dimensions {