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/server): Face thumbnail selection #3081

Merged
merged 16 commits into from
Jul 2, 2023

Conversation

alextran1502
Copy link
Contributor

@alextran1502 alextran1502 commented Jul 2, 2023

This PR adds the ability to choose a different thumbnail for a person's face.

This mechanism requires the user to run the Detect faces job again for all data.

@vercel
Copy link

vercel bot commented Jul 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
immich ⬜️ Ignored (Inspect) Jul 2, 2023 9:48pm

Copy link
Contributor

@jrasm91 jrasm91 left a comment

Choose a reason for hiding this comment

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

Can you merge this new endpoint into the already existing update person endpoint?

@alextran1502 alextran1502 requested a review from jrasm91 July 2, 2023 19:39
"type": "string",
"description": "Person name."
},
"featureFaceAssetId": {
Copy link
Contributor

Choose a reason for hiding this comment

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

What about primary asset id? This id is also used for matching against right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the asset to crop the face of the person from

Copy link
Contributor

Choose a reason for hiding this comment

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

Unless I am mistaken the API doesn't ever reference asset_face, AssetFaceEntity, or faces ever. That is an implementation detail. All the external client knows is that a person has a thumbnail and then can update it with an asset id. Personally, I think calling it something with "face" makes me think you are referring to the asset face table and that seems like an implementation detail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does here

async getFaceById({ personId, assetId }: AssetFaceId): Promise<AssetFaceEntity | null> {
return this.assetFaceRepository.findOneBy({ assetId, personId });
}

server/src/domain/person/person.repository.ts Outdated Show resolved Hide resolved
server/src/domain/person/person.service.ts Outdated Show resolved Hide resolved
@alextran1502 alextran1502 merged commit 7947f4d into main Jul 2, 2023
@alextran1502 alextran1502 deleted the feat/fr-choose-different-thumbnail branch July 2, 2023 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants