Skip to content

Find all the duplicate images in a folder by pixel-wise comparison and deletes them. Repeats it for all sub-directories as well.

Notifications You must be signed in to change notification settings

s-chh/duplicate-images-photos-video-finder

Repository files navigation

Duplicate-Images-Photos-Videos-Finder

Find and display all the exact duplicate images and videos in a folder and delete them (optional).
Begins search at the current folder. Repeats it for all sub-directories as well.

Run commands

Type Run command
Images python images_duplicate_exact.py
Videos python videos_duplicate_exact.py

Or Run "duplicate_media_exact.bat" on a Windows system to run both programs sequentially (images followed by videos).

Run Arguments

Argument Usage Default
folder Folder to begin the search. Subfolders are included. Current path
keep_largest Keep the file with the largest or smallest size among the duplicates. 1 for largest and 0 for smallest. 1: Keep largest
compare_size Images are resized to this value for comparison.
Higher value compares more pixels but requires more RAM and runs slower.
300 gives accurate and fast results.

Requirements

This program requires Python3 with numpy and tqdm libraries to function.
Run the following command to install the dependent libraries in the Python environment if they are not present already:

pip install -r requirements.txt

Finding Duplicates Logic

Images are compared using pixel-wise comparison after setting them to a fixed size.
Videos are compared using pixel-wise comparisons on the first frame (with a fixed size) and by matching their frame length.

About

Find all the duplicate images in a folder by pixel-wise comparison and deletes them. Repeats it for all sub-directories as well.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published