Repository navigation
feat(server): optimize person thumbnail generation - #7513
Merged
Merged
Conversation
Deploying immich with
|
| Latest commit: |
0309ad1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e0654264.immich.pages.dev |
| Branch Preview URL: | https://feat-optimize-thumbnail-gene.immich.pages.dev |
Member
Member
Author
|
Hmm that's weird, it was working well when I tested it. I'll do more testing tomorrow |
jrasm91
approved these changes
Feb 29, 2024
jrasm91
reviewed
Mar 5, 2024
mertalev
force-pushed
the
feat/optimize-thumbnail-generation
branch
from
March 6, 2024 04:36
7763ba3 to
4410e31
Compare
Member
Author
|
@alextran1502 Can you confirm if you still have the issue as of the latest commit? I'm wondering if you maybe tried it with an older commit |
Member
I will take a look again and report back |
1 of 3 tasks
mertalev
force-pushed
the
feat/optimize-thumbnail-generation
branch
from
April 30, 2024 02:16
80c9f29 to
c45e525
Compare
danieldietzler
approved these changes
Apr 30, 2024
Member
Author
|
I tried on a slice of my library and reproduced the issue. I think it's because of #3569. |
Member
Author
|
Can confirm that handling orientation fixed all the bad crops. |
jrasm91
approved these changes
May 1, 2024
Member
Author
|
@alextran1502 Could you test this PR when you get a chance? I want to be sure the cropping issues you noticed are fixed now. |
…e-thumbnail-generation
alextran1502
approved these changes
May 8, 2024
Member
|
Great work! Thank you for the discovery and the fix! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
Person thumbnails are currently generated by cropping to a buffer and passing this buffer to sharp to resize. This is inefficient:
This PR combines cropping and resizing to the same pipeline for better performance and less compressed thumbnails. Additionally, it uses the original image to generate the thumbnail to further reduce compression artifacts, scaling the bounding box dimensions as needed.
How Has This Been Tested?
I ran facial recognition on all assets and confirmed the person thumbnails are accurately cropped and look normal.
Before:
After: