Bug 286529 - Face tag rectangles not adjusted after to apply aspect ratio crop tool
Summary: Face tag rectangles not adjusted after to apply aspect ratio crop tool
Status: CONFIRMED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 8.0.0
Platform: Compiled Sources Linux
: HI normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
: 388169 391477 428021 437353 460047 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-11-13 21:34 UTC by Daniel
Modified: 2024-01-30 11:19 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Preview Before Crop Of Test4 (1.26 MB, image/png)
2019-12-27 19:25 UTC, hardy.public
Details
Preview After Crop of Test 4. (404.95 KB, image/png)
2019-12-27 19:26 UTC, hardy.public
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel 2011-11-13 21:34:39 UTC
Version:           2.3.0 (using KDE 4.7.2) 
OS:                MS Windows

Crop a picture with four face tags attached. Saved as a new version. The face tags still exists but the representing rectangles do not match the faces.


Reproducible: Always

Steps to Reproduce:
Take a picture with face tags attach
Start image editor
Perform aspect ratio crop
Save image a new version
View the new file

Actual Results:  
The face tag exists but the rectangle does not match the face anymore

Expected Results:  
The face tag rectangle matches the face

OS: WindowsNT (i686) release Windows 7 64bit German
Compiler: cl.exe
Comment 1 Veaceslav Munteanu 2013-06-13 16:07:46 UTC
It's a known issue. Will be fixed when metadatagroup's specifications will be fully implemented. So far  only rotation adjust face tags.
Comment 2 caulier.gilles 2014-08-24 09:06:07 UTC
Veaceslav,

Any progress on this file ?

Gilles Caulier
Comment 3 Veaceslav Munteanu 2014-08-26 19:50:34 UTC
No, still have a lot of other reports on my list...
Comment 4 caulier.gilles 2015-05-10 19:04:18 UTC
Veaceslav,

It still valid with current implementation from git/master ?

Gilles
Comment 5 Veaceslav Munteanu 2015-05-11 21:57:10 UTC
If nobody worked on it, then probably is still valid.. :)
Comment 6 mr.mahon.pl 2015-05-12 11:03:48 UTC
Similar thing happens on linux with RAW photos which are vertical and presented this way because of the exif information. 

The thumbnails of automatically recognized faces are shown correctly, but when you show them on the photo they're marked in wrong positions and their aspect ratios are wrong. 

Also manually tagging faces on vertical photos (at least in RAW format) tends to create misaligned thumbnails of faces, even though they show correctly on the photos in question.
Comment 7 caulier.gilles 2015-07-06 07:37:56 UTC
digiKam 4.11.0 Windows installer is available for download :

http://download.kde.org/stable/digikam/digiKam-installer-4.11.0-win32.exe.mirrorlist
Comment 8 Jens 2016-01-30 21:29:33 UTC
I am witnessing a similar issue on Linux (Ubuntu LTS 14.04) and Digikam 4.14 (from PPA).

A RAW (RW2 Panasonic) file which has been rotated into portrait mode during import has two face rectangles. When I rotate this image using the buttons in the previewer, the face rectangles are (once) moved to a different location on the image - and after this first incorrect displacement they stick to the location on the image even with further rotations.

Can you please double check whether this issue exists in 5.x? Thanks!
Comment 9 Maik Qualmann 2018-03-06 20:33:44 UTC
*** Bug 391477 has been marked as a duplicate of this bug. ***
Comment 10 Elias Gabrielsson 2018-08-01 15:37:47 UTC
*** Bug 388169 has been marked as a duplicate of this bug. ***
Comment 11 hardy.public 2018-08-02 11:06:25 UTC
Given this is 7 years old, isn't the interim answer to remove all the face regions after crop? I'd rather have no face regions than incorrect face regions.
Comment 12 Milan Knížek 2018-08-05 16:17:12 UTC
(In reply to hardy.public from comment #11)
> Given this is 7 years old, isn't the interim answer to remove all the face
> regions after crop? I'd rather have no face regions than incorrect face
> regions.

As long as the face tags would remain assigned to that image (i.e. only the regions would be invalidated/deleted), that might be a reasonable interim solution.
Comment 13 caulier.gilles 2019-12-23 15:18:15 UTC
7.0.0-beta1 is out with new Face Recognition algorithm based on Deep
Learning/Neural Network API from OpenCV

https://download.kde.org/unstable/digikam/

Please test and give us a feedback

Thanks in advance
Gilles Caulier
Comment 14 hardy.public 2019-12-27 19:21:38 UTC
Problem still present. Cropping does not remove face regions which are wholly or partially outside the new image after crop.

Meaningless ghost face regions are still displayed in Preview.
Comment 15 hardy.public 2019-12-27 19:25:28 UTC
Created attachment 124743 [details]
Preview Before Crop Of Test4

Test4, 5 and 6 face regions correctly displayed.
Comment 16 hardy.public 2019-12-27 19:26:59 UTC
Created attachment 124744 [details]
Preview After Crop of Test 4.

Test4 face region not displayed correctly. Test 5 and 6 should have the regions deleted in my opinion.
Comment 17 Maik Qualmann 2020-10-20 14:13:14 UTC
*** Bug 428021 has been marked as a duplicate of this bug. ***
Comment 18 José Oliver-Didier 2020-11-21 02:23:08 UTC
Added bug 429219 which is related to this issue. Essentially the MWG Guidelines provide a way to identify a photo containing mismatched face regions. When a crop, resize or rotation operation occurs the values, if correct to begin with, must be updated along with the existing face regions.
Comment 19 Maik Qualmann 2021-05-19 11:22:40 UTC
*** Bug 437353 has been marked as a duplicate of this bug. ***
Comment 20 Maik Qualmann 2022-10-06 16:35:38 UTC
*** Bug 460047 has been marked as a duplicate of this bug. ***
Comment 21 caulier.gilles 2023-05-05 18:30:54 UTC
Maik, 

I remember that some works have be done around this topic in the past, but i don't remember when exactly...

Gilles
Comment 22 Maik Qualmann 2023-05-06 06:22:05 UTC
For some tools yes, flip, rotate. Not yet for the crop or resize tool.

Maik
Comment 23 David 2023-11-07 22:50:29 UTC
I signed up to this bug tracker to report this issue. I am quite stunned to find that it was first reported in 2011. This is a very common part of my workflow, having tagged hundreds of thousands of images and now doing some edits. Wish I'd done it the other way round now.
Comment 24 hardy.public 2024-01-30 11:19:15 UTC
In 8.3.0 pre-release, the cropped image now doesn't contain any face regions which is good as an interim solution. Ideally though, I think a cropped image should have its face regions recalculated where possible. Perhaps this should be a separate feature request?