DK 8.5 won't detect faces: OPENCV/DNN exception

Steven Robbins steve at sumost.ca
Sun Dec 29 19:07:20 GMT 2024


Hi,

I've begun using Digikam 8.5 after a couple years not really using DK very 
much.  I wanted to detect & recognize faces.  

I read in the DK manual that "Beginning with digiKam 8.5.0, YuNet is the 
recommended model for face detection, and SFace is recommended for face 
recognition."    So I have set detection model to YuNet (Accuracy 7, Face size 
Large) and scanned a collection.  No faces were detected.  

In the console window I see the following logged multiple times (probably once 
per image file):

[ERROR:3 at 204.105] global ./modules/dnn/src/net_impl.cpp (1168) 
getLayerShapesRecursively OPENCV/DNN: [Eltwise]:(onnx_node!Add_44): 
getMemoryShapes() throws exception. inputs=2 outputs=1/1 blobs=0
[ERROR:3 at 204.105] global ./modules/dnn/src/net_impl.cpp (1174) 
getLayerShapesRecursively     input[0] = [ 1 64 29 38 ]
[ERROR:3 at 204.105] global ./modules/dnn/src/net_impl.cpp (1174) 
getLayerShapesRecursively     input[1] = [ 1 64 28 38 ]
[ERROR:3 at 204.105] global ./modules/dnn/src/net_impl.cpp (1178) 
getLayerShapesRecursively     output[0] = [ 1 64 29 38 ]
[ERROR:3 at 204.105] global ./modules/dnn/src/net_impl.cpp (1184) 
getLayerShapesRecursively Exception message: OpenCV(4.6.0) ./modules/dnn/src/
layers/eltwise_layer.cpp:251: error: (-215:Assertion failed) inputs[vecIdx][j] 
== inputs[i][j] in function 'getMemoryShapes'

I'm using Debian/unstable build of Digikam.

Am I doing something wrong here?

I should add a bit more history.  

1. Since I hadn't been using DK for years, I used the Tools/Maintenance window 
to run database cleaning; I selected all the four options.  I believe I also 
selected Rebuild Thumbnails.  I don't think I selected anything else, but 
possibly I did also run Rebuild Finger-prints.

2. I had run face detection/recognition years ago.  There were a lot of people 
tags present -- including Unconfirmed, Unknown, and Ignored.  However, I'm 
pretty sure there were other people I had tagged that no longer have a tag 
present.

3. Before I found the console logs, I went through a few rounds of fixing tags 
and re-scanning the Face Recogition.  I added a bunch more tags - which now 
have a little thumbnail which is nice.  One existing older tag that survived 
just has a "smiley face" icon, and no images are shown in the People view.  In 
the Tags view, however, there are four images under this tag.

4. I wasn't getting far so I went into the Maintenance and selected Reset and 
clear all faces and training.  Now I have just six face detections, which I 
have tagged. 

Thanks,
-Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20241229/78eca19e/attachment.sig>


More information about the Digikam-users mailing list