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

Equal mixture proportions #23

Open
linatakemaru opened this issue Oct 30, 2024 · 2 comments
Open

Equal mixture proportions #23

linatakemaru opened this issue Oct 30, 2024 · 2 comments

Comments

@linatakemaru
Copy link

linatakemaru commented Oct 30, 2024

Hi, thanks for your awesome work! I tried to implement PANTHER on around 3000 WSIs. I successfully generated a prototype and embedding for c=10 and c=16, and ran the demo code for visualization. However, when I calculate the "mus", they're almost all equal for every WSI (see below). Any thoughts on why this is happening?

I also noticed that the imbalance value during training is consistently equal to k (16), which I believe is incorrect.

Thank you!

Screenshot 2024-10-30 at 1 30 14 PM
@andrewsong90
Copy link
Contributor

Hi @linatakemaru

I am not sure why this could be happening - Have you checked each prototype to see if they are sufficiently different?
One more solution could be to normalize all embeddings so that L2 norm is 1 and then trying the procedure again to see if it solves the issue.

Which patch encoder are you using?

@linatakemaru
Copy link
Author

linatakemaru commented Nov 11, 2024

Hi, thanks for the response. I'm using UNI–I tried redownloading the model from huggingface and generated the embeddings from scratch again, but ran into the same issue. Here's a screenshot of the output for more context.

I believe this has something to do with the faiss implementation of kmeans. When I switch the mode parameter from faiss to kmeans to use the sklearn CPU version, the visualizations and example patches from each cluster make sense morphologically. However, since sklearn doesn't output the same metrics per iteration, I'm not sure if those metric values are expected. For now, I've resorted to using sklearn until it gets sorted out.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants