No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
appleappleapplenanner ac3cb12085 Fix indentation error caused by merge
I had to yank this release. I merged too quickly.

This won't happen again.
2023-07-01 11:13:02 -07:00
.github/workflows Create python-publish.yml 2023-06-28 03:56:25 -07:00
src/hydrusvideodeduplicator Fix indentation error caused by merge 2023-07-01 11:13:02 -07:00
tests Move project to package 2023-06-21 06:15:47 -07:00
.gitignore Add perceptual hash database 2023-06-23 22:17:16 -07:00
LICENSE Initial commit 2023-06-19 01:46:30 -07:00
pyproject.toml Add basic multiprocessing and cache duplicate search index (#11) 2023-06-28 02:25:10 -07:00
README.md Add wiki mention 2023-06-28 03:18:31 -07:00

Hydrus Video Deduplicator

Hydrus Video Deduplicator detects similar video files and marks them as potential duplicates through the Hydrus API


How It Works:

The deduplicator works by comparing videos by computing a perceptual hash.

A perceptual hash is a way to characterize videos in small chunks.

The perceptual hashes are stored in a database file in the running directory to avoid computing them every time.

Once all perceptual hashes for all the videos in your database are computed, they are compared against each other to detect if they're similar. If they are similar, they will be marked as potential duplicates in Hydrus.

The accuracy is extremely good because of vpdq. You can adjust the threshold of similarity using --threshold. The default is 75%.

For more information check out the wiki and the FAQ


Installation:

Windows requires WSL

Linux:

Install dependencies

Then install with pip:

pip install hydrusvideodeduplicator

Usage:

python3 -m hydrusvideodeduplicator --api-key="<your key>"

TODO:

  • Option to rollback and remove potential duplicates
  • Option to enter custom Hydrus tag search parameters
  • Parallelize hashing and duplicate search
  • Automatically generate access key with Hydrus API
  • Upload to PyPI
  • Windows compatibility without WSL
  • Docker container (?)

Please create an issue on Github if you have any problems or questions! Pull requests also welcome on this or my VideoHash fork.

There is a lot to improve and cleanup and I'm more experienced in C than Python, so fix stuff please.


Credits:

Hydrus Network by dev

Hydrus API Library by Cryzed

vpdq by Meta

various other files from threatexchange by Meta