Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(server): Merge Faces sorted by Similarity #14635

Merged
merged 5 commits into from
Dec 16, 2024

Conversation

Lukasdotcom
Copy link
Contributor

A new optional parameter on the /api/people route allows clients to specify sorting order by similarity to a person. This sorting is used on the merge page to organize photos based on similarity.

Implements: #4347

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the PR! The code looks very good to me and I think the SQL queries are also fine, I'll let mertalev be the judge of that though. Please fix the failing open api test :)

@Lukasdotcom
Copy link
Contributor Author

I pushed a change that fixed the open-api test. I also ran it on a copy of my personal instance which has around 100k pictures and 5k people detected and I didn't see a noticeable difference in performance. Server specs: i7-12700k with 64 gb of ram.

server/src/repositories/person.repository.ts Outdated Show resolved Hide resolved
server/src/repositories/person.repository.ts Outdated Show resolved Hide resolved
server/src/repositories/person.repository.ts Outdated Show resolved Hide resolved
@mertalev
Copy link
Contributor

Thanks for the PR! LGTM

@Lukasdotcom Lukasdotcom force-pushed the merge branch 2 times, most recently from e2f5802 to 9af6cd4 Compare December 13, 2024 15:52
@alextran1502 alextran1502 merged commit 12e55f5 into immich-app:main Dec 16, 2024
65 checks passed
@Lukasdotcom Lukasdotcom deleted the merge branch December 16, 2024 15:03
@welpher
Copy link

welpher commented Dec 20, 2024

why similarity? I just merge an unnamed face into a named face not into a similarity face

@Lukasdotcom
Copy link
Contributor Author

@welpher #14830 will allow you disable this

yosit pushed a commit to yosit/immich that referenced this pull request Dec 20, 2024
* Merge Faces sorted by Similarity

* Adds face sorting to the side panel face merger

* run make open-api

* Make it one query

* Only have the single order by when sorting by closest face
@welpher
Copy link

welpher commented Dec 21, 2024

@welpher #14830 will allow you disable this

nice,tks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants