Manav Rathi 1 年之前
父節點
當前提交
c5f02a47d4
共有 1 個文件被更改,包括 6 次插入10 次删除
  1. 6 10
      web/apps/photos/src/services/machineLearning/yoloFaceDetectionService.ts

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

@@ -323,14 +323,10 @@ function transformBox(box: Box, transform: Matrix) {
     const topLeft = transformPoint(box.topLeft, transform);
     const topLeft = transformPoint(box.topLeft, transform);
     const bottomRight = transformPoint(box.bottomRight, transform);
     const bottomRight = transformPoint(box.bottomRight, transform);
 
 
-    return newBoxFromPoints(topLeft.x, topLeft.y, bottomRight.x, bottomRight.y);
-}
-
-function newBoxFromPoints(
-    left: number,
-    top: number,
-    right: number,
-    bottom: number,
-) {
-    return boxFromBoundingBox({ left, top, right, bottom });
+    return boxFromBoundingBox({
+        left: topLeft.x,
+        top: topLeft.y,
+        right: bottomRight.x,
+        bottom: bottomRight.y,
+    });
 }
 }