Open code-killerr opened 1 year ago
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.
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.
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.
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.
I'm waitting a long time in here, for about 5mins - 10mins and still stuck
System: macOs python: 3.8.16