mahmoodlab / CLAM

Data-efficient and weakly supervised computational pathology on whole slide images - Nature Biomedical Engineering
http://clam.mahmoodlab.org
GNU General Public License v3.0
956 stars 325 forks source link

heatmap #252

Open suminwei opened 1 month ago

suminwei commented 1 month ago

Hi, I am running into the following error when running create_heatmaps.py [I'm using the CONCH encoder].

Error message is:
Traceback (most recent call last):
  File "path/to/CLAM/create_heatmaps.py", line 369, in <module>
    compute_from_patches(wsi_object=wsi_object, 
  File "/path/to/CLAM/vis_utils/heatmap_utils.py", line 80, in compute_from_patches
    A[score_idx] = score2percentile(A[score_idx], ref_scores)
ValueError: could not broadcast input array from shape (401,) into shape (1,) 

May you have any suggestions for how to fix this? Thank you!

PeterJBlake commented 1 month ago

Hi @suminwei,

I am facing a similar issue.

As a quick fix until the issue is resolved, if you set the use_ref_scores parameter to false in the config file the code should run.

Thanks