Bug 485992 - Face recognition, small part or half face
Summary: Face recognition, small part or half face
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Detection (other bugs)
Version First Reported In: 8.4.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Michael Miller
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-23 05:34 UTC by Andy
Modified: 2024-10-23 19:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.5.0
Sentry Crash Report:


Attachments
1 (154.40 KB, image/png)
2024-04-23 05:34 UTC, Andy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy 2024-04-23 05:34:43 UTC
Created attachment 168824 [details]
1

Hello, when I want to assign names to the faces found, I always notice faces that are only partially framed. 
Does it make sense to extend these frames to the entire face?
Can I adjust something in the program so that this no longer happens? 
Would recognizing faces work better?
Regards
Andy
Comment 1 Maik Qualmann 2024-04-23 05:45:38 UTC
Were these faces detected with or without the YoloV3 option?

Maik
Comment 2 Andy 2024-04-23 05:52:22 UTC
Yolo v3 is aktiv
Value 70

Andy
Comment 3 Maik Qualmann 2024-04-23 06:15:30 UTC
Which image format? RAW images?

Maik
Comment 4 Andy 2024-04-23 06:27:42 UTC
They are all JPGs

Andy
Comment 5 Andy 2024-04-24 17:57:38 UTC
Hi! I got new photos with my wife and me. Sometimes me and another person are recognized, but my wife next to me is not. Then there is a photo with both of us in it. Neither of us will be recognized. So just the facial recognition (frame). We are not recognized as a person at all. No names are suggested, although there are really many faces of us.
Can I upload some photos to you for testing? So that not everyone sees it?
Comment 6 Andy 2024-04-28 07:08:38 UTC
Here's another note: 
I have a group photo with 10 faces from the front. Without YOLOv3 no faces are found. 
No faces are found with YOLOv3, but 4 cutouts of jackets are found.
Maybe the people are a little too far away. But in other photos (same distance) some faces are found.

I have currently ignored 6900 faces. And there will be more.
If I remove these faces from the database, will the search results be better? Are these faces included in the training data?

Andy
Comment 7 caulier.gilles 2024-10-07 20:30:17 UTC
Hi Andy,

Under Linux i never seen this dysfunction, only false positive area without face.

>If I remove these faces from the database, will the search results be better? 

No. This depend of the model used to detect face.

>Are these faces included in the training data?

No, the training data are only computed with the recognition stage and a pre-tag of face manually.

But we have a new DNN model for the face recognition : YuNet. This one is faster and really good. It's planed for next  8.5.0.
And for the recognition, a new one too: SFace. Many fixes and improvement will arrive with 8.5.0.

Best

Gilles Caulier
Comment 8 Andy 2024-10-10 17:12:29 UTC
Hello Gilles,

Thanks! I'm already trying it out.
Comment 9 Michael Miller 2024-10-10 18:26:13 UTC
Hi Andy,
There will be a new build in a few days with the SFace recognition model.  Gilles approved the merge request an hour or so ago. SFace is more accurate at recognizing and matching tagged faces in your library.  Might be useful.

Also, don't forget you can change the detection settings in the lower left of the people bar, and then right click on an image to use the new settings just for that image.

Cheers,
Mike
Comment 10 caulier.gilles 2024-10-10 18:36:42 UTC
>There will be a new build in a few days with the SFace recognition model.

This evening in fact...

Gilles
Comment 11 Andy 2024-10-10 18:46:24 UTC
This?     digiKam-8.5.0-20241007T190214-Qt6-Win64
Comment 12 Maik Qualmann 2024-10-10 19:58:09 UTC
No, not yet, the new features have not been merged into the master branch yet. Just wait a little longer.

Maik
Comment 13 caulier.gilles 2024-10-10 20:14:52 UTC
no. digiKam-8.5.0-20241010T191559-Qt6-Win64.exe

https://files.kde.org/digikam/
Comment 14 Andy 2024-10-10 20:44:08 UTC
YuNet is no longer an option. SSD is now available instead.
Comment 15 Michael Miller 2024-10-10 21:15:56 UTC
Gilles,
Are we including OpenCV in the Windows package or requiring the end user to install it?  Is this why we had to put the OpenCV 4.10.0 check in?

Andy,
YuNet and SFace require OpenCV version 4.10.0 or higher.  We added a check to make sure the OpenCV version was compatible.  We'll research if this is a bug in the code that checks the version, or something else.

Stay tuned...

Cheers,
Mike
Comment 16 Maik Qualmann 2024-10-10 21:19:18 UTC
OpenCV is currently only available in version 4.8.0 in vcpgk. We'll have to wait a bit, I guess.

Maik
Comment 17 Michael Miller 2024-10-10 22:02:45 UTC
I did a little research, and I was wrong.  YuNet was added to OpenCV in v4.5.1, and updated in 4.5.4.  I'll update the checks tonight to check for a minimum OpenCV version of 4.6 for YuNet.  SFace is the same.

Cheers,
Mike
Comment 18 Michael Miller 2024-10-11 23:07:37 UTC
Hi Andy,
It looks like there is a new build of digiKam from today.  It should have both YuNet and SFace detection and recognition models enabled on Windows.  Can you give it a try, please?

Cheers,
Mike
Comment 19 Andy 2024-10-12 05:57:55 UTC
I saw it yesterday and installed it. Thank you for the change!
One person had 15,000 unconfirmed faces. It was anything but that person.
Search again and merge results. And recognize faces. Reduced the number to 4,000 unconfirmed faces. That's already a success!
Comment 20 Michael Miller 2024-10-12 12:25:39 UTC
Hi Andy,
For face recognition, set the accuracy to about 60%. You should get almost 0 false positives if the people you’ve tagged are all correct. I will be updating the documentation soon.

Cheers,
Mike
Comment 21 Andy 2024-10-12 14:56:00 UTC
All right! I'll try 60.
The default is 70. I used that for now.

Andy
Comment 22 Michael Miller 2024-10-12 15:17:51 UTC
I'm working on updating the defaults for the models.  Hopefully I'll have something in a few days.  For now, try this:

Low false-positive rate, but will miss some faces and matches
YuNet: 60%
Large faces
SFace: 60%

More faces and matches, a few false positives:
YuNet: 55%
medium faces
SFace: 50%

everything, but lots of false positives:
YuNet: 45%
Extra Small faces
SFace: 40%

Cheers,
Mike
Comment 23 Michael Miller 2024-10-23 17:38:08 UTC
Gilles,
I think we can close this.

Cheers,
Mike