Bug 508121 - Face Recognition does not produce any results
Summary: Face Recognition does not produce any results
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Recognition (other bugs)
Version First Reported In: 8.8.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-11 17:38 UTC by Brian Werner
Modified: 2025-08-19 10:28 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.8.0
Sentry Crash Report:


Attachments
debug-output (643.47 KB, text/plain)
2025-08-11 19:08 UTC, Brian Werner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Werner 2025-08-11 17:38:13 UTC
SUMMARY
In 8.8.0 when trying to recognize faces, it recognizes ZERO faces, regardless of the training, accuracy, etc.  I have tagged my face in over 100 photos, and asking it to recognize my face in the remaining photos in the same album.  It finds none.   I have tried this on Windows 11 and Windows 10, with the same results.

This happens with or without the GPU help.   Happens with any accuracy setting 1 through 7.  Happens with or without 'all processors' checked.  Happens on Windows 10 or 11 - on 2 different systems.

STEPS TO REPRODUCE
1. Go to the People tab
2. Select the album I want to recognize faces
3. Select the workflow 'recognize faces only'
4. Click Scan for Faces

OBSERVED RESULT
It scans all photos in the ablum I selected and returns:
Items Scanned for Faces: 13,698
Faces found: 0

EXPECTED RESULT
Some faces found

SOFTWARE/OS VERSIONS
Windows:  11 and 10
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.3

ADDITIONAL INFORMATION
I am trying to use 8.8 because 8.7 would NOT start with my remote mysql database.  the libmysql.dll version 8.0.40.0 would crash with digikam.exe version 8.7.0.0 and the software was unusable.
Comment 1 Maik Qualmann 2025-08-11 18:11:57 UTC
I suspect a corrupted face database. We only test with current MariaDB versions, which is why MySQL and an older MariaDB version crashed in digKam-8.7.0 due to unsupported SQL syntax and an unhandled exception.

Please create a DebugView log from startup to face recognition, as described here for Windows:

https://www.digikam.org/contribute/#windows-host

Maik
Comment 2 Brian Werner 2025-08-11 19:08:43 UTC
Created attachment 183962 [details]
debug-output
Comment 3 Maik Qualmann 2025-08-11 19:16:42 UTC
Yes, your face database is broken. I suspect you removed the MySQL configuration from the log. You need to delete the face database; it will be recreated the next time you restart. If you only created a shared database, I'll write the tables you need to delete. There's nothing we can do here.

[35504] digikam.facedb: DBFaceVersion not available! Giving up schema upgrading.
[35504] digikam.facesengine: IdentityProvider::initialize() failed!

Maik
Comment 4 Brian Werner 2025-08-11 23:38:56 UTC
I removed the faces DB, however it did not recreate anything.  Same results.  

I have removed all MySQL DB's, removed the application completely, and cleaned up.  Removed mySQL, Deployed MariaDB, and re-installed 8.7 stable release.  I am now able to execute the face scanning, and face recognition as expected.

The 8.7 documentation calls out mySQL works, however it definitely does not, and MariaDB is the solution.
Comment 5 Maik Qualmann 2025-08-12 06:23:57 UTC
MySQL should still work for an external database, a DebugView log would be good so we can adapt the problem for MySQL.

Maik
Comment 6 Maik Qualmann 2025-08-15 10:37:05 UTC
Git commit a14dc4373a664e406cc4dc3d5732826ffb1abbc6 by Maik Qualmann.
Committed on 15/08/2025 at 10:36.
Pushed by mqualmann into branch 'master'.

fix creating FaceMatrices table with MySQL

M  +6    -3    core/data/database/dbconfig.xml.cmake.in

https://invent.kde.org/graphics/digikam/-/commit/a14dc4373a664e406cc4dc3d5732826ffb1abbc6
Comment 7 caulier.gilles 2025-08-17 14:21:49 UTC
@Brian,

The digiKam 8.8.0 pre-release Windows installer will be updated from Qt framework 6.8.3 to 6.9.0 in one hour. The file will be available soon at this place:

https://files.kde.org/digikam/

Please test give us a feedback to see if the dysfunction still reproducible.
Thanks in advance

Gilles Caulier
Comment 8 Maik Qualmann 2025-08-18 10:31:10 UTC
Git commit 377c0cc6b2d2bcbec459f9929f9d0bc9644e3e12 by Maik Qualmann.
Committed on 18/08/2025 at 10:30.
Pushed by mqualmann into branch 'master'.

fix creating FaceMatrices table with MySQL #2

M  +3    -5    core/data/database/dbconfig.xml.cmake.in

https://invent.kde.org/graphics/digikam/-/commit/377c0cc6b2d2bcbec459f9929f9d0bc9644e3e12
Comment 9 Maik Qualmann 2025-08-19 10:28:00 UTC
digiKam now works again with an external Oracle MySQL database.

Maik