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(web): Face merging utility #15306

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

FortStatement
Copy link

Heya, I had a lot of people with some pictures that had faces not quite identifiable enough to match automatically.
This adds a utility to choose a person and see all the identities most similar to them, then select any to merge into the main identity.

It was very useful to me, let me know if anything can be done so it'd be useful for others!

@bo0tzz
Copy link
Member

bo0tzz commented Jan 13, 2025

Can you include some screenshots?

@FortStatement
Copy link
Author

image
image
image
image

@FortStatement FortStatement force-pushed the merge-utility branch 2 times, most recently from 7dd4cbf to 963b89b Compare January 13, 2025 14:07
Copy link

@Crazytieguy Crazytieguy left a comment

Choose a reason for hiding this comment

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

Left a couple suggestions

Comment on lines 77 to 88
onMount(async () => {
const { people: similarPeople } = await getAllPeople({
withHidden: false,
closestPersonId: data.person.id,
});
// Filter out the person we searched for since we don't want to merge with themselves
const selfIndex = similarPeople.findIndex((person) => person.id === data.person.id);
if (selfIndex !== -1) {
similarPeople.splice(selfIndex, 1);
}
people = similarPeople;
});

Choose a reason for hiding this comment

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

I think you probably want to fetch this in merge-faces/[personId]/+page.ts, and you'll have it in the data prop. That's the recommended/ideomatic way of fetching data for a page in sveltekit, and you won't need the onMount.

</Button>
</div>
{/snippet}
<div class="flex flex-col gap-4">

Choose a reason for hiding this comment

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

I think this div doesn't accomplish anything, it looks like a flex container but it only has one child

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.

3 participants