Bug 470694 - Some Face Regions are Rotated
Summary: Some Face Regions are Rotated
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 8.0.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-06 08:24 UTC by CM
Modified: 2023-10-21 04:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description CM 2023-06-06 08:24:13 UTC
SUMMARY
I have photos that have been face tagged with Windows Photo Gallery. Now that I'm using digiKam, I just noticed that for some photos the Face Regions are rotated 90 or 180 degrees. I assume there are others rotated 270 degrees also.


STEPS TO REPRODUCE
1. Add Photos to digiKam 
2. Browse People Tags

OBSERVED RESULT
Some People Tags show portions of the photo that don't have faces, but clearly map to faces if the Face Regions are rotated.

EXPECTED RESULT
digiKam should recognize when the Face Regions are potentially rotated and are not or no longer over actual faces.

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

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2023-06-06 09:46:23 UTC
This problem has been discussed many times in the past. There is no standard for storing face regions. It has turned out to be a quasi standard that most programs save the face regions for the unaligned image. Windows Photo Gallery does it differently...
We cannot recognize it during the import, face detection would have to be started in principle in order to be able to compare the face regions. Hardly possible for performance reasons when importing. Let the concerned faces be detected again...

Maik
Comment 2 CM 2023-06-07 16:46:51 UTC
I have to confirm later, but it also appears that digiKam detects faces, but the Face Regions are oriented as if the photos are 90deg or 270deg rotated. The photos are ones never touched by Windows Photo Gallery.

Is it possible digiKam is showing the Face Regions with respect to an orientation flag in metadata or some other assumption?
Comment 3 CM 2023-06-08 21:01:43 UTC
Learning new things. After clearing the faces on the photos and having digiKam find faces, it's behaving as expected (correctly).

I think the existing face tags must have been there already (added by the iPhone).

regions/mwg-rs:AppliedToDimensions/stDim:w
regions/mwg-rs:AppliedToDimensions/stDim:h
(and several others)

I'll clear and rescan as suggested.
Comment 4 caulier.gilles 2023-10-15 03:31:09 UTC
@CM,

This problem still reproducible with the new digiKam 8.2.0 pre-release Windows
installer available at usual place:

https://files.kde.org/digikam/

This new bundle is based on last Qt framework 5.15.11 and KDE framework 5.110.

Thanks in advance

Gilles Caulier
Comment 5 CM 2023-10-20 22:45:59 UTC
Gilles Caulier, are you saying or asking?

FYI, I've since confirmed that this problem appears on photos taken on iPhones (12 Pro Max and XS Max for reference). I am not 100% sure, but appears to be prevalent on portrait photos.

I wish there was a way to rotate ONLY the tags since they appear to be correct if only rotated 90/270 deg.
Comment 6 caulier.gilles 2023-10-21 04:49:43 UTC
yes, this is a question of course...