Bug 495006 - Digikam crashes when trying to run yunet face detection
Summary: Digikam crashes when trying to run yunet face detection
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Detection (other bugs)
Version First Reported In: 8.5.0
Platform: Appimage Linux
: NOR crash
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-18 20:28 UTC by Petr Schonmann
Modified: 2024-10-21 20:49 UTC (History)
2 users (show)

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


Attachments
backtrace (76.50 KB, text/plain)
2024-10-18 20:40 UTC, Petr Schonmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Schonmann 2024-10-18 20:28:00 UTC
SUMMARY
Digikam digiKam-8.5.0-20241018T160115-Qt6-x86-64-debug.appimage crash

STEPS TO REPRODUCE
1. Run Yunet model, Face  size large - 85 accuracy
2. Bang !


OBSERVED RESULT

[Switching to Thread 0x7fff23e00640 (LWP 2754739)]
Digikam::DNNFaceDetectorYuNet::loadModels (this=0x555555cd4ed0) at /dktemp/digikam-master/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryunet.cpp:69
69	/dktemp/digikam-master/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryunet.cpp: Adresář nebo soubor neexistuje.

This means in czech that file doesnt exists

(gdb) bt
#0  Digikam::DNNFaceDetectorYuNet::loadModels (this=0x555555cd4ed0) at /dktemp/digikam-master/core/libs/facesengine/detection/opencv-dnn/dnnfacedetectoryunet.cpp:69
#1  0x00007ffff6020ef8 in Digikam::OpenCVDNNFaceDetector::OpenCVDNNFaceDetector (this=this@entry=0x7ffe4c037c70, model=model@entry=Digikam::DNNDetectorYuNet) at /dktemp/digikam-master/core/libs/facesengine/detection/opencv-dnn/opencvdnnfacedetector.cpp:57
#2  0x00007ffff601ed96 in Digikam::FaceDetector::Private::backend (this=this@entry=0x55556077aa10) at /dktemp/digikam-master/core/libs/facesengine/detection/facedetector.cpp:66
#3  0x00007ffff601ef9e in Digikam::FaceDetector::Private::applyParameters (this=0x55556077aa10) at /dktemp/digikam-master/core/libs/facesengine/detection/facedetector.cpp:89
#4  0x00007ffff601e40c in Digikam::FaceDetector::setParameters (this=this@entry=0x555560aa0d68, parameters=...) at /dktemp/digikam-master/core/libs/facesengine/detection/facedetector.cpp:252
#5  0x00007ffff77a84b0 in Digikam::DetectionWorker::setAccuracyAndModel (this=0x555560aa0d50, detectAccuracy=<optimized out>, detectModel=<optimized out>, detectSize=<optimized out>, recognizeAccuracy=0.84999999999999998, recognizeModel=Digikam::FaceScanSettings::SFace)
    at /dktemp/digikam-master/core/utilities/facemanagement/workers/detectionworker.cpp:79
#6  0x00007ffff3bc0178 in QObject::event(QEvent*) () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Core.so.6
#7  0x00007ffff4d8bbb6 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Widgets.so.6
#8  0x00007ffff3b6937a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Core.so.6
#9  0x00007ffff3b6cdb9 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Core.so.6
#10 0x00007ffff3e42cc7 in ?? () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Core.so.6
#11 0x00007ffff391bd3b in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff39712b8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff39193e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff3e424fe in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Core.so.6
#15 0x00007ffff3b757fb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Core.so.6
#16 0x00007ffff5c360ee in Digikam::WorkerObjectRunnable::run (this=0x7ffe7c028130) at ././/include/QtCore/qflags.h:74
#17 0x00007ffff3d20844 in ?? () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Core.so.6
#18 0x00007ffff3d17b91 in ?? () from /tmp/.mount_digiKaKHkEQk/usr/lib/libQt6Core.so.6
#19 0x00007ffff3294ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#20 0x00007ffff3326850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

EXPECTED RESULT
 Just work :)

SOFTWARE/OS VERSIONS
(available in the Info Center app, or by running `kinfo` in a terminal window)
Linux/KDE Plasma: 
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version:
Comment 1 Maik Qualmann 2024-10-18 20:34:03 UTC
Was there a prompt to download the new model data? Did you then restart digiKam?

