From aad4bd3b79f1694031ab4eea2867c4c6ea0cfe91 Mon Sep 17 00:00:00 2001 From: laurenspriem Date: Wed, 13 Mar 2024 18:32:57 +0530 Subject: [PATCH] Better logging for face detection --- .../face_detection/yolov5face/onnx_face_detection.dart | 4 ---- mobile/lib/services/face_ml/face_ml_service.dart | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mobile/lib/services/face_ml/face_detection/yolov5face/onnx_face_detection.dart b/mobile/lib/services/face_ml/face_detection/yolov5face/onnx_face_detection.dart index 86a4d517f7..cc5ec7b138 100644 --- a/mobile/lib/services/face_ml/face_detection/yolov5face/onnx_face_detection.dart +++ b/mobile/lib/services/face_ml/face_detection/yolov5face/onnx_face_detection.dart @@ -696,10 +696,6 @@ class YoloOnnxFaceDetection { iouThreshold: kIouThreshold, ); - dev.log( - '[YOLOFaceDetectionService] ${relativeDetections.length} faces detected', - ); - return relativeDetections; } diff --git a/mobile/lib/services/face_ml/face_ml_service.dart b/mobile/lib/services/face_ml/face_ml_service.dart index 0658205dbe..b1feb3e7fc 100644 --- a/mobile/lib/services/face_ml/face_ml_service.dart +++ b/mobile/lib/services/face_ml/face_ml_service.dart @@ -219,7 +219,8 @@ class FaceMlService { resultBuilder: resultBuilder, ); - dev.log("Completed `detectFaces` function, in " + dev.log( + "${faceDetectionResult.length} faces detected: completed `detectFaces` function, in " "${stopwatch.elapsedMilliseconds} ms"); // If no faces were detected, return a result with no faces. Otherwise, continue. @@ -477,6 +478,7 @@ class FaceMlService { } final List faces = []; if (!result.hasFaces) { + debugPrint('No faces detected for file with name:${enteFile.displayName}'); faces.add( Face( '${result.fileId}-0',