-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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): deduplication UI #9540
Conversation
Deploying immich with Cloudflare Pages
|
…lication-detection-ui
…lication-detection-ui
…lication-detection-ui
Backend for this UI (commenting so that the reference is here): |
…lication-detection-ui
I tested a fix to this problem: It's about Duplicate Detection not disabling when Machine Learning is enabled but Smart Search is disabled. Since Duplicate Detection relies on CLIP embeddings it should probably be disabled when Smart Search is disabled. Should I PR this branch or main? This change is not specific to the UI, it's one small change to the server. |
I have a version for main and a version for this PR's branch but it applies to the existing implementation so it should probably be added to main: |
@NicholasFlamy Please open a PR to |
The change in #9565 should be drop in and shouldn't conflict with anything in this PR branch. |
If this works across libraries it'd be could to display which library the photo is from (so if they have one photo in the upload library and one in an external library, it should show that. |
@NicholasFlamy this will work with per account, not across instances. |
Sorry I didn't phrase it well. I confirmed with Mert that pictures from User A's external library can show up as duplicates of pictures in User A's upload library on the same instance of immich. My suggestion is when User A goes to the duplicates page, the picture should have a label that tells whether the picture is in User A's external library or User A's upload library. |
@NicholasFlamy we will have to rework the permission/query then. Let move our discussions back to Discord since the pr discussion should be used for code review and code related |
step="0.01" | ||
min={0.001} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alextran1502 you want to stick with 0.01 for now?
web/src/lib/components/utilities-page/duplicates/duplicates-compare-control.svelte
Outdated
Show resolved
Hide resolved
web/src/routes/(user)/utilities/[duplicates]/[[photos=photos]]/[[assetId=id]]/+page.svelte
Outdated
Show resolved
Hide resolved
web/src/lib/components/utilities-page/duplicates/duplicates-compare-control.svelte
Outdated
Show resolved
Hide resolved
web/src/lib/components/utilities-page/duplicates/duplicates-compare-control.svelte
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noice
@@ -6,6 +7,11 @@ export class DuplicateResponseDto { | |||
assets!: AssetResponseDto[]; | |||
} | |||
|
|||
export class ResolveDuplicatesDto { | |||
@IsNotEmpty() | |||
assetIds!: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need @ValidateUUID({ each: true })
here
!config.machineLearning.enabled || | ||
!config.machineLearning.clip.enabled || | ||
!config.machineLearning.duplicateDetection.enabled} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be able to just use a feature flag here instead. $featureFlag.duplicateDetection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NicholasFlamy What was the reason you didn't use the feature flag? I remember you have a PR put in for this, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the feature flag to the original backend PR. I didn't think to use the feature flag here (mainly I forgot about this part when I added that flag). So I think a feature flag could replace all of that.
!config.machineLearning.enabled || | |
!config.machineLearning.clip.enabled || | |
!config.machineLearning.duplicateDetection.enabled} | |
$featureFlag.duplicateDetection |
I haven't tested this, either I'll make the change on my test instance or if it looks good you could commit it and I'll test it, but I won't get to testing either option until tomorrow.
{/key} | ||
{:else} | ||
<div class="text-center text-lg dark:text-white flex place-items-center place-content-center"> | ||
No duplication was found on the instance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No duplication was found on the instance | |
No duplicates were found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And probably a <p>
tag instead of a div.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! :)
!config.machineLearning.enabled || | ||
!config.machineLearning.clip.enabled || | ||
!config.machineLearning.duplicateDetection.enabled} | ||
disabled={disabled || $featureFlags.duplicateDetection} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be !$featureFlags.duplicateDetection
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most certainly
an undo option and an option to skip checking duplicate videos would be nice |
It could be nice QoL for the notification to have an Undo button (also for archiving, trashing, etc.). The app could just wait for a certain time before sending the requests and cancel if you click Undo before the notification goes away. But I think this isn't strictly a duplicate-related request. When you mention videos, I just realized that the duplicate detection will consider an image and a video with a similar thumbnail as duplicates. That doesn't make sense: it should check for assets of the same type. There is also a possible issue where the thumbnail for videos can be black and spuriously match against other videos. This is a general issue with video thumbnails that we should fix. But assuming those issues are addressed, would you still like to disable detection for videos? If so, could you elaborate on why? |
Will there be an option to group duplicates automatically like google photos does instead of deleting them? |
@ThomasConrad maybe the next steps for this UI work |
I want to use this feature for my external library. Sometimes there are two dublicate images, that just are located in different folders. So it would be great to also get more meta informations available about the images, like the full path. Maybe also if there are any faces tagged, available metatags of the image etc. And it would be great, if I dont have to make a decission to see other dubliactes. Going back and fourth trough the dublicates or just skipping would be helpfull to decide later on some matches. |
That already works. As long as the libraries are on the same user in immich.
I agree, I suggested this, it's a maybe for the future. |
This PR implements
Utility Menu
Duplication UI - 1
Duplication UI - 2
Duplication UI - 3
Duplication UI - 4
Duplication Detection Settings