Bug 366558 - Face detection does not honour album selection in options
Summary: Face detection does not honour album selection in options
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Detection (show other bugs)
Version: 5.0.0
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
Depends on:
Reported: 2016-08-09 16:58 UTC by Stefano
Modified: 2017-08-02 06:32 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.2.0
Sentry Crash Report:

attachment-19793-0.html (89 bytes, text/html)
2016-08-09 17:54 UTC, Stefano
attachment-21114-0.html (77 bytes, text/html)
2016-08-09 18:32 UTC, Stefano
attachment-16110-0.html (180 bytes, text/html)
2016-08-12 06:52 UTC, Stefano

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano 2016-08-09 16:58:11 UTC
Even if you choose the albums on which face detection should be done, it always works on the entire collection.

Reproducible: Always
Comment 1 Maik Qualmann 2016-08-09 17:48:47 UTC
The problem is not to reproduce. Do you have the inclusion of keywords disabled?

Comment 2 Stefano 2016-08-09 17:54:29 UTC
Created attachment 100516 [details]

I have the "all tags" ticked.
Comment 3 caulier.gilles 2016-08-09 18:30:37 UTC
And do you use Group photos feature ? Its know that count of items is wrong when items are grouped...

Gilles Caulier
Comment 4 Stefano 2016-08-09 18:32:02 UTC
Created attachment 100517 [details]

No, I'm not using that.
Comment 5 Maik Qualmann 2016-08-09 19:31:30 UTC
The counter differs, when more than one face is detected per image. I do not really see it as a problem.

Comment 6 Maik Qualmann 2016-08-09 19:33:42 UTC
Oh, wrong thread of Comments 5...

Comment 7 robspamm 2016-08-10 21:00:13 UTC
Thanks for reporting this, I already reported it two years ago but we did not find a solution last time. I tried again with digikam 5.1 to reproduce:

- Clearing digikam.db and adding a rather small album with 100 images in it selection works for face recognition without problems
- Adding a big album (i.e. my 2016) album with 5000 images in it triggers the problem again.

Some photos in the 2016 are grouped.

Any hints where I can add some debug statements in the code or do I rather build a complete debug version at the weekend?

One additional thing: The "Unknown" tag for unknown faces is always a sub tag in one of my tag groups, is this a bug that should be reported? Like this:

- Family
- - Unknown
- - Person1
- - Person2
Comment 8 robspamm 2016-08-11 21:45:17 UTC
Good evening,
took me two years and I know now how to use the Qt Creator debugger, so here is the solution at least for my problem:

I thought that selecting the "all tags" box selects which _people/faces_ should be recognized in the images that are being searched, as in my albums all tags belong to people. Instead, selecting tags expands the list of images that is going to be searched. This is why it looked like digikam searched all albums regardless of album selection on my machine, as most albums contain some tags.

The interface makes totally sense from your point of view, but I hope you understand the problem which at least I had with the album selection. 

Maybe the default for the tag list should unchecked, as selection "all albums" automatically includes all tags.

Keep up the good work, I am going to tag some faces.
Comment 9 Stefano 2016-08-12 06:52:50 UTC
Created attachment 100558 [details]

You mean that it's an "or" selection? That's not very intuitive to me, it
should be better explained in the UI.
Comment 10 caulier.gilles 2016-08-27 06:09:08 UTC
*** Bug 367844 has been marked as a duplicate of this bug. ***
Comment 11 caulier.gilles 2016-09-14 20:26:01 UTC
Git commit 42ccb101aeb7c3ed79dd41d0d10a8f67a53883e2 by Gilles Caulier.
Committed on 14/09/2016 at 20:23.
Pushed by cgilles into branch 'master'.

make the album selection widget exclusive with album type : PAlbum or TAlbum (not and operator).
This will prevent to scan a selection of PAlbum when TAlbum are selected.
Related: bug 335013, bug 334183
FIXED-IN: 5.2.0

M  +3    -0    NEWS
M  +103  -29   libs/album/albumselectors.cpp
M  +9    -0    libs/album/albumselectors.h