From c5f02a47d4e647a03f98b08fbb1b41ab572143e7 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 14 May 2024 14:50:18 +0530 Subject: [PATCH] Subsume --- .../machineLearning/yoloFaceDetectionService.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/web/apps/photos/src/services/machineLearning/yoloFaceDetectionService.ts b/web/apps/photos/src/services/machineLearning/yoloFaceDetectionService.ts index 7e8af1a269..8856576bee 100644 --- a/web/apps/photos/src/services/machineLearning/yoloFaceDetectionService.ts +++ b/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 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, + }); }