wwyi1828 / clusiam Goto Github PK
View Code? Open in Web Editor NEWImproving Representation Learning for Histopathologic Images with Cluster Constraints
License: MIT License
Improving Representation Learning for Histopathologic Images with Cluster Constraints
License: MIT License
Hello, thank you for your great work!
How do I use the weights of the trained model to cluster images? I only found the code for model training in the repository.
I am looking forward to your reply. Thank you very much!
Hi, @wwyi1828
Thank you for your work.
In the paper, it is mentioned that "we split the training sets into 75% training and 25% validation partitions."
Does the 25% validation subset participate in the self-supervised training process?
If not, was the training set split only once, or was k-fold cross-validation employed (where k-fold would imply that the self-supervised training was conducted k times)?
Additionally, I encountered some difficulties downloading the patches you provided in Dropbox due to internet issues.
I used CLAM and obtained approximately 7 million patches in the training set. Also, I used preprocessing method provided by DSMIL and got approximately 10 million patches.
While the paper states 2.6 million for the training set. Did you employ any sampling methods? Could you please provide further details about the preprocessing of the slides?
Best wishes.
Hi,
thank you for your nice work.
In this paper, I understand Equation (3) and (4) as assigning Z to cluster center and forming the cluster center, respectively.
But I'm a little confused about Equation (5) which is used for calculating the mean of the off-diagonal elements.
I wonder if you could provide an intuitive explanation for why calculating the mean of the off-diagonal elements.
Hi, Thank you for your very good paper, great code-base, and your active repo. I was trying to reproduce your results with your preprcocessed data that was available in the repo, and I had some questions regarding that.
I have run the code for "CluSiam" model, but the number of clusters I get in the end is more (3, 4 or around this). When I observed, there was one big cluster containing both normal and tumour cases, and two smaller clusters. Should I change anything in the configs or adjust any further parameters?
Also, there is a print line in your training code that shows the number of non-zero clusters, with and without adding the Gumble noise. When running with K=100 maximum clusters, even in the latest epochs, the number of clusters after adding noise is nearly all 100 of them. Might that be the problem for my case, or did you also have a similar thing like this? I was thinking maybe there is too much noise added that somehow ruins the formation of clusters in higher epochs. Should that be somehow controlled?
Also, I had another question about the range of losses. When I run the training, the contras_loss is -0.9635 after 50 epochs, which I guess makes sense. But, my cluster_loss is nearly -0.004. Does that look correct? I was thinking maybe the loss is so small and gradients vanish for updating the assigner network. Should I change anything or add a coefficient to multiply that? Or, should I change the alpha?
If you also have any other suggestions to resolve the issue, I'd appreciate your help. Thanks again!
Hi, @wwyi1828
I'm trying to reproduce your result.
But when I use CluSiam (training for 50 epochs) to extract features, I found that all tiles representation are almost same.
When I used these representations to train a mil model, the result auc is always around 0.5.
To train a CluSiam model, I used commands as below:
python3 main.py \
--model_type clusiam \
--num_clusters 100 \
--feat_size 2048 \
--epochs 50 \
--alpha 0.5 \
--fix_pred_lr \
--batch_size 512 \
--num_worker 32 \
--save_path /work/lzh/model/20x-clusiam-full-precision \
--log_dst /work/lzh/model/20x-clusiam/20x-clusiam-full-precision \
/work/lzh/data/tiles/memory/tiles20x/training
The training data are 2.5 millions .jpeg files (C16 processed with Clam).
Is there any trick I missed?
Could you please give some advice?
Hi, @wwyi1828,
Thank you for your excellent work.
After reading your article, I still have some questions.
From my understanding, a single patch from a slide is fed into CluSaim, which outputs a 1*k vector. The argmax is then applied to this vector. However, based on my understanding, there should be k clusters, but Figure 3 shows only two clusters.
Similarly, in Figure 4 (b) and (c), how did you determine the number of clusters (red dashed line)?
Regarding the classification task, the paper mentions: "We aggregated patch-level predictions to slide-level predictions using two multiple-instance learning techniques: Max-Pooling (Max) and Dual-Stream Multiple-Instance Learning (DSMIL)." Is a patch-level prediction a k*D vector encoded from a single patch?
Additionally, since DSMIL utilizes two different magnification levels (5x and 20x), did you train separate models for each magnification level?
I would greatly appreciate it if you could provide more detailed explanations.
Hello,
I am seeking clarification on how the labels for patches are assigned in the project. I apologize if I have overlooked any relevant information regarding this.
Is it correct to assume that every patch takes the label of the Whole Slide Image (WSI) it emerged from?
Thank you for your assistance!
Kind regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.