Bug 420128 - Poor result of face detection (7.0.0. beta2)
Summary: Poor result of face detection (7.0.0. beta2)
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Detection (show other bugs)
Version: 7.2.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-15 17:31 UTC by Sandra Seilmann
Modified: 2021-01-21 07:18 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.2.0


Attachments
samples (2.16 MB, application/x-zip-compressed)
2020-04-15 17:31 UTC, Sandra Seilmann
Details
YOLO-Detection.jpg (157.85 KB, image/jpeg)
2020-04-15 18:30 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sandra Seilmann 2020-04-15 17:31:50 UTC
Created attachment 127568 [details]
samples

I've ran face detection several times on tousands of photos whith very poor results

For instance, in the attached picture (1) I'd expect the algorithm to detect 6-7 faces.
In the attached picture (2) I'd expect the algorithm to detect 12 faces.
On my System (intel I5-3500, 16 GB, Win x64) only 3 are detected in 1 and none at all in 2.

I've varied the sensivity between 0 and 100 (every ten), to no avail.
I've tried all possible variations of settings in the maintenance tool as well.

After the face detection is finished, there is no "unknown" tag in the left people-sidebar, but when I open the pictures in the albums view and enable "show faces tag", the mentiones 3 tags are visible.

Since I mainly work on b/w pictures it might be related to that.
Also, it may be same as bug 415561?


STEPS TO REPRODUCE
1. Create new database
2. Create new album with attached images
3. Scan for faces
Comment 1 Maik Qualmann 2020-04-15 18:30:22 UTC
Created attachment 127572 [details]
YOLO-Detection.jpg

This is what the face detection would look like if we were to use a different precalculated model, see screenshot, all faces detected. The current face detection is now much better than in digiKam-6.x and earlier. But there are images where it fails. The disadvantage of the model that  has the good detection is that it is much slower and the model has a file size of over 200MB. As part of the GSoC2020 we want to offer an option to download this better face model.

Maik
Comment 2 Sandra Seilmann 2020-04-16 05:27:11 UTC
Thanks, Mike.

since accoring your explanation this an expected behaviour of the currently used model, rather than a bug, I've set the status to resolved-intentional.

Cheers,
Sandra
Comment 3 Maik Qualmann 2020-04-16 05:43:17 UTC
We leave the bug open until a student as part of the GSoC2020 has implemented this option to download the better model. This is a good bug report with the test images. In the other sample image in the set, also all faces are detected with the YOLO model.

Maik
Comment 4 nonobio 2020-09-21 12:56:14 UTC
Hello,

I have the same problem : face detection doesn't find a lot of faces and doesn't seem to recognise my already tagged ones.

If i understood correctly, there will be a "model" to download which will offer better results ? 

Do you know when it will be available ?

Thanks

Thanks
Comment 5 caulier.gilles 2020-09-21 13:13:12 UTC
Try with 7.2.0-beta1 avaialble here :

https://files.kde.org/digikam/

Gilles Caulier
Comment 6 nonobio 2020-09-22 06:39:02 UTC
Hello,

