Giter VIP home page Giter VIP logo

pa-0 / unduplicate-images Goto Github PK

View Code? Open in Web Editor NEW

This project forked from comicdansms/unduplicate-images

1.0 0.0 0.0 2 KB

A Python script to remove duplicate images from a source folder and copy unique images to a destination folder. Supports common image formats like .jpg, .png, .gif, webp, and .jpeg. Uses MD5 hash for duplicate detection and logs duplicate image paths.

Python 100.00%

unduplicate-images's Introduction

Unduplicate Images

This Python script searches through a specified source folder (including subdirectories) and copies unique images to a destination folder, maintaining the original folder structure. Duplicate images are skipped, and a log file is created listing the paths of duplicate images.

The script is compatible with Python 3.6 and above.

Features

  • Iterates through a designated source folder (including subdirectories)
  • Copies unique images to a destination folder, keeping the original folder structure
  • Skips over duplicate images (comparing image content, not file names)
  • Creates a log file listing the paths of all duplicate images
  • Displays a progress bar in the terminal

Supported Image Formats

The script supports the following image formats:

  • JPEG (both .jpg and .jpeg extensions)
  • PNG (.png)
  • GIF (.gif)
  • WebP (.webp)

How to use

  1. Make sure you have Python 3.6 or later installed on your system.
  2. Install the required package: tqdm using pip install tqdm or pip3 install tqdm (depending on your Python version)
  3. Download the script as unduplicate.py.
  4. Open the unduplicate.py script in your preferred text editor.
  5. In the script, set source_folder variable to the path of the folder containing the original images.
  6. Set the destination_folder variable to the path of the folder where unique images should be copied.
  7. Save the changes and run the script: python unduplicate.py

Example

For example, if you have a folder named 'images' containing the original images and you want to copy the unique images to a folder named 'sorted-images':

source_folder = "images"
destination_folder = "sorted-images"

unduplicate-images's People

Contributors

comicdansms avatar

Stargazers

Peter Abbasi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.