Bug 427071 - Importing pictures with faces tagged by picasa results in error "missing identities"
Summary: Importing pictures with faces tagged by picasa results in error "missing iden...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Workflow (show other bugs)
Version: 7.1.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-28 13:55 UTC by Marcel
Modified: 2021-08-29 21:01 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.4.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel 2020-09-28 13:55:26 UTC
SUMMARY

I imported my picture collection into digikam (current git 7.1.0+).
The pictures alredy were face tagged using google picasa.
During file scan those face tags get imported and are listed in the "People" tab (that's what I'd consider to be "identities").
But when running "Recognize faces" I get the error: "Face recognition is aborted, because there are no identities to recognize. Please add new identities."

Maybe I just got the idea of "identities" wrong or am missing one step, but at least this behaviour is confusing (me).



STEPS TO REPRODUCE
1. Have a picture collection with faces tagged by google picasa
2. Start digikam
3. Add folder to picture collection
4. Run "Detect faces"
5. Run "Recognise faces"

OBSERVED RESULT
Error: "Face recognition is aborted, because there are no identities to recognize. Please add new identities."

EXPECTED RESULT
Digikam should be using the imported (and displayed) identities from picasa

SOFTWARE/OS VERSIONS
Linux

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2020-09-28 14:54:21 UTC
This is normal, you have not yet added any identities to the face database. Activate the option to rebuild training data in the Face detection/ recognition section in the maintenance tool and start it. When adding new images, no identities are created at the moment for performance reasons.

Maik
Comment 2 Marcel 2020-09-28 15:13:21 UTC
Thanks for the hint.
I'll give it a try and report back.
Comment 3 Marcel 2020-09-29 16:30:07 UTC
Hmmm ... my test run finished.

Good news is:
- analyzing 90.000+ pictures worked fine.
- I get lots of pre-tagged "People"
- I do no longer get the "no identities" error

