Bug 456263 - Missing feature for searching pictures containing actual detected faces
Summary: Missing feature for searching pictures containing actual detected faces
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Searches-Advanced (show other bugs)
Version: 7.7.0
Platform: Microsoft Windows Microsoft Windows
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-02 23:17 UTC by Roberto
Modified: 2022-07-07 06:18 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto 2022-07-02 23:17:46 UTC
SUMMARY
Advanced search has options for finding pictures based on "People" tags. But those include both detected faces and people tags created manually.

STEPS TO REPRODUCE
N/A

OBSERVED RESULT

EXPECTED RESULT
I created several people tags manually to support mapping pictures where people's faces which are not detected by the program (scans of very old pictures, bad quality/very small pictures).
I would like to have the possibility to find pictures containing detected faces only (at least on rectangle containing a face), not just people tags.

SOFTWARE/OS VERSIONS
Windows: 10
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2022-07-03 05:36:06 UTC
All automatically detected faces can be found in the People sidebar under Unknown or Unconfirmed. Also the manually drawn face regions. If you have assigned a name (tag) to an automatically detected face, it is no longer possible to distinguish whether it was drawn manually or found automatically. So face regions with names can no longer be distinguished by Advanced Search.

We could only find face regions that were found automatically as long as no name was assigned. Is this what you wishes?

As I said, you can already find these in the People sidebar.

Maik
Comment 2 Roberto 2022-07-03 08:27:32 UTC
I need to find old pictures where face detection didn't work. Years back, I needed to people-tag those pictures manually to be able to find them, even w/o the face being detected by the then current version of the digikam.

Now I could find those (and actually detect the faces with current digikam) if I could selected by people tags and compared with the existence of real face rectangles. The other solution, as I see it, would be to run face etectionon on my full set of 40K+ pictures which would not only consume enourmous processing time but probably create other issues.

I assume finding face rectangles by picture is technically possible because it is exactly what is done to be able to show them when you open the preview picture window, both for named and not named faces. But that is not possible inadvanced searches.
Comment 3 Maik Qualmann 2022-07-03 14:34:54 UTC
There is no difference between auto-detected or manual face regions in the database after a name has been assigned. There's nothing Advanced Search could look for. But maybe I misunderstood your wish.

Maik
Comment 4 Roberto 2022-07-04 11:22:05 UTC
In digikam4.db:
- if you search tags in table Tags for pid=0 and name="People" you get the tag id for people tags
- then if you search in table ImageTags for those people tags, you get all people tags in the image
- finally if you then search in table ImageTagProperties images containing people tags and no property="tagRegion", you will find all pictures wich have people tags but no face rectangle.
No?
Comment 5 Maik Qualmann 2022-07-07 06:12:33 UTC
Git commit d2ebafecbe510ba92dbc820296b9e0370b5e767d by Maik Qualmann.
Committed on 07/07/2022 at 06:11.
Pushed by mqualmann into branch 'master'.

add to Advanced Search by number of face regions
and items without face regions
Related: bug 439643
FIXED-IN: 8.0.0

M  +3    -1    NEWS
M  +39   -0    core/libs/database/item/query/itemquerybuilder.cpp
M  +19   -1    core/utilities/searchwindow/searchfields_createfield.cpp
M  +15   -1    core/utilities/searchwindow/searchgroup.cpp

https://invent.kde.org/graphics/digikam/commit/d2ebafecbe510ba92dbc820296b9e0370b5e767d
Comment 6 Maik Qualmann 2022-07-07 06:18:20 UTC
To get your desired search result, select all people tags under the tag search selection and check the "Return Items without face regions" checkbox under the new "Face regions" section.

Maik