imagededup icon indicating copy to clipboard operation
imagededup copied to clipboard

When I use PHash in mac, It's stuck.

Open code-killerr opened this issue 2 years ago • 4 comments

I'm waitting a long time in here, for about 5mins - 10mins and still stuck image

System: macOs python: 3.8.16

code-killerr avatar May 22 '23 07:05 code-killerr

I can reproduce it too. Will have a look in a bit.

Meanwhile, you could make progress by using 'bktree' as the search method like below:

hasher.find_duplicates('/path/to/image/directory', search_method='bktree')

The search will be slower than cython brute force, but will work.

tanujjain avatar May 22 '23 16:05 tanujjain

Ok,It work, thanks. But I also have one question, when I compare the black icon,the result is awful, different black transparent icon score is 0, other color icon is fine.how can I fix it?I uesd cnn and PHash, but them give me the same result.like these. CaretUp cart-empty (2)

code-killerr avatar May 29 '23 09:05 code-killerr

The culprit here is the convert function from PIL which is being used to convert your RGBA image to RGB. Both cnn as well as hashing methods rely on this method. At this point, I'm afraid it's not possible to get rid of this issue without removing dependency on PIL (which we wouldn't like to do). However, hopefully, it works better on other images for you.

tanujjain avatar Jul 28 '23 16:07 tanujjain

What a pity, In my work, there have a lot of black icon,I can't skip them,maybe can find a way to change background color when compare.

code-killerr avatar Aug 02 '23 10:08 code-killerr