Skip to content

Deduplicate photos in macOS library (or standalone)

License

Notifications You must be signed in to change notification settings

jlindsayDev/photo-deduplication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Photo Library Deduplication

Create an array of distinct photo fingerprints leveraging imagededup hashing algorithms (PHash, AHash, WHash, DHash), EXIF data, and metadata

Setup

poetry install
poetry run python src/main.py [library_paths]

Example

poetry run python src/main.py library.photoslibrary ~/Pictures /Volumes/ExternalSSD/Photos

Usage

usage: main.py [-h] [-d DB_PATH] [-v] [--dry-run] [path ...]

Deduplicate photo albums

positional arguments:
  path                  path to .photoslibrary or photo directory

optional arguments:
  -h, --help            show this help message and exit
  -d DB_PATH, --db_path DB_PATH
                        database file path where results persist (defaults to assets/duplicates.db)
  -v, --verbose         verbose logging
  --dry-run             do not write or encode. list what operations would be performed

Goals

  • Scan photo directory, Apple .photoslibrary or photos.db with osxphotos
  • Create hashes of each photo
  • Log results to JSON
  • Persist photo hashing scores in SQLite db
  • Partition and group photos based on hashing scores
  • Create new Apple .photolibrary

References

About

Deduplicate photos in macOS library (or standalone)

Topics

Resources

License

Stars

Watchers

Forks

Languages