After upgrading to 7.2.0-beta1 and rebuilding training data, a new analyze (doesn't ignore already analyzed) doesn't seem to give better results for me :

It doesn't found a lot of faces and i have none suggestions : all found faces are "Who is it ?"

I tried with attachments 1 and 2 and it is like Sandra Seilmann says :
"only 3 are detected in 1 and none at all in 2." : not better with 7.2.0-beta1.

Thanks
Comment 7 Maik Qualmann 2020-09-22 11:49:41 UTC
What sensitivity have you set? Attempt 50-66. Note that the People view differentiates between face detection and face regonition. After the face detection, only unknown faces are found. Then you have to run the face recognition to get a suggestion.

Maik
Comment 8 nonobio 2020-09-22 12:12:27 UTC
I had  sensibility "80", which is the default after installing Digikam, but strangely, the "default button" set to 70.

Anyway, i tried with "50", first "detect" faces then "recognize" faces : it's ok for recognizing : i have some suggestions now but there isn't more faces "detected".

With attachments 1 and 2 it isn't better :"only 3 are detected in 1 and none at all in 2.".

So, in all cases i have to always run first "Detect faces" then "Recognize faces" ? I usually use the contextual items actions : "Find faces". Is it similar to "Detect faces" from People view ? Do you plan to add the "Recongnize faces" to the contextual menu too ?

Thanks
Comment 9 Thomas Beckler 2020-11-14 11:13:27 UTC
I run 7.2.0-beta1 on some of my images and I get very poor results on face detection. I played with the sensitivity but like Sandra and nonobio there is only a small improvement.

Based on your previous comments I understand that the "new face model" is part of 7.2.0-beta1 but there is no improvement on the face detection for the sample photos of Sandra. 
Is the "new face model" included in 7.2.0-beta1?
How do I need to configure Digikam to detect the faces as you showed in "YOLO-Detection.jpg" 

Honestly I don't care on a significant increase of processing time, as this task can easily run over night or for several days.
Comment 10 Maik Qualmann 2020-11-16 21:34:04 UTC
Git commit 32333a2719bfc0d97d631a84889b56d3f5a9a7ad by Maik Qualmann.
Committed on 16/11/2020 at 21:32.
Pushed by mqualmann into branch 'master'.

add checkbox for YOLO v3 face detection
Related: bug 426309, bug 415559
FIXED-IN: 7.2.0

M  +1    -0    core/app/views/stack/itemiconview_search.cpp
M  +1    -0    core/libs/album/treeview/albumselectiontreeview.cpp
M  +9    -1    core/libs/facesengine/detection/facedetector.cpp
M  +2    -0    core/libs/settings/applicationsettings.cpp
M  +3    -0    core/libs/settings/applicationsettings.h
M  +10   -0    core/libs/settings/applicationsettings_miscs.cpp
M  +3    -0    core/libs/settings/applicationsettings_p.cpp
M  +2    -0    core/libs/settings/applicationsettings_p.h
M  +1    -0    core/utilities/facemanagement/database/facescansettings.cpp
M  +3    -0    core/utilities/facemanagement/database/facescansettings.h
M  +8    -8    core/utilities/facemanagement/threads/facepipeline.cpp
M  +1    -1    core/utilities/facemanagement/threads/facepipeline.h
M  +1    -1    core/utilities/facemanagement/threads/facepipeline_p.h
M  +26   -0    core/utilities/facemanagement/widgets/facescanwidget.cpp
M  +2    -0    core/utilities/facemanagement/widgets/facescanwidget_p.h
M  +2    -1    core/utilities/facemanagement/workers/detectionworker.cpp
M  +1    -1    core/utilities/facemanagement/workers/detectionworker.h
M  +1    -1    core/utilities/facemanagement/workers/recognitionworker.cpp
M  +1    -1    core/utilities/facemanagement/workers/recognitionworker.h
M  +4    -2    core/utilities/maintenance/facesdetector.cpp
M  +1    -2    core/utilities/setup/downloader/filesdownloader.cpp

https://invent.kde.org/graphics/digikam/commit/32333a2719bfc0d97d631a84889b56d3f5a9a7ad
Comment 11 Thomas Beckler 2020-11-28 21:18:03 UTC
You didn't promise to much. The face detection with YOLO model works like a charm, using the sample pictures attached and my own pictures. In my point of view the improvement in detection, justifies the increase of processing time (as mentioned in ticket 42309)
Comment 12 nonobio 2021-01-21 07:16:03 UTC
Perfect with 7.2.0-beta2 and Yolo enabled.

Thanks a lot :)
Comment 13 nonobio 2021-01-21 07:18:33 UTC
Just a little question i already asked here :

"I usually use the contextual items actions : "Find faces". Is it similar to "Detect faces" from People view ?"

If i'm right, this action from contextual menu start both "detect" and "reconize" faces ?