Bug 415561

Summary: Face detection based on deep learning leads to no result under Windows
Product: [Applications] digikam Reporter: Alexandre Belz <alexandre.belz>
Component: Faces-DetectionAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin, morty
Priority: NOR    
Version: 7.0.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In: 7.0.0
Sentry Crash Report:
Attachments: Test File 01
Test File 02
DebugView Log file
attachment-559-0.html

Description Alexandre Belz 2019-12-25 20:36:57 UTC
Created attachment 124714 [details]
Test File 01

SUMMARY
Attached pictures leads to no a Face detection with the standard module, but to no detection at all with the DeepLearning algorithm.

STEPS TO REPRODUCE
1. Open the attached pictures, and make it the only collection.
2. Scan the whole collection, with Deep Learning
3. 

OBSERVED RESULT
No face detected

EXPECTED RESULT
Scan Collection + Deep Learning should detect and suggest people group/faces

SOFTWARE/OS VERSIONS
Windows: 10
Comment 1 Alexandre Belz 2019-12-25 20:37:15 UTC
Created attachment 124715 [details]
Test File 02
Comment 2 Maik Qualmann 2019-12-25 21:11:57 UTC
The faces are detected on both images, even with the Windows version.

Maik
Comment 3 caulier.gilles 2019-12-25 21:28:15 UTC
I tested here under Linux, no problem : faces are detected properly.

Gilles Caulier
Comment 4 Alexandre Belz 2019-12-25 22:31:35 UTC
Strange...

please can you point me to the right procedure to test successfully deep learning face recog nition ?
i may have my digikam misconfigured... or miss a step !
Is the DNN pre-learnt ? or is it blank and i should first manually add some people before it get used to detect other peoples ?
Comment 5 Alexandre Belz 2019-12-25 22:34:22 UTC
(i enabled the checked box that erases learning database, just above the selection of the deep learning algorith. was it a mistake ?)
Comment 6 Maik Qualmann 2019-12-25 22:41:33 UTC
Are you really using the latest Windows version of files.kde.org? With all Windows versions before, the DNN face detection did not work.

Maik
Comment 7 Alexandre Belz 2019-12-26 08:58:14 UTC
Hi Maik,

I'm using the 22th dec 70 beta1 release available here :
https://download.kde.org/unstable/digikam/

is there a log file I could open to check myself what went wrong ? or that i could maybe send to you ?

Alex
Comment 8 Maik Qualmann 2019-12-26 10:08:41 UTC
Download and start DebugView from Microsoft. Start digiKam and do a face search on the image. Post the messages that are available in DebugView.

Maik
Comment 9 Alexandre Belz 2019-12-26 13:27:13 UTC
Created attachment 124725 [details]
DebugView Log file

please find enclosed a DebugView log of the "Scan whole collection" triggered from the people view.
I will also test the "Scan Face" from a single picture.
Comment 10 Maik Qualmann 2019-12-26 14:00:42 UTC
After the log, you started face recognition and not detection. Please do it with a single image.

Maik
Comment 11 Alexandre Belz 2019-12-26 14:28:29 UTC
Maik, I confirm that when I click on individual "Scan for face" from "Thumbnails" or "Preview", I do see that faces are correctly detected (empty rectangles).
Then how can I trigger the DNN recognition for a single image ?

Moreover, from the People / whole collection, I now understand that if I do it in a 3 phases approach, it does work :
1) Detection (= scan for faces on every picture)
2) Tag some faces
3) Recognition (= DNN) will suggest other similar faces

This is acceptable although not self-explanatory for non digikam native users.
It would be useful to have an option to cumulate both phases !
(= Checkboxes instead of radio buttons)

I also noticed that re-launching 3) can bring me new iteratively recognized faces, do you agree ? This must be manually triggered, nothing running in background ?

Note that Picasa had the possibility to run this Detection + DNN recognition in a single activation, in background, and 
- either once (archive folder) 
- or endlessly (working folder) ... it was so easy to build people database in that mode ! DNN reported new similarities in real time.  I just had to confirm/reallocate and after 30 minutes the whole database was rebuilt !
Comment 12 Alexandre Belz 2020-01-03 10:26:14 UTC
Hello team,
how can I trigger the DNN recognition for a single image ?
When I click on individual "Scan for face" from "Thumbnails" or "Preview", I do see that faces are correctly detected (empty rectangles) but there is no name suggestion (no recognition).
Comment 13 Maik Qualmann 2020-01-03 10:35:03 UTC
With the current version, facial recognition is carried out automatically for a single image. If you don't get a name, you either haven't trained your faces enough or your set accuracy value is too high, start at 50.

Maik
Comment 14 caulier.gilles 2020-01-03 10:40:08 UTC
Alexandre,

I just tested under Windows 10, and i can confirm that Clear Trained Data do nothing. Previous face detected with LBPH algorithm (DK 6.x) still here.

Note : i used the DK 7.0.0 version generated tomorrow. Clear Training Data option still in People left sidebar, and is not moved to Maintenance tool. I recompile the last code version for Windows now.

But just to be sure that Face detection work as expected with a null database, i removed all sqlite files and restarted digiKam. I don't touch the lead DK RC configuration file here. I started a detection on my small test collection, and Unknown faces are back as expected. So the detection process work fine.

https://i.imgur.com/6B93PtG.png

Gilles Caulier
Comment 15 caulier.gilles 2020-01-03 10:40:59 UTC
i used the DK 7.0.0 version generated "tomorrow" => "yesterday" of course (:=)))
Comment 16 Alexandre Belz 2020-01-03 10:44:25 UTC
Created attachment 124865 [details]
attachment-559-0.html

Ok, thank you Maik. Will try at 50%.
Comment 17 Alexandre Belz 2020-01-03 10:46:38 UTC
Thank you Gilles. I will also retry the maintenance one.
Comment 18 Maik Qualmann 2020-01-03 11:01:55 UTC
Gilles,

deleting the training data does not delete any detected faces, that is completely normal. Because even with these, the training data for DNN are rebuilt. The training data from the LBPH are not touched, the DNN mode uses a different DB table for the data.

Maik
Comment 19 caulier.gilles 2020-01-03 11:32:15 UTC
Ok, it's more clear now.
Comment 20 Alexandre Belz 2020-01-05 12:11:01 UTC
Maintenance tested (clean database) and working fine.
Thank you Maik, you can close this ticket, Resolved.
Comment 21 caulier.gilles 2020-01-05 12:21:50 UTC
Thanks for the feedback...