Duplicated people in the list of faces
I share Immich with my family members. I noticed that for one of them, when they go to the People section and they see the list of faces, many of the people are duplicated. What I mean is that for instance, there's 4 different entries for a specific person with the exact same name. If you enter each entry, the pictures inside are different, so it's like several instances of a person with the exact same name, but different people, that in theory should have been merged together.
Sounds like a bug. Any ideas on how to resolve it? I tried refreshing the metadata for those pictures with no effect. Thanks in advance!
By the way, all pictures are stored in an external library, are read only, and the faces were previously tagged from Digikam. Face recognition is disabled in Immich.
18 Replies
:wave: Hey @woenxs,
Thanks for reaching out to us. Please carefully read this message and follow the recommended actions. This will help us be more effective in our support effort and leave more time for building Immich :immich:.
References
- Container Logs:
docker compose logs
docs
- Container Status: docker ps -a
docs
- Reverse Proxy: https://immich.app/docs/administration/reverse-proxy
- Code Formatting https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline#h_01GY0DAKGXDEHE263BCAYEGFJA
Checklist
I have...
1. :ballot_box_with_check: verified I'm on the latest release(note that mobile app releases may take some time).
2. :ballot_box_with_check: read applicable release notes.
3. :ballot_box_with_check: reviewed the FAQs for known issues.
4. :ballot_box_with_check: reviewed Github for known issues.
5. :ballot_box_with_check: tried accessing Immich via local ip (without a custom reverse proxy).
6. :ballot_box_with_check: uploaded the relevant information (see below).
7. :ballot_box_with_check: tried an incognito window, disabled extensions, cleared mobile app cache, logged out and back in, different browsers, etc. as applicable
(an item can be marked as "complete" by reacting with the appropriate number)
Information
In order to be able to effectively help you, we need you to provide clear information to show what the problem is. The exact details needed vary per case, but here is a list of things to consider:
- Your docker-compose.yml and .env files.
- Logs from all the containers and their status (see above).
- All the troubleshooting steps you've tried so far.
- Any recent changes you've made to Immich or your system.
- Details about your system (both software/OS and hardware).
- Details about your storage (filesystems, type of disks, output of commands like fdisk -l
and df -h
).
- The version of the Immich server, mobile app, and other relevant pieces.
- Any other information that you think might be relevant.
Please paste files and logs with proper code formatting, and especially avoid blurry screenshots.
Without the right information we can't work out what the problem is. Help us help you ;)
If this ticket can be closed you can use the /close
command, and re-open it later if needed.By the
Successfully submitted, a tag has been added to inform contributors. :white_check_mark:
Sounds to me like your user renamed each of those entries without merging them
Just merging them from the menu should do the trick
Itś a brand new user (my mom actually), she never actually signed into his account yet, only me to test it. I believe I saw that in my account as well, but the issue went away after a while
For instance, I just checked, and I appear 15 times in the People menu
Right now I'm re-scanning all the file metadata, see if it helps
I think this might be a race condition. Basically the metadata job looks to see if there are any people with that name in the DB and creates the person if not. If there are multiple jobs doing that check at the same time, they can all see there’s no person at that moment and each can decide to create a new person
Oh this is faces from the file metadata - I missed that part
Would it make sense to have a database constraint against this?
Yep. Re-Running the "extract metadata" job should also refresh the faces, right?
(the description of the task only explicitly mentions GPS and resolution)
(should take a while, only 300.218 remaining 😅)
It would, but it won’t delete the people that already got created. I think that would have to be a DB query
I see
I wonder if there could be a cleanup job, just like the one there is for duplicated or unused tags
I suspect this bug is a remnant of the first version of immich that included face support
There could be, or possibly the “all” button for metadata extraction could clear up face metadata entries
Yep, that's what I did, it's re-scanning everything
I'll let you know how it went, it can take a few hours to complete
If you cancel that, run the SQL query
TRUNCATE asset_faces CASCADE;
in the DB, lower the job concurrency to 1 and click “all” again, this should fix the issue
I somewhat doubt that the All button alone will solve this
I think this is more of a logic problem than a DB problem. There’s nothing inherently wrong with two people with the same name being in the DBMmm, ok, let me see....
Can I run that just for the affected user? I'm not familiar with the database structure
That command would clear data for all users. You can run a different command instead to only delete their face metadata (note: not tested):
You need to change the username part (keeping quotes) and it assumes there’s only one user with that name
Thanks, I figure it out. ok, rescanning faces for that user...
So far, no duplicates during the scan (I just went to the library settings, and selected "Scan")
Nice
I can confirm that after running the metadata extract again, the issue was fixed and there are no more duplicates. I never changed the number of concurrent jobs, though. I still believe it was a bug caused by an early version of immich