Bug 425263 - Blur Level on Face Detection
Summary: Blur Level on Face Detection
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Detection (show other bugs)
Version: 7.0.0
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
: 432412 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-12 15:52 UTC by Paul
Modified: 2025-02-02 13:36 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 8.6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul 2020-08-12 15:52:18 UTC
SUMMARY
Detecting blurred faces is pretty convenient on many pictures/albums,
however adding a blur-factor acceptance checkbox and filter could be a user-experience improvement.



STEPS TO REPRODUCE
1. In face detection parameters, add a blur-factor filter checkbox
2. Helped by thumbnails showing lowest blur accepted to highest blur accepted, move slider to adjust a percent value
3. confirm button to save value before launch face scan

EXPECTED RESULT:
remove faces presenting over-blur results from detected faces collection.

Best and long live Digikam
Paul


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2021-02-02 10:55:32 UTC
*** Bug 432412 has been marked as a duplicate of this bug. ***
Comment 2 Maik Qualmann 2023-04-17 19:23:32 UTC
*** Bug 468629 has been marked as a duplicate of this bug. ***
Comment 3 Craig 2023-07-20 02:28:11 UTC
I have some suggestions for improvements that encompass this problem.

On a typical set of images the ability to accurately recognise faces declines as more images are added. The main reason for this is that poor quality images pollute the reference data that the software uses for the recognition of faces. Recognised faces that are blurred, out of focus, wearing sunglasses or low resolution contain information that is too similar to other faces in the pool of faces to be recognised.

Selective Training Data
One of the best methods to improve the rate of face recognition is to improve the training data. Instead of having just two categories for faces: Confirmed and Unconfirmed, an additional category could be added, Reference. In this case only pictures of a face that are in the Reference category would be used in the recognition training data. Pictures could be categorised into the Reference category either manually or automatically. By the manual method good quality faces across a range of ages and situations (ie wearing glasses) could be tagged to be used in the Reference training data.

Obviously a large number of reference faces would still be required for the training data, but in a large album of pictures that won’t be a problem. For example I have person’s face appearing in over 14,000 images, however many of these are blurred, out of focus or low resolution. A subset of these images would still be suitable even if it only contained 10% of the images. In addition using a smaller training data set would improve the speed of clearing and rebuilding the training data.

The automatic method could use existing algorithms to exclude “Confirmed” face pictures that are blurred, low resolution or out of focus from the training data for that particular face. While an image in totality may not be blurred, low resolution or out of focus, but the section of the image that includes the face could be, and thus should be excluded from the training data.
Comment 4 caulier.gilles 2024-10-07 17:05:37 UTC
Hi Michael,

Do you think that YuNet model accept a settings about the tolerance of blurred faces ?

Best

Gilles
Comment 5 Michael Miller 2024-10-07 17:36:56 UTC
YuNet is much more accurate at detecting a blurred face.  SFace is also more accurate at matching pixelated or blurred faces.  I believe the issue is significantly improved by moving to the new models.  

I addition to using the new models, I'm also exploring using a quality metric like eDifFIQA to limit the training data.  I think it's a good idea, too.  Further testing an analysis is needed on YuNet and SFace to determine if limiting the training data is required.

Cheers,
Mike
Comment 6 Michael Miller 2024-10-07 17:45:07 UTC
Adding facial detection and recognition is a large effort, but is a possibility.  First we could generate a list of jpegs from the key frames of a video, and run the existing face pipeline on the jpegs.  FFMpeg does this quite easily.   Then doing a first-pass detection and recognition of only the faces in extracted jpegs we could eliminate duplicate faces.  The resulting set of faces could then be tied to the video.  The challenge is displaying the face tag in the appropriate time-dimension of the video.  A human sometimes needs context to remember or recognize a face, so showing the tagged face in context in the video is a good idea.

As I said, it possible, but will require a large amount of work, particularly in the digiKam UI.

Cheers,
Mike
Comment 7 Michael Miller 2025-02-02 13:36:52 UTC
Hi Paul,
We've added a face image quality assessment (FIQA) in 8.6.0.  FIQA automatically filters out blurry, pixelated, and noisy images from being used for face training.

Cheers,
Mike