SUMMARY STEPS TO REPRODUCE 1. Open DigiKam 2. Try to recognize and classify faces OBSERVED RESULT It detects the faces, but it can't classify it, it writes all as "Unrecognized" face EXPECTED RESULT Putting faces in their "people" tags SOFTWARE/OS VERSIONS Archlinux latest updates 16/July/2025 KDE Plasma Version: Not using KDE KDE Frameworks Version: 6.16.0 Qt Version: 6.9.1 ADDITIONAL INFORMATION Error shows at start: $ digikam Fontconfig warning: using without calling FcInit() digikam.facesengine: FaceClassifier::loadTrainingData: exception: OpenCV(4.12.0) /usr/include/opencv4/opencv2/core/mat.inl.hpp:921: error: (-215:Assertion failed) (unsigned)(pt.x * DataType<_Tp>::channels) < (unsigned)(size.p[1] * channels()) in function 'at'
*** This bug has been marked as a duplicate of bug 506663 ***
I cannot reproduce the exception on 3 Windows machines, nor on my development version of OpenSUSE Tumbleweed. Please test whether the problem can be reproduced with our AppImage. Maik
(In reply to Maik Qualmann from comment #2) > I cannot reproduce the exception on 3 Windows machines, nor on my > development version of OpenSUSE Tumbleweed. > > Please test whether the problem can be reproduced with our AppImage. > > Maik Hi With the AppImage is working fine. Seems AppImage is using libOpenCV 4.11.0 also (As information shows it)
The exception must occur here, I think. In principle, the exception could only occur if there were no column in the training data array. Let's see... https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/facesengine/recognition/faceclassifier.cpp?ref_type=heads#L322 Maik
Maik, I plan to update OpenCV to 4.12 in all Bundles. I do it soon or i wait a little bit ? Gilles
Hi Gilles, I think we're still waiting for 4.12. I just noticed that Tumbleweed is also still on 4.11. It might be an API change in the cv::ml::TrainData class or a bug. I'll keep researching it. Maik
Could be an explanation... https://github.com/opencv/opencv/wiki/OpenCV-Change-Logs#updated-dnn-deep-learning-inference-module Maik
Git commit afe5772bf982e95bdf312dd627031bf838564249 by Maik Qualmann. Committed on 16/07/2025 at 16:29. Pushed by mqualmann into branch 'master'. try to fix exception with OpenCV-4.12 Related: bug 506663 M +1 -1 core/libs/facesengine/recognition/faceclassifier.cpp https://invent.kde.org/graphics/digikam/-/commit/afe5772bf982e95bdf312dd627031bf838564249
kevinpr@jkanetwork.com The digiKam 8.8.0 pre-relelase AppImage have been rebuilt using last Qt 6.9.1, OpenCV 4.12, and KDE framework 6.16. https://files.kde.org/digikam/digiKam-8.8.0-20250719T191430-Qt6-x86-64.appimage.mirrorlist Can you reproduce the problem with this version? Best regards Gilles Caulier
I also experienced the bug on Arch Linux and have rebuilt the package locally with the patch by Maik applied. The issue is resolved by that, face recognition works again and there is also no more error on startup. As that patch is most likely included in the latest AppImage I would assume that this also works, but have not tested it.
Thanks for the feedback on Arch Linux, I also confirm that AppImage works with OpenCV-4.12. Maik
(In reply to caulier.gilles from comment #9) > kevinpr@jkanetwork.com > > The digiKam 8.8.0 pre-relelase AppImage have been rebuilt using last Qt > 6.9.1, > OpenCV 4.12, and KDE framework 6.16. > > https://files.kde.org/digikam/digiKam-8.8.0-20250719T191430-Qt6-x86-64. > appimage.mirrorlist > > Can you reproduce the problem with this version? > > Best regards > > Gilles Caulier Works for me also :) Thanks to all
The patch has been applied to the Arch Linux Package, so it is also fixed downstream. Thanks a lot to all involved.