Code Monkey home page Code Monkey logo

Comments (1)

96jaco96 avatar 96jaco96 commented on May 30, 2024

I'm having this problem too, and i've spend all day today debugging why does this happen.

So far i've discovered this:

the "is_similar" function in videohash.py do this check:

if self - other <= ceil((self.similar_percentage / 100) * self.bits_in_hash)

BUT videohash.py also defines these two things:
self.bits_in_hash = 64
self.similar_percentage = 15

so the previous check ALWAYS boils down to:
if self - other <= ceil((15 / 100) * 64)
which is ALWAYS = 10

basically changing the "is_similar" function from
if self - other <= ceil((self.similar_percentage / 100) * self.bits_in_hash)
to
if self - other <= 10
returns the same results, and i've tested this with a semple of 1000 videos.
The results are identical both with the default check and when using "if self - other <= 10"

Correct me if i'm wrong, i'm quite noob-ish here and just doing some observations... infact i'm not even sure mathematically speaking what this check is doing exactly.

ALSO i think this can be related somewhat to the issue #94 "Hash Collision" if that might help...

from videohash.

Related Issues (20)

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.