Bug 459969 - Unconfirmed Faces are not grouped correctly when re-running recognition
Summary: Unconfirmed Faces are not grouped correctly when re-running recognition
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 7.8.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-04 11:28 UTC by Jens
Modified: 2022-10-16 05:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.9.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens 2022-10-04 11:28:52 UTC
SUMMARY: see $SUBJECT

STEPS TO REPRODUCE
1. import some images. Let Digikam detect faces
2. Tag some faces so the engine is trained.
3. Select all detected (unknown) faces and right-click and choose "Detect faces" again so it uses the learned faces.

OBSERVED RESULT
Faces are (mostly) correctly detected, and groups are created for detected faces, but the grouping by face in the "Unconfirmed" folder of the "Faces" tab on the left side of the screen is completely random. So Digikam detects some faces, and creates the appropriate groups within "Unconfirmed" - but then places the detected face - with the correct suggested tag - into a completely *different* group (of another person).

EXPECTED RESULT
Within one face group, all faces should have the same suggested tag. Otherwise the grouping does not make sense.

SOFTWARE/OS VERSIONS: Digikam 7.8 DMG release for MacOS on a Macbook Pro 15" with macOS 12.6 Monterey.
Comment 1 Maik Qualmann 2022-10-04 11:48:58 UTC
Step 3 is incorrect and Find Faces must not be present in the People view context menu. This also starts a new face recognition again, the old ones are first deleted and reassigned, which is probably causing the chaos. It never occurred to me to use the context menu here...

Maik
Comment 2 Jens 2022-10-04 15:46:08 UTC
Can we make this a "re-recognize faces" option instead, without removing and re-detecting them?
This would be probably much faster and it would fit in the workflow:
"detect_faces; while(detected_but_untagged_faces.count > 0) do { tag_some_unrecognized_faces, rerun_detection_engine, correct_tags }".
In fact, hiding this in the context menu is maybe even too little - it should be a prominent button at the bottom of the "Unknown" faces region because it's such a typical action.

Ideally, if fast enough, re-recognition of unknown but detected faces should automatically run whenever the faces detection database is updated, i.e. a face has been tagged or untagged. I think this is how iPhoto used to do it.

What do you think?
Comment 3 Jens 2022-10-04 15:57:47 UTC
Actually I just found out this is how the "Recognize faces" option is supposed to work... going through the "Unknown" faces and applying the currently learned known faces against those not yet tagged. Right?

But it doesn't. If I choose "Recognize faces" here, it'll put *some* faces into "Unconfirmed" but the majority will stay in "Unknown" - even very similar faces of known and tagged people. There's still something going wrong here.
Comment 4 Maik Qualmann 2022-10-04 20:06:03 UTC
Git commit 4a08c25baf396538a58dd951e04df73da710c51e by Maik Qualmann.
Committed on 04/10/2022 at 20:05.
Pushed by mqualmann into branch 'qt5-maintenance'.

active people sidebar, recognize face is now in the context menu
FIXED-IN: 7.9.0

M  +2    -1    NEWS
M  +2    -0    core/app/main/digikamapp_p.h
M  +4    -0    core/app/main/digikamapp_setup.cpp
M  +1    -0    core/app/views/stack/itemiconview.h
M  +32   -0    core/app/views/stack/itemiconview_search.cpp
M  +9    -1    core/app/views/stack/itemiconview_views.cpp

https://invent.kde.org/graphics/digikam/commit/4a08c25baf396538a58dd951e04df73da710c51e
Comment 5 Maik Qualmann 2022-10-04 20:12:17 UTC
Yes, face recognition is certainly not perfect yet. We have various bug reports on this. A student worked on improvements last year as part of GSoC-2021, these have not yet been integrated because it requires major other changes in the face engine. It is important that you confirm several people and the face engine "learns" from it.

Maik
Comment 6 Maik Qualmann 2022-10-16 05:50:52 UTC
Git commit 78008e9bf6dd2b79de800ec75f4fcaec0e4c4c3e by Maik Qualmann.
Committed on 16/10/2022 at 05:49.
Pushed by mqualmann into branch 'master'.

bring back scan for faces as scan-only in context menu
Related: bug 460464

M  +1    -0    core/app/views/preview/itempreviewview.cpp
M  +13   -8    core/app/views/stack/itemiconview_search.cpp
M  +5    -8    core/app/views/stack/itemiconview_views.cpp

https://invent.kde.org/graphics/digikam/commit/78008e9bf6dd2b79de800ec75f4fcaec0e4c4c3e