Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
code-killerr opened this issue May 22, 2023 · 4 comments
Open

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

code-killerr opened this issue May 22, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@code-killerr
Copy link

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

System: macOs
python: 3.8.16

@tanujjain
Copy link
Collaborator

tanujjain commented May 22, 2023

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 tanujjain added the bug Something isn't working label May 22, 2023
@code-killerr
Copy link
Author

code-killerr commented May 29, 2023

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)

@tanujjain
Copy link
Collaborator

tanujjain commented Jul 28, 2023

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.

@code-killerr
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants