immich icon indicating copy to clipboard operation
immich copied to clipboard

Faces are identified multiple times or duplicated in the database

Open SimpleUserHA opened this issue 1 year ago • 9 comments

The bug

On some pictures, can't tell you why, how to reproduce or so, but when you open the info pane (1) you can see the people that were found. (2) Pressing the edit button opens the edit mode. grafik

In general there were 4 people, but one was hidden so in total 5. However being in the edit mode, suddenly there are not only 5 faces, but acutally 10 faces. each of the 5 is duplicated. On other pictures, I noticed this with 2 additional duplicates (total of 3 of each face).

grafik

The OS that Immich Server is running on

Unraid using docker

Version of Immich Server

v1.105.1

Version of Immich Mobile App

not relevant

Platform with the issue

  • [X] Server
  • [ ] Web
  • [ ] Mobile

Your docker-compose.yml content

ghcr.io/imagegenius/immich:latest

Your .env content

ghcr.io/imagegenius/immich:latest

Reproduction steps

actually not sure how to reproduce
1. 
2.
3.
...

Relevant log output

No response

Additional information

No response

SimpleUserHA avatar Jun 11 '24 22:06 SimpleUserHA

Happens all the time to me. But its because I have identical twins and they are always getting recognized together. Or consider a picture that has your face in a mirror? Should I only allow one of my kids to get tagged in the photo? Or what?

Szeraax avatar Sep 14 '24 06:09 Szeraax

If you hover over duplicates of the same person, do they show up in the same position (with a white border around their face)?

C-Otto avatar Oct 10 '24 13:10 C-Otto

Or what?

😆 What!

I have identical twins and they are always getting recognized together. Or consider a picture that has your face in a mirror?

I guess if I would have twins , I would not have opened the issue. Also if a second instance of a person would be in the mirror or another picture on the wall.

If you hover over duplicates of the same person, do they show up in the same position (with a white border around their face)?

Hi @C-Otto , Good point. I did miss to mention it more precisely. The face is listed twice on the side panel like in the screenshot and like described. However the frame /position in the picture is the same, so only one area per "picture group" (all duplicated pictures of one person )

SimpleUserHA avatar Oct 10 '24 16:10 SimpleUserHA

If you click on each of the two face/person preview items showing the same face (in the right panel), does it show the same URL? You can also try changing the preview photo for ONE of the duplicates. Does this also change the preview of the other?

C-Otto avatar Oct 10 '24 16:10 C-Otto

C-Otto pointed out to me that my issue is NOT related to this one as I have only 1 person in the database but the facial recognition shows 2 instances of it in the picture. Thank you for your time C-Otto!

Szeraax avatar Oct 10 '24 16:10 Szeraax

I'm not sure what caused the situation in the OP, but the next release will have a mechanism to "refresh" faces for assets. Running that would probably fix this.

mertalev avatar Oct 10 '24 16:10 mertalev

If you click on each of the two face/person preview items showing the same face (in the right panel), does it show the same URL? You can also try changing the preview photo for ONE of the duplicates. Does this also change the preview of the other?

being at home I tested it now: some of the cases were already gone since I reported the issue. Either I modified or merged faces or partially reimported the pictures from external to internal libraries. However still some case could be found and for those the URL is different for both items on the side panel. Since these are unknown Persons I was able to give it a separate name each. grafik

chefkoch avatar Oct 10 '24 17:10 chefkoch

Thanks, that's very helpful! We have two person entities, both of them using the same preview (i.e. the same preview image and the same position in that). These two person entities also share the same face position in other images, as far as I understand the comments. As such, aside from them being two entities, they may be considered identical. I don't know, yet, how the second entity came to be, and I guess this is where the bug is hiding.

Do you know when the two entities (person A and person B) were created? Presumably at the same time? Do you have logs? Can you reproduce this by adding new fotos with new people (maybe some celebrities from Wikipedia or so)? Are you running a somewhat weird/broken ML setup (two docker containers instead of one, outdated version, ....)?

C-Otto avatar Oct 11 '24 06:10 C-Otto

Is there any photo with a face that is NOT duplicated? I expect every photo to have two person entities for each real person (like person A and person B). Having a photo where some person is not duplicated would help me find the bug.

Aside from that, is there a photo where this duplication does not happen at all? Did it suddently start for new photos, or does it affect your whole library? If so, when? What's special about the first photos where this happened, vs. those that are unaffected?

C-Otto avatar Oct 11 '24 07:10 C-Otto

Only in mirror, should be identified multiple times

welpher avatar Dec 21 '24 02:12 welpher

Fixed #13294. Run refresh faces for all or on the affected asset to fix it.

jrasm91 avatar Jun 19 '25 17:06 jrasm91