mirror of
https://github.com/ente-io/ente.git
synced 2025-07-23 12:27:25 +00:00
[mob] Show face area info in debug mode
This commit is contained in:
parent
04a33e6f65
commit
0777013b93
@ -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;
|
||||
|
@ -174,6 +174,12 @@ class _FaceWidgetState extends State<FaceWidget> {
|
||||
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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user