News for hackers. Stuff that matters.
Re:Show HN: Imagededup – Finding duplicate images made easy by jonatron on Monday October 07, 2019 @05:35AM (#21178950)
I use Cython (CPU) to brute force 400,000 pHash's of images. It takes somewhere between 100 and 200ms to search.
Re:Show HN: Imagededup – Finding duplicate images made easy by tanujjain on Tuesday October 08, 2019 @03:33PM (#21196224)
Only realized now that the 100-200ms time you refer to is for a single search and not for 400,000 searches. The package already achieves this brute-force speed. In fact, the package also implements bktree, which, depending upon the distance threshold passed, could drastically reduce the search time. Moreover, the search through bktree is also parallelized in the package(each image's hash gets searched through the tree independently after the tree is constructed). On one of the example dataset containing 10k images, with a distance threshold of 10 (for 64-bit hashes), the retrieval time per image obtained was < 50 ms.
Re:Show HN: Imagededup – Finding duplicate images made easy by jonatron on Friday October 11, 2019 @06:35AM (#21223070)
The 100-200ms time I referred to was indeed a single search. The difference is, it's on a single core. Cython definitely makes the hamming distance function faster.
Re:Show HN: Imagededup – Finding duplicate images made easy by tanujjain on Monday October 07, 2019 @08:24AM (#21179940)
That sounds good! Would be great if you can share the code, or even better, make a PR to the repo.
Re:Show HN: Imagededup – Finding duplicate images made easy by jonatron on Monday October 07, 2019 @08:55AM (#21180174)
The implementation is trivial, for speed we use:

cdef extern int __builtin_popcountll(unsigned long long) nogil

dist = __builtin_popcountll(key ^ phash)

It would only take a couple of minutes to fill out the rest.

Re:Show HN: Imagededup – Finding duplicate images made easy by mkl on Monday October 07, 2019 @05:49AM (#21179034)
How long did the generating take?
Re:Show HN: Imagededup – Finding duplicate images made easy by jonatron on Monday October 07, 2019 @06:12AM (#21179149)
We store pHash'es in a database, but just quickly checking on my laptop, between 1-2ms to generate a single image pHash. IO could be significant for many images.