Skip to main content

ddup

Compare images in two image lists and find dulplicate ones.

Install

pip install ddup

Usage

  • Use it in command line
ddup {--list1 img1 img2 img3| --path1 imglist_path} \
     [{--list2 img1 img2 img3| --path2 imglist_path}] \
     [--out output_dir] [--log]

Compare result will be sved in ddup_output.json

Example 1

Compare images in list file1 to those in list file2 and save results in the specified fodler.

ddup --path1 imglist1.txt --path2 imglist2.txt --out /mnt/Storage

Input for Ex1

  • path1

    imglist1.txt

/mnt/Storage/test1/000001.jpg
/mnt/Storage/test1/000002.jpg
  • path2

    imglist2.txt

/mnt/Storage/test2/000001.jpg
/mnt/Storage/test2/000002.jpg
/mnt/Storage/test2/000003.jpg
  • out
/mnt/Storage

Output for Ex1

  • hash1.hdf5

    Store the hashes of images in list1 in .hdf5 format.

  • hash2.hdf5

    Store the hashes of images in list2 in .hdf5 format.

  • ddup_output.json

    Store the comparision results in json format. Each image in list1 will correspond to one or more images in list2 if they are similar.

{
  "/mnt/Storage/test1/000001.jpg": ["/mnt/Storage/test2/000001.jpg"],
  "/mnt/Storage/test1/000002.jpg": ["/mnt/Storage/test2/000002.jpg", "/mnt/Storage/test2/000003.jpg"]
}

Example 2

Compare a list of images to themselves.

You can give a single list, or give two same lists.

ddup --list1 1.jpg 2.jpg 3.jpg 4.jpg
ddup --list1 1.jpg 2.jpg 3.jpg 4.jpg --list2 1.jpg 2.jpg 3.jpg 4.jpg

Input for Ex2

["1.jpg", "2.jpg", "3.jpg", "4.jpg"]

Output for Ex2

  • hash1.hdf5

    Store thephashes of images in list1 in .hdf5 format.

  • ddup_output.json

    Store the comparision results in json format.

    For self comparison, similar images will be orginized into groups with the first image in the group be the key and the whole group be the value.

{
  "1.jpg": ["1.jpg", "2.jpg", "3.jpg"]
}

Parameters

list1 and path1 are considered as input1.

One and only one of them must be provided.

list2 and path2 are considered as input2.

None or one of them can be provided.

If none of them are provided, input1 will be compared with itself.

If one of them is provided, input1 will be compared with input2.

  • list1

    Directly give paths of several images.

--list1 1.jpg img/2.jpg img2/3.jpg
  • path1

    Path of the first image list file.

    If there are many images to be compared with, an image list file can be provided instead.

    Image paths in the list should be Absolute path.

--path1 imglist1.txt
  • list2

    Same as list1

  • path2

    Same as path1

  • out[optional]

    To specify a folder to save the results files.

    The folder will be created if it does not exist.

    Default is folder ddup_output in current path.

  • --log[optional]

    With this option added, the program will print detail log for each thread and each dulplicate image pair. This may cause message flush on screen so it is recommended to pipe it in to a log file.

Release files for ddup 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ddup 0.0.7
File Size Uploaded
ddup-0.0.7.tar.gz 7.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ddup 0.0.7
File Interpreter ABI Platform
ddup-0.0.7-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 15.7 kB

Release files / ddup-0.0.7.tar.gz

Download URL ddup-0.0.7.tar.gz
Size 7.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a0b985248f165e9999a58443f9fb73e3319220a14950a336f186cadda580d61e
BLAKE2b-256 checksum
How to use checksums
81ebd18d6cbd1f0145355498d6a793a8da92ab48d4537efa468917c6ac0ccedf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release files / ddup-0.0.7-py2.py3-none-any.whl

Download URL ddup-0.0.7-py2.py3-none-any.whl
Size 8.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e55fc9250ea68f12880bcdf9cf16172afef6d6c9eec12b230cc3d2e152bad3a2
BLAKE2b-256 checksum
How to use checksums
68cd9a3f11b1f047623bbe36f2876386065b09e8647508a2448bdd826003c9c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page