Bug 501684

Summary: Duplicate region when changing the region and confirming the face.
Product: [Applications] digikam Reporter: Staller <stallerpm>
Component: Faces-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin, michael_miller
Priority: NOR    
Version First Reported In: 8.6.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 8.7.0
Sentry Crash Report:
Attachments: bug video
digikam_two_tag_faces_2

Description Staller 2025-03-18 10:09:10 UTC
Created attachment 179532 [details]
bug video

SUMMARY
if digikam detects invalid face (other name) or i wanna to update its size a bit - after updating name or size i got a new additional face tag.

STEPS TO REPRODUCE
1.  run auto face detecting
2.  change the size of face
3.  update name to correct one

4. Also some times one face has 2 diff auto tags with a bit diff size

OBSERVED RESULT
I got my updated face tag with correct name + new auto created old one

EXPECTED RESULT
I got my updated face tag with correct name

SOFTWARE/OS VERSIONS
Windows: Windows 10 22H2
digikam: 8.6.0 (3eed90b8)

ADDITIONAL INFORMATION
Bug is reproducible each time.

Video with it is attached
Comment 1 Maik Qualmann 2025-03-18 11:33:14 UTC
I can't reproduce the issue here. Is metadata written to the images? What image type is it (JPG, HEIF, RAW)? Is there any face metadata present in the image?

Maik
Comment 2 Staller 2025-03-18 12:56:12 UTC
Created attachment 179535 [details]
digikam_two_tag_faces_2

digikam_two_tag_faces_2
Comment 3 Staller 2025-03-18 12:57:16 UTC
(In reply to Maik Qualmann from comment #1)
> I can't reproduce the issue here. Is metadata written to the images? What
> image type is it (JPG, HEIF, RAW)? Is there any face metadata present in the
> image?
> 
> Maik

(In reply to Maik Qualmann from comment #1)
> I can't reproduce the issue here. Is metadata written to the images? What
> image type is it (JPG, HEIF, RAW)? Is there any face metadata present in the
> image?
> 
> Maik

> Is metadata written to the images? 
Yes

> What image type is it (JPG, HEIF, RAW)?
JPG

> Is there any face metadata present in the image?
I have capture a new clean test image from tested one with Snipping Tool  (without any tags/info etc)
Added that pic to the library
Run Face Detection
and got the next result: in attached digikam_two_tag_faces_2

and have the same result + double face tags
Comment 4 Staller 2025-03-18 13:21:13 UTC
Also after the next steps I have the same bug/behaviour:
click on Clear all faces on this images
click on Scan for Faces
Comment 5 Michael Miller 2025-03-18 15:04:42 UTC
(In reply to Staller from comment #4)
> Also after the next steps I have the same bug/behaviour:
> click on Clear all faces on this images
> click on Scan for Faces

Hi Staller,
Can you tell me what face settings you're using?  What are the accuracy settings and what face size are you using?

Cheers,
Mike
Comment 6 Staller 2025-03-18 15:21:43 UTC
(In reply to Michael Miller from comment #5)
> (In reply to Staller from comment #4)
> > Also after the next steps I have the same bug/behaviour:
> > click on Clear all faces on this images
> > click on Scan for Faces
> 
> Hi Staller,
> Can you tell me what face settings you're using?  What are the accuracy
> settings and what face size are you using?
> 
> Cheers,
> Mike

Im using default settings, have never changed them, so  
Face Detection Settings:
Accuracy 7
Face Size Large

Face Recognition Settings:
Accuracy 7

I don't get why after click on Scan for Faces BTN some faces are recognized?
Because app have special btn for recognizing:  Recognize Faces.

FYI: on prev. ver 8.5.0 it was OK, and there was no such bug/behavior.
FYI: I have already a huge lib: 100k+ photos, and in my Lib 8000 photos with one person, 4000 with other and so on in descending order
Comment 7 Michael Miller 2025-03-18 15:25:07 UTC
> Im using default settings, have never changed them, so  
> Face Detection Settings:
> Accuracy 7
> Face Size Large
> 
> Face Recognition Settings:
> Accuracy 7
Thank you.

> I don't get why after click on Scan for Faces BTN some faces are recognized?
> Because app have special btn for recognizing:  Recognize Faces.
The behavior changed in 8.6.0.  All options recognize faces.  This is expected.
 
Cheers,
Mike
Comment 8 Maik Qualmann 2025-03-18 17:58:27 UTC
Git commit e8cd2971b1105d42d042cd3dbc0d1c9d1c6039b8 by Maik Qualmann.
Committed on 18/03/2025 at 17:57.
Pushed by mqualmann into branch 'master'.

test to identify the problem in the face confirmation
Related: bug 501573

M  +2    -1    core/utilities/facemanagement/items/facegroup.cpp

https://invent.kde.org/graphics/digikam/-/commit/e8cd2971b1105d42d042cd3dbc0d1c9d1c6039b8
Comment 9 Maik Qualmann 2025-03-18 19:33:16 UTC
Git commit 9dd56d28853e39874d4e875b827ead0672cc1479 by Maik Qualmann.
Committed on 18/03/2025 at 19:32.
Pushed by mqualmann into branch 'master'.

fix duplicate region when resizing and confirming face
FIXED-IN: 8.7.0

M  +1    -1    NEWS
M  +1    -1    core/app/items/views/digikamitemview.cpp
M  +2    -7    core/utilities/facemanagement/items/facegroup.cpp
M  +6    -3    core/utilities/facemanagement/pipelines/edit/facepipelineedit.cpp
M  +1    -0    core/utilities/facemanagement/pipelines/edit/facepipelineedit.h

https://invent.kde.org/graphics/digikam/-/commit/9dd56d28853e39874d4e875b827ead0672cc1479
Comment 10 Staller 2025-03-18 19:36:42 UTC
Tnx Maik!