mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
People: Import digikam's face region data #599
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#599
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wonx on GitHub (Dec 27, 2020).
Originally assigned to: @lastzero on GitHub.
I have just tried photoprism and I'm impressed by it's simplicity of use and the automatic tagging capabilities. However, I have an already existing picture library with thousands of tags/keywords (in the form of a tag tree) that I would like to import in PhotoPrism. I can see that these are present in the metadata, but I cannot find a way to browse or to search using these keywords.
Is there a way to do that, or are there plans to implement that feature?
@lastzero commented on GitHub (Dec 27, 2020):
Typically, it should be enough to just type these keywords in the main search field and press enter. Does this work for you? Or do you need a special view for this?
@wonx commented on GitHub (Jan 9, 2021):
Since my library has already been thoroughtly been classified and tagged, it would be great if that tag tree could be replicated in the interface.
But responding to your question, no, there's a problem when searching for these keywords. Many of them are formed by more than one word (e.g. first name and last name of a person), so when entering two of these words in the search field, an OR search if performed, searching pictures which contain any of these keywords, not the combination of the two. So, if I search for John Smith, it will return all results for people named John, and for all people with the last name Smith. That behavior persists even if I put the search in quotes.
@lastzero commented on GitHub (Jan 9, 2021):
@wonx That's because it's a keyword search and not a full-text search. Google also fakes this which typically leads to much less results than there actually are when you use more than 3 words - however they have additional indexes with 2 and 3 word combinations which we don't, as I didn't plan to implement a complete Google search on top of a photo app and Google Maps replacement...
In short: We don't know in what specific order or context words have been used together. Did you try putting a
-in between likeMichael-Mayer?@lastzero commented on GitHub (Jan 9, 2021):
You may of course scan through the raw data, but that won't be as fast obviously. In that case, you may also search for complete sentences (or more) if you like.
@lastzero commented on GitHub (Jan 9, 2021):
In addition, we're going to offer a search specialized in people when implementing facial recognition. Maybe that makes more sense for your use case than using the keyword search for people.
@wonx commented on GitHub (Jan 10, 2021):
Aha, being able to browse by faces would also be a great feature. But the point still stands, all my pictures have already been face-tagged. By not read that information from the files during import, so it can be used in Photoprism?
@lastzero commented on GitHub (Jan 10, 2021):
Why not detect names in your metadata and make them show up on our new People view too?
@alexislefebvre commented on GitHub (Jan 10, 2021):
This is an interesting point, I created a separate question about that: https://github.com/photoprism/photoprism/discussions/874
@alexislefebvre commented on GitHub (Jan 11, 2021):
About searching with a combination of multiple criteria, I opened the issue #882.
@graciousgrey commented on GitHub (Jan 12, 2021):
@wonx what tool did you use to tag the people? Could you provide us an example of the metadata, so we might be able to take this into account when developing facial recognition.
@bnounours commented on GitHub (Feb 24, 2021):
Hi,
As @wonx, most of my photos are tagged, I use Shotwell on Linux and there is also a tree of tags. This is very handsome as when tagging a monument for example it includes the city, the country, the continent, ...
Here is the tree I use (It is in French, but could be in any other langage)
And then look like this in metadata (XMP)
For people I have only 1 level above which is "Personne" == "People" in english
People
@lastzero commented on GitHub (Aug 29, 2021):
It would now be possible to automatically import subjects from XMP to the new subjects table we've added for facial recognition.
However, the quality of subject metadata found in practice seems by far not good enough. Importing this will lead to tremendous noise and ambiguities (most of this isn't even a distinct place, object, or person):
Importing may be possible if your files have metadata with clear semantics and normalized names. Most users won't be that happy... pragmatic suggestions welcome 👍
Note you can now search for multiple keywords, albums and people (after you named them in the photo edit dialog with facial recognition enabled): #882 #22
@graciousgrey commented on GitHub (Nov 2, 2021):
As searching for keywords and people is possible now. Is there something left to do?
@wonx commented on GitHub (Nov 3, 2021):
@graciousgrey Sorry, I just saw your post. I use Digikam to tag my pictures, which, afaik, uses the xml metadata from several picture managers at the same time, like illustrator, acdsee, etc. I think Digikam is the software with the most standard and complete metadata management.
I can provide upload a few examples if you still wish to see them.
@graciousgrey commented on GitHub (Nov 4, 2021):
Sure, we already read some metadata fields digikam writes.
Would be good to know if something important is still missing or if we can close this.
Feel free to send photos + metadata files and a note what fields are important to you to hello@photoprism.app :)
@wonx commented on GitHub (Nov 6, 2021):
Ok, here's an example of a picture I have tagged with Digikam, including one face region and a date in EXIF (also XMP and ITPC I think)
@graciousgrey commented on GitHub (Nov 8, 2021):
Date, subject and keywords are already imported by PhotoPrism:
"DateTimeOriginal": "2018:03:17 00:36:41", "Subject": ["Art","Casablanca","Films","Externa","Humprey Bogart","Ingrid Bergman"], "Keywords": ["Art","Casablanca","Films","Externa","Humprey Bogart","Ingrid Bergman"],The following is not supported:
"LastKeywordXMP": ["Art","Art/Films/Casablanca","Art/Films","Externa","Persones/Famosos/Humprey Bogart","Persones/Famosos/Ingrid Bergman"], "HierarchicalSubject": ["Art","Art|Films|Casablanca","Art|Films","Externa","Persones|Famosos|Humprey Bogart","Persones|Famosos|Ingrid Bergman"], "CatalogSets": ["Art","Art|Films|Casablanca","Art|Films","Externa","Persones|Famosos|Humprey Bogart","Persones|Famosos|Ingrid Bergman"],I guess it would currently not provide much value, as it would just duplicate the keywords. It may make sense if we introduce hierarchical tags at one point. What do you think?
So the only thing left to do is the face region:
"RegionName": ["Humprey Bogart","Ingrid Bergman"], "RegionType": ["Face","Face"], "RegionAreaX": [0.446794,0.616811], "RegionAreaY": [0.376224,0.491688], "RegionAreaW": [0.233622,0.248527], "RegionAreaH": [0.224095,0.207242], "RegionAreaUnit": ["normalized","normalized"], "RegionPersonDisplayName": ["Humprey Bogart","Ingrid Bergman"], "RegionRectangle": ["0.329983, 0.264177, 0.233622, 0.224095","0.492548, 0.388066, 0.248527, 0.207242"],Might be related to: https://github.com/photoprism/photoprism/issues/554
@wonx commented on GitHub (Nov 9, 2021):
I would love if hierarchical tags were supported. I like nature photography, and lately I have been tagging all the animal and plant species according to their taxonomy, creating a phylogenetic tree, where each live being belongs (I get that info from wikipedia, Kingdom, Phylum, Class, Order, etc.).
Same for places, I tag my pictures with the name of the place they were taken, and put the keywords in an hierarchical tree: Country/Province/County/Municipality
That way, even having several thousand keywords, they fit nicely within 10 or less stem tags.
@lastzero commented on GitHub (Nov 9, 2021):
Keep in mind Digikam is a pure Desktop app from what I know. Large trees are a pain to manage on small mobile devices.
@wonx commented on GitHub (Nov 17, 2021):
There could be like a panel where you can display the full tree, with a search bar where you can look for specific keywords, and then all the pictures with that keyword could be shown in the main interface.
@graciousgrey commented on GitHub (Nov 17, 2021):
@wonx feel free to open a separate feature request for support of hierarchical tags.
@BurningTheSky commented on GitHub (Feb 21, 2022):
Is this on the roadmap to be worked on? I much prefer PhotoPrism to DigiKam but the face recognition in DigiKam works a lot better for me (child detection, manual tagging and tagging faces close together, all of which I know is on the list for PhotoPrism but not available at the moment) so being able to use that data in PhotoPrism would be amazing!
@graciousgrey commented on GitHub (Feb 21, 2022):
Yes, it's an idea on the roadmap, so it will be implemented sooner or later. What helps the most speed up development is becoming a sponsor ;)
@sfatula commented on GitHub (Aug 9, 2022):
I also use Digikam and have added people metadata to all photos. It sure would be handy for these to show up on the PhtoPrism people tab so in my case at least, wouldn't even need people recognition by PhotoPrism as this was already done in digikam.
In my XMP sidecar file, as processed by exiftool, they show like this:
Tags List : People/Steve Fatula, People/Lena Fatula
Last Keyword XMP : People/Steve Fatula, People/Lena Fatula
Hierarchical Subject : People|Steve Fatula, People|Lena Fatula
Catalog Sets : People|Steve Fatula, People|Lena Fatula
Subject : Steve Fatula, Lena Fatula
For me, it would seem at least 100% reliable to use Tags List where we have People/somename. In this way, no recognition needed in PhotoPrism when this data is already there.
I really want them to show up on the people tab, not have to keyword search, etc.
@graciousgrey commented on GitHub (Aug 10, 2022):
@sfatula The Tags List only provides the name I guess we will rather read out the face region data as we need to know the position of the face as well. Otherwise we can't create the crops you want to see on the people tab.
The face region data looks like this:
"RegionName": ["Humprey Bogart","Ingrid Bergman"], "RegionType": ["Face","Face"], "RegionAreaX": [0.446794,0.616811], "RegionAreaY": [0.376224,0.491688], "RegionAreaW": [0.233622,0.248527], "RegionAreaH": [0.224095,0.207242], "RegionAreaUnit": ["normalized","normalized"], "RegionPersonDisplayName": ["Humprey Bogart","Ingrid Bergman"], "RegionRectangle": ["0.329983, 0.264177, 0.233622, 0.224095","0.492548, 0.388066, 0.248527, 0.207242"]
Reading Tags List is more related to: https://github.com/photoprism/photoprism/issues/1779
@marksfink commented on GitHub (Jul 10, 2023):
There is some nuance to this that I thought is worth noting. Two things are keeping me with digiKam's facial recognition and tagging:
If I had the above with PP, I probably would not use digiKam for facial recognition anymore, barring other factors like ease-of-use and dealing with large numbers of files.
Short of that though, I'll stick with digiKam and want PP to use digiKam's facial data and name tags that it writes to the files. In which case, I would want to disable Tensorflow and facial recognition in PP, yet still see the People option in the UI on the left and have that be based on digiKam data.
@maiatobi commented on GitHub (Aug 15, 2023):
There are 2 sets in XMP that can be used :
One possibility would be to skip AI recognition if this information is found.
Another one is to enable in settings if you want AI or using the metadata.
I rather have the first option as if you are mixing pictures from different people you can save the effort of AI in the ones that are correctly tagged while allowing the ones that are not to add tagging.
@graciousgrey commented on GitHub (Aug 15, 2023):
@maiatobi We have several related issues:
Ideally we can merge the information from the metadata with the face markers detected by PhotoPrism. If you don't want to use PhotoPrism's built in facial detection and recognition you can already turn it off using the following variable PHOTOPRISM_DISABLE_FACES