PySceneDetect
PySceneDetect copied to clipboard
Perceptual Hash Detector
Hi @Breakthrough,
This is a proof of concept for a perceptual hash based detection algorithm I had started working on a while back. I updated things to be compatible with the 0.6.x updates (I think) and implemented things in OpenCV without adding additional dependencies (previously I had PIL and scipy). I also added a cli command and help strings, but have not written any actual documentation yet.
As for the actual algorithm, I re-implemented the phash algorithm from the imagehash library. For a more human readable version of the algorithm, you can see the blog post here.
Performance wise, I chose defaults that worked well on the goldeneye clip and seemed fairly performant.
There might be some formatting issues to make it match the updated codebase (typing for instance). Feel free to change things to make it fit or, point it out and I will try to take a crack at it.
One thing I think might need to be updated is the API docs and the scenedetect.cfg template file. I can follow up with those changes though, but just want to write it down so it's not forgotten.
Finally got this into develop, thanks for your patience! There was some refactoring done to the CLI in the latest version, so it doesn't show up on the CLI yet. Will need to fix that in develop branch, but I'll make sure to do that soon.
Thanks a ton for this, amazing work!