Coder Social home page Coder Social logo

invoker-ll / wsi-finetuning Goto Github PK

View Code? Open in Web Editor NEW
65.0 65.0 13.0 978 KB

This is the official repository for our CVPR 2023 paper 'Task-Specific Fine-Tuning via Variational Information Bottleneck for Weakly-Supervised Pathology Whole Slide Image Classification'.

Shell 0.54% Python 99.46%

wsi-finetuning's People

Contributors

invoker-ll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wsi-finetuning's Issues

On the Mapping Problem of BRCA Subtype Datasets

I noticed that you are using the BRCA dataset in the dataset, so I have a few questions to ask.

  1. Has your BRCA dataset been subjected to common subtype binary classification (IDC and ILC).
  2. If so, how did you map the labels of IDC and ILC from the BRCA dataset.

Problem in openslide.read_region

Hi, I encountered a problem while trying to run extract_topK_ROIs.py. After debugging, I think the issue lies in the self.wsi.read_region function. Upon checking the OpenSlide documentation, it appears that the coordinates should be specified as x and y. However, when I printed out the coordinates, I found only a single value (e.g., 108736). Could you help me overcome this issue? Thank you!

image
image

VIB selection question

Hi, I am confused about the vib patch-selection process in the code. In the paper it mentioned that the patches are selected based on the bernouli probability, but I found that in the code it is actually selected based on the attention scores from CLAM. I tested the code and the performance is not good. Could you help me to solve this? Thanks.

logits, Y_prob, Y_hat, A, results_dict = model_wsi(features, testing=True)
topk_indexes = torch.topk(A.squeeze(), min(args.topk_num,A.shape[1]), sorted=True)[1].cpu()

Incomplete code of class `Whole_Slide_Bag_FP_SAVE` in `extract_topK_ROIs.py`

Hello, thank you for your code. However, I met some problem in Stage-2 (wsi-finetuning with topK).

In extract_topK_ROIs.py line 88,

dataset = Whole_Slide_Bag_FP_SAVE(file_path=patch_file_path,wsi=wsi,select_idx=topk_indexes)

However, the class Whole_Slide_Bag_FP_SAVE doesn't have the keyword argument select_idx. Could you please provide the complete code?
Thanks a lot!

Question about the implementation of mask

Hello, I'm confused about the mask operation in reducing patches.
In the implementation, the mask is obtained by addition of z_mask (sampling from Bernoulli distribution) and instance_prob (predict by linear layer), I think it should be mask = z_mask. could you please tell me the reason you compute the mask in this way? Thanks a lot.

z_mask = (z_mask.view(-1,1) + torch.sigmoid(instance_pred))/(1.0+self.threshold)

Inquiry about Missing Slides when Patching

Hi, I tried following your code to create patches by using bash create_patches.sh. However, there are two missing slides (normal_027 and normal_045), and as a result, I could only get 397 instead of 399 on Camelyon16 dataset. Do you perhaps know why?

Thank you!

Hi,where is the KL loss in your code

Hi, thanks for your interesting work. I have a question about your loss function (Eq.(8)) in your paper.
In Eq.(8), you have stated that we should use KL loss in the latter part. However, I didn't see any KL loss code in your code (All I have found is MSE loss ). Could you please tell me where did you use your KL loss in your code? Thanks.

Inquiry about Complete Code

Hi, I wonder if you have the complete code in which you combine FT with other methods such as Trans-MIL, DFTD-MIL, Mean-pooling, Max-pooling, and KNN, as shown in the paper. As I believe the current code is only applicable to CLAM.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.