Bad news is:
- Not a single "Unconfirmed" or "Unknown" face was found
  (and that's *very* unlikely to be the case)

Anything else I could try?
Comment 4 Maik Qualmann 2020-09-29 17:03:21 UTC
It is completely normal that you have no unknown or unconfirmed faces after the import. Picasa only wrote the faces in the metadata that you gave a name. DigiKam do the same. Everything else is only in the database. The metadata standard of face regions does not provide for any unknown faces rectangles.

Maik
Comment 5 Marcel 2020-09-29 17:37:57 UTC
Ok, so what's the right way to go then?

1. Do the rebuild database thing on first import
2. Run "Detect faces" (with "Scan again and merge results")
3. Run "Recognize faces"

If so that's exactly what I'd expect when running "Maintenance" with "Detect and recognise faces" and "Clear and rebuild all training data" enabled
Comment 6 Marcel 2020-09-30 14:30:28 UTC
Ok - did some more testing:

Running "Detect faces" (with "Scan again and merge results") and running "Recognize faces" afterwards, results in new faces in both "Unconfirmed" and "Unknown".

However only faces that were tagged using digikam seem to be considered for face recognition at all (at least that's my theory right now - please correct me if this isn't true).

I've got quite some people listed as "People" in digikam (all but a few new ones were originally tagged with picasa) but to me it looks like the ones tagged in picasa are listed but completely ignored when it comes to face recognition.

As a side effect the recognition rate is 0% (all suggested faces were wrong).

Maybe it's just me, but even if there are technical reasons for this, I consider it quite confusing from a user's perspective.

Can someone confirm or deny, that face tags not written by digikam are treated differently in some way?
Comment 7 Maik Qualmann 2020-09-30 14:45:38 UTC
For better face recognition use the digiKam-7.2.0-beta1 from here:

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

1. A new training run must be carried out with this version
2. Sensitive level to 50-60
3. Enjoy a significantly better result ((:-))

Maik
Comment 8 Marcel 2020-09-30 14:54:49 UTC
Ok - I'll give it a try over night.

However I am running a post 7.1.0 git (git20200928.31e8fed), so I guess if the relevant changes are older than 2 days I already used them.

PS: Sorry if I messed this up when reporting the bug, but as I'm testing with current git version I didn't know which version to choose.
Comment 9 Marcel 2020-10-05 06:13:48 UTC
Ok, so I used latest appimage version of digikam (just to make sure there's no difference to my daily git build).

Results however are not the desired ones:

What's good:
In both versions (appimage/daily build) I get lots of suggestions, for all kinds of identities (not only the small part tagged with digikam).

What's bad:
The recognition rate is round about zero. The suggestions appear random.

I don't know, maybe the training based on the picasa tagging does something weird.

I'll try to prepare a smaller training data set to analyze this some more.

Or is there - by any chance - a data set like this available somewhere?
Maybe even with "public" faces, so it's easier to reproduce such a behaviour without sending tons of private pictures?
Comment 10 Maik Qualmann 2020-10-05 07:31:39 UTC
Yesterday we fixed a problem with creating the training database. Try a new AppImage build in the next few days and rebuild the training database.

Maik
Comment 11 Marcel 2020-10-05 07:33:56 UTC
Ok - I will do so and keep you informed about my findings.
Comment 12 Marcel 2020-10-23 06:27:08 UTC
Current git releases still show same behaviour:

Google Picasa tagged faces get imported and displayed, however no newly detected faces are matched to the existing (Picasa) ones.

After clearing all metadata and tagging all faces with digikam face matching works as expected.

So - for me it looks like either
- the Google Picasa tagged faces are totally ignored for training or
- for some reason the Picasa tagging is so different from digikam's, that the training model fails

Any ideas how to diagnose this some more?
Comment 13 Maik Qualmann 2020-10-23 18:18:24 UTC
OK, I can confirm the problem. But it seems to be independent of Picasa. Face rectangles that were added manually are also apparently not recognized.

Maik
Comment 14 Maik Qualmann 2020-10-23 18:30:13 UTC
The cause is the different zoom level. Picasa is further away from the face, digiKam zooms in closer. Both face prints are too different for the face engine. It can also be reproduced manually very well.

Maik
Comment 15 Marcel 2020-10-24 07:46:54 UTC
Ok, nice to see this confirmed.

It'd be very nice to have some kind of migration/conversion, something like:

If digikam's algorithm detect's a face located
- at the same spot or
- within a previously marked/detected rectangle
then
- assign the existing face tag to digikam's database or at least
- make suggestions to do so (and maybe confirm this by the user)

BTW:
Is there some simple way to accept all suggestions for one person?
Currently I need to select all of them and then confirm the selction, which is a bit of a hazzle for lots of suggestions (Picasa just had a "confirm all button" on the very top, so the process looked like: get rid of all non-matching faces and then just click that button)
Comment 16 Martin Seidel 2021-06-06 18:09:34 UTC
(In reply to Maik Qualmann from comment #1)
> This is normal, you have not yet added any identities to the face database.
> Activate the option to rebuild training data in the Face detection/
> recognition section in the maintenance tool and start it. When adding new
> images, no identities are created at the moment for performance reasons.
> 
> Maik

Hallo, I run digikam 7.2 on MacOS. There is no option to add identities under Maintenance -> Detect and recognize faces

(I don't have any imported or collected data related to face recognition.)
Comment 17 Maik Qualmann 2021-06-06 20:52:23 UTC
If you have not imported any images with face regions, you must first start face detectionn and add names. digiKam cannot know what the names of the people in the images are, that is a learning process for digiKam. Take a look at the People sidebar on the left.

Maik
Comment 18 Martin Seidel 2021-06-07 18:05:50 UTC
(In reply to Maik Qualmann from comment #17)
> If you have not imported any images with face regions, you must first start
> face detectionn and add names. digiKam cannot know what the names of the
> people in the images are, that is a learning process for digiKam. Take a
> look at the People sidebar on the left.
> 
> Maik

Hi, I have already started face detection and I added 3 person but I still get this message "missing identities"
Comment 19 Maik Qualmann 2021-06-07 20:08:54 UTC
What does it mean you added 3 people? Have you really entered a name in the People View under "Unknown" for a face thumbnail in the input field?

Maik
Comment 20 Martin Seidel 2021-06-07 20:20:28 UTC
(In reply to Maik Qualmann from comment #19)
> What does it mean you added 3 people? Have you really entered a name in the
> People View under "Unknown" for a face thumbnail in the input field?
> 
> Maik

Yes, there is a smiley "Persons" and then there 6 smileys "unconfirmed", "unkonwn", "ignored", name1, name2, name3.

When I first started digikam on macos I had a maybe 6 months old digikam database file for the picture folder that came from a linux installation because I moved the whole folder with the database to macos but I guess that wouldn't be an issue...
Comment 21 Martin Seidel 2021-08-29 20:52:09 UTC
It works on version 7.30 Thanks, great work, donation is on the way!
Comment 22 caulier.gilles 2021-08-29 21:01:11 UTC
Thanks for the feedback