Bug 503683

Summary: Entire photo as face
Product: [Applications] digikam Reporter: Andy <zunar>
Component: Faces-RecognitionAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: metzpinguin, michael_miller
Priority: NOR    
Version First Reported In: 8.7.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 8.7.0
Sentry Crash Report:
Attachments: Foto1
Foto2
Foto1

Description Andy 2025-05-02 20:22:07 UTC
Created attachment 180891 [details]
Foto1

Hello,

I noticed that entire photos of some people have been confirmed as faces. I now draw frames around the faces in these photos and confirm them. Then I remove the entire photo from the confirmed faces.
Unfortunately, I don't know when or why this happened. It must have been a long time ago.

My question now is whether these entire photos are also used for face recognition. Due to the background scan, there are now fewer and fewer faces that I have to confirm or ignore. There are now about 5,700 faces – and it will continue for a long time.

Regards
Andy
Comment 1 Michael Miller 2025-05-02 23:03:00 UTC
Hi Andy,
I doubt the entire image is being used for face training.  There are multiple checks of the extracted face data, and it's highly unlikely that it would pass all of them.

Cheers,
Mike
Comment 2 Andy 2025-05-03 06:32:39 UTC
Created attachment 180900 [details]
Foto2

Hi Mike, 
I'm sending you a JPG for your review.

Regards
Andy
Comment 3 Maik Qualmann 2025-05-04 07:09:18 UTC
The face rectangle entries were stored as "Inf" (infinity). Therefore, at the time the metadata was written, the face coordinates were invalid double variables. We're not able to determine the cause. This issue has rarely occurred in the past. Are you using MySQL as your database?

Maik
Comment 4 Andy 2025-05-04 07:37:03 UTC
Hi Maik,

Yes. I've been using MariaDB remotely on a NAS for a few months now.
Last year, I experimented a lot with SQLite and MySQL internal.

Regards
Andy
Comment 5 Andy 2025-05-04 08:01:34 UTC
I've been correcting all the incorrect face frames since yesterday. Unfortunately, it doesn't work via People -> Preview. Right-clicking -> "Remove All Faces" removes the image from the preview and switches to the next one.
So I open digiKam a second time on the PC (or in a VM or on the second PC). I use the search function on the left side. There I can correct everything. First, remove all faces, then search for faces and confirm.

Regards
Andy
Comment 6 Maik Qualmann 2025-05-04 09:33:24 UTC
Git commit cfad4d68483b3d98fcce6ae7ab44a87484c669b4 by Maik Qualmann.
Committed on 04/05/2025 at 09:32.
Pushed by mqualmann into branch 'master'.

does not import infinite face coordinates
FIXED-IN: 8.7.0

M  +1    -1    NEWS
M  +32   -14   core/libs/metadataengine/dmetadata/dmetadata_faces.cpp

https://invent.kde.org/graphics/digikam/-/commit/cfad4d68483b3d98fcce6ae7ab44a87484c669b4
Comment 7 Andy 2025-05-07 20:22:06 UTC
Created attachment 181043 [details]
Foto1

Hello,
Is it a problem if the frame for newly detected faces is outside the photo?

Regards
Andy
Comment 8 Michael Miller 2025-05-07 21:27:34 UTC
(In reply to Andy from comment #7)
> Created attachment 181043 [details]
> Foto1
> 
> Hello,
> Is it a problem if the frame for newly detected faces is outside the photo?
> 
> Regards
> Andy

Hi Andy,
Having the frame a little outside the image isn't a problem if you're running the latest 8.7.0 pre-release build.  I few weeks ago I changed the displayed face rectangle to add 12.5% on every side for the display thumbnail.  I also thought I had tested all the logic to handle when the expansion went outside the image dimensions.

I'll retest.  This may be a display bug, or it may be the result of the larger area face thumbnail change.

Cheers,
Mike