diff --git a/mobile/lib/face/model/detection.dart b/mobile/lib/face/model/detection.dart index 8043ed985..1ffaa1eb3 100644 --- a/mobile/lib/face/model/detection.dart +++ b/mobile/lib/face/model/detection.dart @@ -43,6 +43,11 @@ class Detection { ); } + // TODO: iterate on better area calculation, potentially using actual indexing image dimensions instead of file metadata + int getFaceArea(int imageWidth, int imageHeight) { + return (box.width * imageWidth * box.height * imageHeight).toInt(); + } + // TODO: iterate on better scoring logic, current is a placeholder int getVisibilityScore() { final double aspectRatio = box.width / box.height; diff --git a/mobile/lib/ui/viewer/file_details/face_widget.dart b/mobile/lib/ui/viewer/file_details/face_widget.dart index 7e9445235..9ee41add2 100644 --- a/mobile/lib/ui/viewer/file_details/face_widget.dart +++ b/mobile/lib/ui/viewer/file_details/face_widget.dart @@ -174,6 +174,12 @@ class _FaceWidgetState extends State { style: Theme.of(context).textTheme.bodySmall, maxLines: 1, ), + if (kDebugMode) + Text( + 'A: ${widget.face.detection.getFaceArea(widget.file.width, widget.file.height)}', + style: Theme.of(context).textTheme.bodySmall, + maxLines: 1, + ), // if (kDebugMode) // if (highlight) // const Text(