Bug 415557 - Face detection - Advanced settings : restricted folder scope not taken into account
Summary: Face detection - Advanced settings : restricted folder scope not taken into a...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 7.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-25 17:54 UTC by Alexandre Belz
Modified: 2020-01-05 12:11 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.0.0


Attachments
Settings (203.35 KB, image/jpeg)
2019-12-25 17:54 UTC, Alexandre Belz
Details
Files out of scope nevertheless beeing scanned. (393.32 KB, image/jpeg)
2019-12-25 17:55 UTC, Alexandre Belz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Belz 2019-12-25 17:54:55 UTC
Created attachment 124710 [details]
Settings

SUMMARY
I'm testing the new 7.0 Deep Learning feature.
I can't scan only a portion/folder of my collection. adhoc Setting is not taken into account.

STEPS TO REPRODUCE
1. Open digikam with plenty of pictures
2. Go to people / Scan collection for faces / Options
3. in Albums setting tab, disable "Whole Album collection" and select only a small subfolder . See screen capture attached.
4. in Advanced setting tab, enable "Clear an rebuild database"
    Note : upper choice (detection/recognition) becomes greyed. I don't understand why.

5. Click "Scan"

OBSERVED RESULT
It takes a long time to scan a small folder with just 3 pictures.
Windows Performance manager (HDD tab) confirms that digikam scans ALL pictures in my collections, and not just the subfolder I did select. See screen capture attached.

EXPECTED RESULT
The Deep Learning face scan should be possible on a subfolder.

SOFTWARE/OS VERSIONS
Windows: 10
Comment 1 Alexandre Belz 2019-12-25 17:55:30 UTC
Created attachment 124711 [details]
Files out of scope nevertheless beeing scanned.
Comment 2 Alexandre Belz 2020-01-02 11:27:12 UTC
The bug is still reproducible with latest builds of 7.0 Beta.
the scan is always running on the "Whole Album collection" even if the tick box is disabled.
Comment 3 Alexandre Belz 2020-01-02 11:44:20 UTC
This issue only happens when check box "Clear and rebuild all training data" is enabled.
Comment 4 Maik Qualmann 2020-01-02 12:18:43 UTC
Ok, now I understand the bug report, but it's not a bug. If you activate the option to delete and rebuild the training data, the entire collection will always be scanned. All confirmed faces with new facial matrices are generated in the database.

Maik
Comment 5 Alexandre Belz 2020-01-02 13:33:30 UTC
Thank you Maik for this explanation.

There is something i don't understand, then : as the User Manual explains,
"In case of unsatisfying results it might be helpful to use Clear and rebuild all training data. One reason can be that there are too many face tags assigned to a person which shows this person in a way that doesn't really help the search algorithm, e.g. with sunglasses, blurred, unusual colors, carnival make up, dark shaded areas in the face, baby/kid/adult photographs mixed..."

... i then expect the possibility to reject some folders (odd faces) and rebuild the DNN database on recent pictures only (the selected folders). Which is not possible currently. 
If we rebuild the learning DNN database on the whole collection, we'll still re-include old/misleading pictures... 
Don't you think so ?
Comment 6 Maik Qualmann 2020-01-02 13:51:17 UTC
It makes no sense to update just a part, because then the facial matrices for the other people are missing. We didn't use any limitation in the past, thousands of facial matrices were inserted by one person, which led to a huge database and digiKam's downtime. The last 20 facial matrices of a person are currently being saved. I just set the 20. Yes, that could also be the 20 worst, until new ones are added and the older ones slip out.

Maik
Comment 7 Alexandre Belz 2020-01-02 15:14:35 UTC
Ok.

then for the sake of usability improvememt.

1) when "rebuild" tickbox is enabled, could the "Whole collection" tickbox be forced to  enabled, grayed, to show the user that this is the normal consequence ?

2) maybe this is a "maintenance" feature that would have a better place in the maintenance part..
Comment 8 Maik Qualmann 2020-01-02 18:49:06 UTC
The album selector is already deactivated when the training option is activated. We will think about moving the training mode into the maintenance tool. I close the bug for now.

Maik
Comment 9 caulier.gilles 2020-01-02 19:31:13 UTC
yes, Maik, i think too that Maintenance is the right place for this feature.

Gilles
Comment 10 Alexandre Belz 2020-01-02 20:32:48 UTC
Thank you both of you !
And Happy New year !
Comment 11 Maik Qualmann 2020-01-02 22:02:31 UTC
Git commit 812eda4a540edb2ce1ec07ec63270b591c6ed164 by Maik Qualmann.
Committed on 02/01/2020 at 22:01.
Pushed by mqualmann into branch 'master'.

move "clear and rebuild training data" to the Maintenance tool

M  +0    -1    core/app/views/sidebar/peoplesidebarwidget.cpp
M  +1    -28   core/utilities/facemanagement/widgets/facescanwidget.cpp
M  +0    -6    core/utilities/facemanagement/widgets/facescanwidget.h
M  +0    -2    core/utilities/facemanagement/widgets/facescanwidget_p.h
M  +26   -9    core/utilities/maintenance/maintenancedlg.cpp

https://invent.kde.org/kde/digikam/commit/812eda4a540edb2ce1ec07ec63270b591c6ed164
Comment 12 Alexandre Belz 2020-01-05 12:11:45 UTC
Confirmed, solved. Thank you Maik.