question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LabelSampler showing none, but Label has nonzero values

See original GitHub issue

Hi all, I am facing a strange issue with LabelSampler. Here is the code for initialization of LabelSampler:

    sampler = torchio.data.LabelSampler(patch_size)
    patches_queue = torchio.Queue(subjects_dataset, max_length=q_max_length,
                                  samples_per_volume=q_samples_per_volume,
                                  sampler=sampler, num_workers=q_num_workers,
                                  shuffle_subjects=False, shuffle_patches=True, verbose=q_verbose)

For some images in my dataset, it throws the error:

RuntimeError: Empty probability map found: /path/to/mask/

But, when I have a look at these images, the mask is non-zero, but still this error is thrown. I am confused regarding this issue. Here is the link to the zip file for the case which is showing this error: https://drive.google.com/file/d/1kJ7DORGzZt8DXflS3bJz-Hj4gcWmrBe7/view?usp=sharing Please let me know if something is not clear. Thanks for your help! Megh

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
fepegarcommented, Dec 22, 2020

No worries! Thanks again for reporting, it’s very helpful.

1reaction
meghbhaleraocommented, Dec 22, 2020

Hi @fepegar, Thanks so much for your detailed explanation, that makes sense! Thanks again, Megh

Read more comments on GitHub >

github_iconTop Results From Across the Web

pandas determine column labels that contribute to non-zero ...
For the dataframe shown below, I want to do the following : In every row I want to determine the number of nonzero...
Read more >
Hide zero values in chart labels - YouTube
00:00 Stop zeros from showing in chart labels00:32 Trick to hiding the zeros from chart labels (only non zeros will appear as a...
Read more >
Patch samplers - Training - TorchIO
Extract random patches with labeled voxels at their center. This sampler yields patches whose center value is greater than 0 in the label_name...
Read more >
Find all non zero values in an array AND display the values
Hi,. I have a matrix of 1x1177 and I wanted to display all the nonzero values with the array and the location of...
Read more >
Advanced pivot table filtering - hide records with non-zero ...
I'd like to filter the pivottable so that it only returns records where the value in Fiscal Year 2013 is zero for a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found