How to detect duplicates of photos (even if the duplicate is of lower resolution) and how to keep only the higher-res copy?

Solution 1:

I had the same use-case, and I wrote up a nifty little script to achieve that end.

Have a look if this Python script helps you too:

https://github.com/AnirudhKishan/DeleteVisuallyRedundant

Solution 2:

Some time ago, in Ubuntu 10.04, I was using DupeGuru Picture Edition for that. It was pretty good at finding duplicates in various sizes & resolutions. Seems that since version 4.0 of DupeGuru, the Picture Edition as a separate application is gone, but its functionality has been incorporated into the main application as "Picture Mode". You can try it, however currently only packages for Ubuntu 16.04 and 18.04 are available, there's no build for 20.04.

The package for 18.04 works under 20.04, but some additional fixes after installation are needed. You need to do the following commands:

cd /usr/share/dupeguru/core/pe
sudo ln -s _block.cpython-36m-x86_64-linux-gnu.so _block.cpython-38-x86_64-linux-gnu.so
sudo ln -s _cache.cpython-36m-x86_64-linux-gnu.so _cache.cpython-38-x86_64-linux-gnu.so
cd /usr/share/dupeguru/qt/pe
sudo ln -s _block_qt.cpython-36m-x86_64-linux-gnu.so _block_qt.cpython-38-x86_64-linux-gnu.so

After this, DupeGuru works perfectly.