What transform I should have in order to use LabelSample
See original GitHub issueHello, I run into this issue while creating dataloader using torchio. I defined a sampler with LabelSampler, and it gives me this error:
RuntimeError: Empty probability map found: ...
Voxels with positive probability might be near the image border.
If you suspect that this is the case, try adding a padding transform
The transform I’m using is
training_transform = tio.Compose([
tio.ToCanonical(),
tio.Pad(int(patch_size[0]/2)),
tio.CropOrPad(patch_size),
tio.ZNormalization(masking_method=tio.ZNormalization.mean),
tio.OneHot(3),
])
I means I have to pad after cropandpad?
Thanks
Issue Analytics
- State:
- Created 3 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
The Label element - HTML: HyperText Markup Language | MDN
This means that, for example, a screen reader will read out the ... a <label> element with an <input> element, you first need...
Read more >Label Transform | Vega
The label transform should be applied to a text mark whose input data is the base mark to label. That is, the text...
Read more >Label Encoding in Python Explained - Great Learning
In label encoding in python, we replace the categorical value with a numeric value between 0 and the number of classes minus 1....
Read more >sklearn.preprocessing.LabelEncoder
Encode target labels with value between 0 and n_classes-1. This transformer should be used to encode target values, i.e. y , and not...
Read more >Deep dive into multi-label classification..! (With detailed Case ...
Problem transformation methods transform the multi-label problem into a set of binary classification problems, which can then be handled using ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In that case, you might want to lower the
max_queue_length
.[Please use syntax highlighting for code snippets]
Given the size of your volumes and patches, I suggest using a larger number of samples per volume, maybe 30 or 50. That will be less computationally expensive, as you will need to load and transform volumes less often.