face recognition - regions?

15 views
Skip to first unread message

Johannes Haberl

unread,
Dec 11, 2024, 3:16:56 AM12/11/24
to photini
I wonder if there is a tool for Ubuntu Linux to use face recognition - I found digikam (I am new to it) and there face recognition works - but I wonder how to get it to be readable but other programs such like photini. I also wonder what regions are for - is it for faces ?

Best regards
Hannes

Jim Easterbrook

unread,
Dec 11, 2024, 6:24:30 AM12/11/24
to pho...@googlegroups.com
Faces are one of the things the IPTC suggests regions could be used for.
https://www.iptc.org/std/photometadata/documentation/userguide/#_image_regions

If a face recognition tool saves IPTC standard image region metadata
then it would be readable by Photini and others. If it doesn't use a
standard, complain to its author!

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>
Message has been deleted

Johannes Haberl

unread,
Dec 11, 2024, 11:24:16 AM12/11/24
to photini

Thank you!
Yes, they seem to use other fields. One from Photini (erika) and the other one from digikam (hermi) both displayed in digikam but not readable from each other?
Bildschirmfoto vom 2024-12-11 17-10-39.png
Bildschirmfoto vom 2024-12-11 17-11-47.png

Jim Easterbrook

unread,
Dec 11, 2024, 11:40:37 AM12/11/24
to pho...@googlegroups.com
On 11/12/2024 16:24, 'Johannes Haberl' via photini wrote:
>
> Yes, they seem to use other fields. One from Photini (erika) and the
> other one from digikam (hermi) both displayed in digikam but not
> readable from each other?

The Digikam one appears to be using MWG (Metadata Working Group)
regions. The format is shown here https://exiv2.org/tags-xmp-mwg-rs.html
but it's not clear from that how it's supposed to work.

If I can find some better info I might be able to enable Photini to read
it, and maybe to write it, but it doesn't appear to map well to the IPTC
standard.

Johannes Haberl

unread,
Dec 11, 2024, 11:57:52 AM12/11/24
to photini
The good thing about digikam is that face recognition is automatic and the assignment of people is very simple.
I think this is the only tool (I know) that can do simple face-recognition on linux.

Jim Easterbrook

unread,
Dec 12, 2024, 1:27:16 PM12/12/24
to pho...@googlegroups.com
On 11/12/2024 16:40, Jim Easterbrook wrote:
>
> The Digikam one appears to be using MWG (Metadata Working Group)
> regions. The format is shown here https://exiv2.org/tags-xmp-mwg-rs.html
> but it's not clear from that how it's supposed to work.
>
> If I can find some better info I might be able to enable Photini to read
> it, and maybe to write it, but it doesn't appear to map well to the IPTC
> standard.

I have an old copy of the MWG guidelines document which actually
includes some XMP example text for their regions. After a bit of effort
I've managed to convert one of their examples into an XMP file that
exiv2 can read. (It didn't help that their document uses fancy angled
quotation marks instead of normal ASCII ones.)

I might have Photini using MWG format regions in a few weeks. But I
foresee problems with oddities like cross referencing other metadata.

Jim Easterbrook

unread,
Dec 12, 2024, 1:27:24 PM12/12/24
to pho...@googlegroups.com
On 11/12/2024 16:40, Jim Easterbrook wrote:
>
> The Digikam one appears to be using MWG (Metadata Working Group)
> regions. The format is shown here https://exiv2.org/tags-xmp-mwg-rs.html
> but it's not clear from that how it's supposed to work.
>
> If I can find some better info I might be able to enable Photini to read
> it, and maybe to write it, but it doesn't appear to map well to the IPTC
> standard.

I have an old copy of the MWG guidelines document which actually
includes some XMP example text for their regions. After a bit of effort
I've managed to convert one of their examples into an XMP file that
exiv2 can read. (It didn't help that their document uses fancy angled
quotation marks instead of normal ASCII ones.)

I might have Photini using MWG format regions in a few weeks. But I
foresee problems with oddities like cross referencing other metadata.

Johannes Haberl

unread,
Dec 12, 2024, 3:51:16 PM12/12/24
to photini

Thank you, if it is possible and useful for you. If it's more likely to cause problems, I understand if you don't do it. 

Jim Easterbrook

unread,
Dec 13, 2024, 9:51:34 AM12/13/24
to pho...@googlegroups.com
On 12/12/2024 18:27, Jim Easterbrook wrote:
>
> I might have Photini using MWG format regions in a few weeks. But I
> foresee problems with oddities like cross referencing other metadata.

I've made some good progress and Photini is now able to read MWG
regions. The cross referencing of other data is not going to be usable.
(I doubt if anyone uses it anyway, as it's fundamentally broken IMO. For
instance, the example in the MWG document has one region referring to
'Iptc4xmpExt:PersonInImage', which has unordered list type. So a photo
of several people might have several entries in
Iptc4xmpExt:PersonInImage, but there's no way of knowing which one the
region refers to.)

If anyone would like to send me an image with real MWG region data it
would be useful for testing. (Send it to me, not to the group list.)

Jim Easterbrook

unread,
Dec 17, 2024, 3:49:20 AM12/17/24
to pho...@googlegroups.com
On 13/12/2024 14:51, Jim Easterbrook wrote:
> On 12/12/2024 18:27, Jim Easterbrook wrote:
>>
>> I might have Photini using MWG format regions in a few weeks. But I
>> foresee problems with oddities like cross referencing other metadata.
>
> I've made some good progress and Photini is now able to read MWG
> regions.

The development version of Photini can now read and write MWG regions
(as well as IPTC ones). Any cross referenced data is incorporated into
the region data so I don't have to try and write cross referenced data.
Once I've updated the documentation there will be a new release,
probably next month.
Reply all
Reply to author
Forward
0 new messages