simulot / immich-go

An alternative to the immich-CLI command that doesn't depend on nodejs installation. It tries its best for importing google photos takeout archives.
GNU Affero General Public License v3.0
1.85k stars 55 forks source link

Duplicate detection: don't upload a photo if a larger photo with the exact same datetime already exists #241

Open cuu508 opened 6 months ago

cuu508 commented 6 months ago

I'm looking to upload photos exported via Google Takeout into Immich. The problem is, some of these photos I already have in Immich, uploaded directly from my phone, in their original quality. The Takeout export has some of the same photos, but in reduced quality. If I upload them as-is, I would have many, many duplicates in the end.

Would it be possible to have an optional feature behind a flag, where for each photo to be uploaded immich-go checks if a photo with the exact same timestamp already exists.

Would something like this make sense (and be technically feasible)? Or perhaps there is an existing way to avoid duplicates?

I'm aware of the work-in-progress Immich duplicate detection feature – this one, when ready, would work on already uploaded photos. It would be nice to be able to avoid duplicates in the first place, during upload.

cuu508 commented 6 months ago

Oops, looking at my own Immich library, there are many instances where multiple photos are taken in the same second (some would be JPG+RAW pairs, but also photos shot in burst mode, or just in quick succession). So it's not going to be quite as simple as I had imagined :-/

simulot commented 5 months ago

I'm currently focused on another part of the project. I'll come back on this soon

mio-19 commented 2 months ago

I am also interested on this. Some of my photos and videos on Google Photos already exist on immich. Other pre-immich era photos and videos only exist on Google Photos. Almost all photos and videos on Google Photos are in reduced quality. I used a tool called czkawka to do deduplication. Its result is acceptable on photos, but it seems to struggle for videos

simulot commented 2 months ago

Immich-go since the beginning addresses the problem of duplicates created by Google compressed storage. It keep the best version.

The 2nd point by @cuu508 is still one my TODO