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

shape incompatibility in score2percentile function in create_heatmaps #282

Open
cagankpln opened this issue Nov 13, 2024 · 1 comment
Open

Comments

@cagankpln
Copy link

Hello, when we were running the create_heatmaps.py code, we got this error:
Traceback (most recent call last):
File "/home/galen/CLAM/create_heatmaps.py", line 369, in
compute_from_patches(wsi_object=wsi_object,
File "/home/galen/CLAM/vis_utils/heatmap_utils.py", line 82, in compute_from_patches
A[score_idx] = score2percentile(A[score_idx], ref_scores)
ValueError: could not broadcast input array from shape (15882,) into shape (1,)

We noticed that the shape of the ref_scores is [15882, 1], so we resolved this error by flattening the ref_scores. We also noticed that there are several closed issues mentioning this problem with the solution similar to ours. Since these issues are closed, we doubted ourselves whether we made a previous mistake in the pipeline that caused this error. Or are the codes not fixed?

@Adali35
Copy link

Adali35 commented Nov 19, 2024

Hi I am having the same problem, I do not know why we need to reshape the ref_scores and I am not sure whether it is a serious problem to lean on. Some clarification would be very nice ! :)

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