Maik
Comment 2 Petr Schonmann 2024-10-18 20:40:58 UTC
Created attachment 174999 [details]
backtrace
Comment 3 Petr Schonmann 2024-10-18 20:44:35 UTC
Prompt was there when i first started 8.5.0 with this build digiKam-8.5.0-20241008T174010-Qt6-x86-64.appimage since this i didnt noticed new prompt to redownload files .
This is what i have downloaded in share folder

pschonmann@E495:~/.local/share/digikam/facesengine$ md5sum *
4fdfb6d202e9d8e65da14c78b604af95  classification_classes_ILSVRC2012.txt
8fc50561361f8bcf96b0177086e7616c  coco.names
bf7a2a8de014b7b187783f1da382485c  deploy.prototxt
4ae92eeb150c82ce15ac80738b3b8167  face_detection_yunet_2023mar.onnx
c95bfd8cc1adf05210e979ff623013b6  openface_nn4.small2.v1.t7
f737f886e33835410c69e3ccfe0720a1  res10_300x300_ssd_iter_140000_fp16.caffemodel
7e3acfc46e96d4c8e348b08bae4d4ad7  resnet50.onnx
1a5e4907743ef50402a575cf607f8600  shapepredictor.dat
6f757512d5dd1bbe0aff960098e595a9  weights_inceptionv3_299.pb
74560ce682eb91f8e2d7e564f952a351  yolov3-face.cfg
3a8d3b03ef11df2f64bf07e21271184d  yolov3-wider_16000.weights
d95834c8163d256a499e18828fcf0ca2  yolov5n_batch_16_s320.onnx
0e8c58b3610ce489b0b7dee9cf167e34  yolov5x_batch_16_s320.onnx
Comment 4 Petr Schonmann 2024-10-18 20:47:34 UTC
pschonmann@E495:~/.local/share/digikam/facesengine$ ls -lsah *
 32K -rw-rw-r-- 1 pschonmann pschonmann  22K Feb 17  2024 classification_classes_ILSVRC2012.txt
 12K -rw-rw-r-- 1 pschonmann pschonmann  625 Feb 17  2024 coco.names
 36K -rw-rw-r-- 1 pschonmann pschonmann  28K Aug 24  2022 deploy.prototxt
236K -rw-rw-r-- 1 pschonmann pschonmann 228K Oct  8 22:04 face_detection_yunet_2023mar.onnx
 31M -rw-rw-r-- 1 pschonmann pschonmann  31M Aug 24  2022 openface_nn4.small2.v1.t7
5.2M -rw-rw-r-- 1 pschonmann pschonmann 5.2M Aug 24  2022 res10_300x300_ssd_iter_140000_fp16.caffemodel
 98M -rw-rw-r-- 1 pschonmann pschonmann  98M Feb 17  2024 resnet50.onnx
 65M -rw-rw-r-- 1 pschonmann pschonmann  65M Aug 24  2022 shapepredictor.dat
 84M -rw-rw-r-- 1 pschonmann pschonmann  84M Dec 21  2022 weights_inceptionv3_299.pb
 20K -rw-rw-r-- 1 pschonmann pschonmann 8.2K Aug 24  2022 yolov3-face.cfg
235M -rw-rw-r-- 1 pschonmann pschonmann 235M Aug 24  2022 yolov3-wider_16000.weights
7.3M -rw-rw-r-- 1 pschonmann pschonmann 7.3M Feb 17  2024 yolov5n_batch_16_s320.onnx
331M -rw-rw-r-- 1 pschonmann pschonmann 331M Feb 17  2024 yolov5x_batch_16_s320.onnx
Comment 5 caulier.gilles 2024-10-18 20:49:15 UTC
Please follow instructions from this page to run the AppImage in GDB :

https://www.digikam.org/contribute/
Comment 6 Petr Schonmann 2024-10-18 20:54:30 UTC
BT from appimage  debug command is in Description, backtrace in attachement  is from  https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
Comment 7 Petr Schonmann 2024-10-18 21:00:48 UTC
The download button to "redownload" is grayed out >> https://share.schonmann.eu/ouc2es.png
Comment 8 Petr Schonmann 2024-10-21 19:52:27 UTC
Yunet is working in digiKam-8.5.0-20241021T160057-Qt6-x86-64.appimage again